Magento Block Type

In purple blocks what the type of block means, like in the bottom block?

<block type="core/template" template="example/view.phtml" /> 

Please help me in learning the development of the magento module.

Is there a good resource?

+4
source share
2 answers

The "type" block is a PHP class. In a normal system a

 core/template 

The block type will become the Magic Core _Block_ class. .

For resources, start here (personal link)

+7
source

Here is what I found out -

type refers to a PHP file that will provide methods for this phtml. Examaple:

/app/code/local/modstorm/Block/Filename.php, where all your methods for this block are located. So, if, for example, you have something like $ this-> getMethodName () in your .phtml, you should have the getMethodName () function declared in /app/code/local/modstorm/block/Filename.php .

Hope this helps others too.

0
source

Source: https://habr.com/ru/post/1388035/


All Articles