コード例 #1
0
ファイル: Analytics.php プロジェクト: GerDner/luck-docker
 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);
 }
コード例 #2
0
ファイル: Partner.php プロジェクト: nhp/shopware-4
 /**
  * Disable template engine for selected actions
  *
  * @codeCoverageIgnore
  * @return void
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if (in_array($this->Request()->getActionName(), array('validateTrackingCode','mapCustomerAccount'))) {
         $this->Front()->Plugins()->Json()->setRenderer(false);
         $this->Front()->Plugins()->ViewRenderer()->setNoRender();
     }
 }
コード例 #3
0
ファイル: Widgets.php プロジェクト: nhp/shopware-4
	/**
	 * Create reference to widget-model
     *
	 * @return void
	 */
	public function preDispatch() {
		$this->widgetsXml = Shopware()->DocPath()."files/config/Widgets.xml";
		$this->widgetsApi = new Shopware_Models_Widgets_Widgets(null, $this->widgetsXml);
		$this->authCode = 'f0Dbh1jL9RoddLD8lqhYHKYWyUqova'; // Shopware Update-Service Rest-Code
        $this->dir = Shopware()->DocPath()."files/config";

		parent::preDispatch();
	}
コード例 #4
0
ファイル: Base.php プロジェクト: GerDner/luck-docker
 /**
  * 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();
     }
 }
コード例 #5
0
ファイル: PluginManager.php プロジェクト: Goucher/shopware
 public function preDispatch()
 {
     if (strtolower($this->Request()->getActionName()) == 'index') {
         $available = $this->checkStoreApi();
         if ($available) {
             $this->getCategoryService()->synchronize();
         }
         $this->get('shopware_plugininstaller.plugin_manager')->refreshPluginList();
     }
     parent::preDispatch();
 }
コード例 #6
0
ファイル: Banner.php プロジェクト: nhp/shopware-4
 /**
  * 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');
 }
コード例 #7
0
 /**
  * @param Enlight_Controller_Request_Request $request
  * @param Enlight_Controller_Response_Response $response
  */
 public function __construct(Enlight_Controller_Request_Request $request, Enlight_Controller_Response_Response $response)
 {
     parent::__construct($request, $response);
     $this->plugin = Shopware()->Plugins()->Backend()->SwagImportExport();
 }
コード例 #8
0
 /**
  * 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();
 }
コード例 #9
0
 /**
  * {@inheritdoc}
  */
 public function preDispatch()
 {
     $this->plugin = $this->get('plugins')->Frontend()->SwagPaymentStripe();
     parent::preDispatch();
 }
コード例 #10
0
ファイル: Login.php プロジェクト: GerDner/luck-docker
 /**
  * Loads auth and script renderer resource
  */
 public function init()
 {
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     parent::init();
 }
コード例 #11
0
ファイル: Translation.php プロジェクト: nhp/shopware-4
 /**
  * Setup Translation Component
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->translation = new Shopware_Components_Translation();
 }
コード例 #12
0
 /**
  * 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();
 }
コード例 #13
0
ファイル: Glossar.php プロジェクト: zirkeldesign/SwagGlossar
 /**
  * Adding local template directory to smarty template scope
  */
 public function init()
 {
     $this->View()->addTemplateDir(dirname(__FILE__) . "/../../Views/");
     parent::init();
 }
コード例 #14
0
ファイル: MediaManager.php プロジェクト: nhp/shopware-4
 /**
  * Enable json renderer for index / load action
  * Check acl rules
  *
  * @return void
  */
 public function preDispatch()
 {
     if ($this->Request()->getActionName() !== 'upload') {
         parent::preDispatch();
     }
 }
コード例 #15
0
ファイル: Customer.php プロジェクト: GerDner/luck-docker
 /**
  * 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();
 }
コード例 #16
0
 /**
  * {@inheritdoc}
  */
 public function init()
 {
     $this->plugin = $this->get('plugins')->Frontend()->SwagPaymentPaypal();
     parent::init();
 }
コード例 #17
0
ファイル: Voucher.php プロジェクト: ClaudioThomas/shopware-4
 /**
  * Disable template engine for all actions
  *
  * @codeCoverageIgnore
  * @return void
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if (in_array($this->Request()->getActionName(), array('validateOrderCode', 'validateVoucherCode', 'validateDescription'))) {
         $this->Front()->Plugins()->Json()->setRenderer(false);
         $this->Front()->Plugins()->ViewRenderer()->setNoRender();
     }
 }
コード例 #18
0
ファイル: Cache.php プロジェクト: Goucher/shopware
 public function preDispatch()
 {
     parent::preDispatch();
     $this->cacheManager = $this->get('shopware.cache_manager');
 }