Categories


Recent Posts


Archives


November, 2013 19

Magento 2: Injecting Interfaces

Pop quiz: You’ve got your head wrapped around Magento 2’s dependency injection. You’re taking a stroll through the code base, and you see this constructor. #File: lib/Magento/PubSub/Event/QueueHandler.php public function __construct(MagentoPubSubEventQueueReaderInterface $eventQueue, MagentoPubSubJobQueueWriterInterface [...]

astorm

Notes on Magento 2 Routing

Not a comprehensive guide, and as always, let the core module’s be your guide. Router configuration has been moved from config.xml to etc/frontend/routes.xml and etc/backend/routes.xml There’s still a routerName/frontName distinction, although the router’s name is specified with an id attribute instead of the node name [...]

astorm

Magento 2: Base Directories

Another consequence of losing the global Mage class in Magento 2 is the loss of the getBaseDir method. Fortunatly, the team behind Magento 2 has a solution, the MagentoAppDir object. You can use this object to get the base directory of your Magento system. $object_manager = MagentoCoreModelObjectManager::getInstance(); $dir = [...]

astorm
email hidden; JavaScript is required