5

Is it possible to get list of all overridden controllers ?

How do I get a list of all class rewrites? mainly applies for blocks, helpers and models.

Fabian Schmengler
  • 65,791
  • 25
  • 187
  • 421
amitshree
  • 7,006
  • 12
  • 63
  • 116

2 Answers2

5

The xpath solution works also for controller overrides, if you modify it to:

print_r( Mage::getConfig()->getNode()->xpath('//routers/*/args/modules/../..'));

Note that not all of these are actual "overrides", some just add new methods to existing routes. For example, all custom admin controllers will show up below Mage_Adminhtml because they all are added to the adminhtml route.

Fabian Schmengler
  • 65,791
  • 25
  • 187
  • 421
4

I also highly recommend n98's Magento CLI toolkit, n98-magerun. https://github.com/netz98/n98-magerun

To get an output of rewrites you would do n98-magerun.phar dev:module:rewrite:list

You can also check for conflicts specifically by using n98-magerun.phar dev:module:rewrite:conflicts

Ben
  • 150
  • 4