Posted almost 10 years ago. Visible to the public.

Boilerplate Admin Controller

Copy
/** * Yourcompany.com * * PHP Version 5 * * @category Namespace * @package Namespace_Module * @author Your Name <your.name@yourcompany.com> * @copyright 2012 yourcompany.com * @license http://www.yourcompany.com/license.txt Your license * @link N/A */ /** * A description of the controller * * @category Namespace * @package Namespace_Module * @author Your Name <your.name@yourcompany.com> * @license http://www.yourcompany.com/license.txt Your license * @link N/A */ class Namespace_Module_Adminhtml_SomeController extends Mage_Adminhtml_Controller_Action { /** * Control access to this controller via ACL * * @return bool */ protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('the/acl/xpath'); } /** * Index action * * @return void */ public function indexAction() { $this->_title($this->__('Module'))->_title($this->__('Something')); $this->loadLayout(); $this->_setActiveMenu('namespace_module/something'); $this->_addBreadcrumb(Mage::helper('namespace_module')->__('Module'), Mage::helper('namespace_module')->__('Something')); $this->renderLayout(); } }

Owner of this card:

Avatar
Mike Whitby
Last edit:
about 8 years ago
Posted by Mike Whitby to Magento
This website uses short-lived cookies to improve usability.
Accept or learn more