public function init() { parent::init(); $currency = Shopware()->Db()->fetchRow('SELECT templatechar as sign, (symbol_position = 16) currencyAtEnd FROM s_core_currencies WHERE standard = 1'); $this->View()->assign('analyticsCurrency', $currency); }
/** * Initials the script renderer and handles the json request. * If the internal customer repository isn't initialed the * repository is initialed. * * @codeCoverageIgnore * @return void */ public function init() { if (!$this->Request()->getActionName() || in_array($this->Request()->getActionName(), array('index', 'load'))) { $this->View()->addTemplateDir('.'); $this->Front()->Plugins()->ScriptRenderer()->setRender(); Shopware()->Plugins()->Backend()->Auth()->setNoAuth(); } else { parent::init(); } }
/** * Default init method * * @codeCoverageIgnore * @return void */ public function init() { parent::init(); if (!is_null(self::$testRepository)) { $this->repository = self::$testRepository; } else { $this->repository = Shopware()->Models()->Banner(); } $this->namespace = Shopware()->Snippets()->getNamespace('backend/banner/banner'); }
/** * This function add the template directory and register the Shopware_Components namespace */ public function init() { $this->setMaxExecutionTime(); Shopware()->Loader()->registerNamespace('Shopware_Components', dirname(__FILE__) . '/../../Components/'); $this->View()->addTemplateDir(dirname(__FILE__) . "/../../Views/"); parent::init(); }
/** * Setup Translation Component * * @return void */ public function init() { parent::init(); $this->translation = new Shopware_Components_Translation(); }
/** * Loads auth and script renderer resource */ public function init() { Shopware()->Plugins()->Backend()->Auth()->setNoAuth(); parent::init(); }
/** * Adding local template directory to smarty template scope */ public function init() { $this->View()->addTemplateDir(dirname(__FILE__) . "/../../Views/"); parent::init(); }
/** * Deactivates the authentication for the performOrderRedirect action * This is used in the performOrder action */ public function init() { if (in_array($this->Request()->getActionName(), array('performOrderRedirect'))) { Shopware()->Plugins()->Backend()->Auth()->setNoAuth(); } parent::init(); }
/** * {@inheritdoc} */ public function init() { $this->plugin = $this->get('plugins')->Frontend()->SwagPaymentPaypal(); parent::init(); }
/** * Initialisation of the controller. * Throws an exception is the model property isn't configured. * * @throws Exception */ public function init() { if (empty($this->model)) { throw new Exception('The `model` property of your PHP controller is not configured!'); } parent::init(); }