Where are Magento's Admin Controllers?
I am trying to determine how a product is loaded from the admin panel and loaded into the edit panel in th开发者_如何学JAVAe admin panel.
I am assuming that there is an admin controller somewhere, but for the life of me I cannot seem to locate it.
Is there a logically way that admin controllers are stored?
Most Admin controllers can be found in the Adminhtml
module at
app/code/core/Mage/Adminhtml/controllers
If you're curious, the following article (self-link) covers how Admin controllers are configured in Magento, which should let you find anything you're looking for.
The app/code/core/Mage/Adminhtml/Controller
folder contains the base Admin action controller, as well as a few other base controller classes. These classes are not controllers that URLs are routed to, but are the controllers that actual admin controllers inherit from.
Magento doesn't have an autoload for classes in the controllers folder, so these base controllers are placed in a folder named Controller so that Magento's default autoloader will load them. The class name
Mage_Adminhtml_Controller_Action
gets translated to the path
Mage/Adminhtml/Controller/Action.php
Most of the model/controllers are stored in /app/code/core/Mage/ directory. Depending on what you're looking for, will depend on where you will find it. If you're looking for admin/specific functionality, check the Adminhtml folder. Then it just depends on what section you're looking for.
精彩评论