O'Reilly logo

Getting Started with Magento Extension Development by Branko Ajzele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Blocks

Looking within the helloWorldAction() method, you can see a call towards the createBlock() method with the string 'core/text' as a parameter. Where does 'core/text' come from and what does it mean? In order to understand that, we will further extend our config.xml file by adding a blocks element to it as follows:

<?xml version="1.0"?>
<config>
<!-- … other elements ... -->
   <global>
      <blocks>
         <foggyline_happyhour>
            <class>Foggyline_HappyHour_Block</class>
         </foggyline_happyhour>
      </blocks>
   </global>
<!-- … other elements ... -->
</config>

The element foggyline_happyhour is known as the class group. The element foggyline_happyhour is a class group name and its inner class element is basically a shortcut for your extensions Block type PHP classes. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required