Decorators for Magento Templates

A decorator is a class that wraps another class, implements the original interface, delegates method calls to the original class, but may modify the return values or add additional methods. The Decorator design pattern is one of the original design patterns for object...

read more

View Models in Magento 1 and 2

Magento 2.2.0 and 2.2.1 made some interesting changes to the layout system, with the goal to make the inheritance based block system redundant: all blocks are automatically considered of the “Template” type if not specified otherwise classes can be injected via layout...

read more