Q. Explain how Magento loads and manipulates configuration information? $this->loadBase(); //config.xml and local.xml $this->loadModules(); //load all modules xml from app/etc/modules/ directory $this->_loadDeclaredModules(); //load each modules xml file $this->loadDb(); //load configuration from db load data from core_config_data into our configuration: 1. We add data about websites (see core_website table) 2. We…
Q. Explain lifecycle of a Magento Block?
_prepareLayout() method is called immediately after a block has been added to the layout object for the first time.
_beforeToHtml() method is called immediately before a block’s HTML content is rendered.
_afterToHtml() method is called immediately after a block’s HTML content is generated.
_beforeChildToHtml() is called when a parent renders one of its children (through a call to $this->getChildHtml(‘name’)).