/** * init pricing config system */ public function init() { parent::init(); // permission check $key = 'plugin_onlineshop_pricing_rules'; $access = $this->getUser()->getPermission($key); if (!$access) { throw new Exception('this function requires "plugin_onlineshop_pricing_rules" permission!'); } }
public function init() { parent::init(); // enable layout only if its a normal request if ($this->getRequest()->isXmlHttpRequest() === false) { $this->enableLayout(); $this->setLayout('back-office'); } // sprache setzen $language = $this->getUser() ? $this->getUser()->getLanguage() : 'en'; Zend_Registry::set("Zend_Locale", new Zend_Locale($language)); $this->language = $language; $this->view->language = $language; $this->initTranslation(); // enable inherited values Object_Abstract::setGetInheritedValues(true); Object_Localizedfield::setGetFallbackValues(true); // init $this->orderManager = OnlineShop_Framework_Factory::getInstance()->getOrderManager(); }