Пример #1
0
 /**
  * Controller pre-dispatch method
  * Check if current section is found and is allowed
  *
  * @return Mage_Backend_Adminhtml_System_ConfigController
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->getRequest()->getParam('section')) {
         $this->_isSectionAllowed = $this->_isSectionAllowed($this->getRequest()->getParam('section'));
     }
     return $this;
 }
Пример #2
0
 /**
  * Controller pre-dispatch method
  * Check if current section is found and is allowed
  *
  * @return Mage_Backend_Controller_ActionAbstract
  */
 public function preDispatch()
 {
     parent::preDispatch();
     $section = null;
     if (!$this->getRequest()->getParam('section')) {
         $section = $this->_configStructure->getFirstSection();
         $this->getRequest()->setParam('section', $section->getId());
     } else {
         $this->_isSectionAllowed($this->getRequest()->getParam('section'));
     }
     return $this;
 }
Пример #3
0
 /**
  * @param Mage_Core_Controller_Request_Http $request
  * @param Mage_Core_Controller_Response_Http $response
  * @param string $areaCode
  * @param Magento_ObjectManager $objectManager
  * @param Mage_Core_Controller_Varien_Front $frontController
  * @param Mage_Core_Model_Layout_Factory $layoutFactory
  * @param array $invokeArgs
  */
 public function __construct(Mage_Core_Controller_Request_Http $request, Mage_Core_Controller_Response_Http $response, $areaCode = null, Magento_ObjectManager $objectManager, Mage_Core_Controller_Varien_Front $frontController, Mage_Core_Model_Layout_Factory $layoutFactory, array $invokeArgs = array())
 {
     parent::__construct($request, $response, $areaCode, $objectManager, $frontController, $layoutFactory, $invokeArgs);
     $this->_translator = isset($invokeArgs['translator']) ? $invokeArgs['translator'] : $this->_getTranslator();
 }
Пример #4
0
 /**
  * Constructor
  *
  * @param Zend_Controller_Request_Abstract $request
  * @param Zend_Controller_Response_Abstract $response
  * @param array $invokeArgs
  */
 public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     parent::__construct($request, $response, $invokeArgs);
     $this->_translator = isset($invokeArgs['translator']) ? $invokeArgs['translator'] : $this->_getTranslator();
 }