View Magento's sorted module tree

by Kirk Madera

Engineers reusable modular solutions to maintain environments and deployment strategies across teams. Works for food.

View Magento’s sorted module tree

Here is an easy way to view Magento's module tree after dependency sorting has been applied.

  1. # File: app/code/core/Mage/Core/Model/Config.php
  2. # Method: _loadDeclaredModules()
  3. # Line: around 830
  4.        foreach($moduleDependsas$moduleProp){
  5.             $node=$unsortedConfig->getNode('modules/'.$moduleProp['module']);
  6.             $sortedConfig->getNode('modules')->appendChild($node);
  7.         }
  8. // Add these lines to output the sorted config as an array
  9. $modules=array_keys((array)$sortedConfig->getNode('modules')->children());
  10. print_r($modules);
  11.         $this->extend($sortedConfig);

View Magento's sorted module tree

View Magento's sorted module tree

by Kirk Madera

Engineers reusable modular solutions to maintain environments and deployment strategies across teams. Works for food.

View Magento’s sorted module tree

Here is an easy way to view Magento's module tree after dependency sorting has been applied.

  1. # File: app/code/core/Mage/Core/Model/Config.php
  2. # Method: _loadDeclaredModules()
  3. # Line: around 830
  4.        foreach($moduleDependsas$moduleProp){
  5.             $node=$unsortedConfig->getNode('modules/'.$moduleProp['module']);
  6.             $sortedConfig->getNode('modules')->appendChild($node);
  7.         }
  8. // Add these lines to output the sorted config as an array
  9. $modules=array_keys((array)$sortedConfig->getNode('modules')->children());
  10. print_r($modules);
  11.         $this->extend($sortedConfig);