@SimonHoiberg Definitly taking the early exit with option 2. I can forget about the condition and am just left with the Happy path to think about.
Argument gets more important the more conditions I get!
Less identation == cleaner Code
for me 👌
My journey to @MageUnConf starts now. I wish I could use the eagles 🦅 from LotR. Why is LotR such a thing this year? 🤔 Anyways safe travel to all of you. See you at the preparty. #muc19de@netz98@cmuench@Juce1337
A simple example module showing how to access the current product on a product detail page in Magento 2 without referencing deprecated code.
This is how the product instance travels:
Product Helper > Event > Observer > Registry Object > ViewModel
github.com/Vinai/module-c…