How Magento load all modules
app\code\core\Mage\Core\Model\config.php you can see init function
public function init($options=array()) { $this->setCacheChecksum(null); $this->_cacheLoadedSections = array(); $this->setOptions($options); $this->loadBase(); $cacheLoad = $this->loadModulesCache(); if ($cacheLoad) { return $this; } $this->loadModules(); $this->loadDb(); $this->saveCache(); return $this; }
You can see loadModules() function of same file to see which all modules gets loaded on this page.This function call _loadDeclaredModules () .
public function loadModules() { Varien_Profiler::start('config/load-modules'); $this->_loadDeclaredModules(); $resourceConfig = sprintf('config.%s.xml', $this->_getResourceConnectionModel('core')); $this->loadModulesConfiguration(array('config.xml',$resourceConfig), $this); /** * Prevent local.xml directives overwriting */ $mergeConfig = clone $this->_prototype; $this->_isLocalConfigLoaded = $mergeConfig->loadFile($this->getOptions()->getEtcDir().DS.'local.xml'); if ($this->_isLocalConfigLoaded) { $this->extend($mergeConfig); } $this->applyExtends(); Varien_Profiler::stop('config/load-modules'); return $this; }
Under _loadDeclaredModules function you can see how many modules are get loaded and how it parse their config files and dependency etc.
How does layout update takes place on magento:
Layout update of custom modules take place throgh below ways
#File: app/code/core/Mage/Core/Model/Layout/Update.php public function getFileLayoutUpdatesXml( //... foreach ($updateFiles as $file) { $filename = $design->getLayoutFilename($file, array( '_area' => $area, '_package' => $package, '_theme' => $theme )); if (!is_readable($filename)) { continue; }
You can see
echo “Area=>”.$area.” & package=”.$package.”&theme=”.$theme;
if you see your layout file is available or not because might be your layout file is not available at actual location like required them and package.
Chandra Shekhar
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022
Recent Comments