コード例 #1
0
ファイル: Email.php プロジェクト: Goucher/shopware
 /**
  * adds the Views folder to the template directory to provide the rating images for the e-mail templates
  *
  * @param \Enlight_Event_EventArgs $args
  */
 public function onPreDispatchBackendMail(\Enlight_Event_EventArgs $args)
 {
     /* @var \Enlight_Controller_Action $subject */
     $subject = $args->getSubject();
     if ($subject->Request()->getActionName() != 'sendTestmail') {
         return;
     }
     $this->template->addTemplateDir($this->bootstrapPath . 'Views/');
 }
コード例 #2
0
 /**
  * This function is responsible to resolve the backend / frontend controller path.
  *
  * @param  \Enlight_Event_EventArgs $args
  * @return string
  */
 public function onGetCustomSortControllerPath(\Enlight_Event_EventArgs $args)
 {
     $this->templateManager->addTemplateDir($this->bootstrapPath . 'Views/');
     switch ($args->getName()) {
         case 'Enlight_Controller_Dispatcher_ControllerPath_Backend_CustomSort':
             return $this->bootstrapPath . 'Controllers/Backend/CustomSort.php';
         case 'Enlight_Controller_Dispatcher_ControllerPath_Widgets_CustomSort':
             return $this->bootstrapPath . 'Controllers/Widgets/CustomSort.php';
     }
 }
コード例 #3
0
ファイル: Frontend.php プロジェクト: Goucher/shopware
 /**
  * provides the Trusted Shops config and shows the logo and the badge
  *
  * @param \Enlight_Event_EventArgs $args
  * @return void
  */
 public function onFrontendPostDispatch(\Enlight_Event_EventArgs $args)
 {
     /** @var $subject \Enlight_Controller_Action */
     $subject = $args->getSubject();
     $view = $subject->View();
     $request = $subject->Request();
     $shopId = $this->shop->getId();
     if ($request->getControllerName() == 'checkout') {
         return;
     }
     //get basic config of trusted shop for the seal template and trusted shop id
     $config = $this->getConfig($shopId);
     //extend template
     $view->sTrustedShops = $config;
     if (!$this->isResponsiveTemplate()) {
         $this->template->addTemplateDir($this->bootstrapPath . 'Views/emotion');
         $view->extendsTemplate('frontend/plugins/swag_trusted_shops/index/index.tpl');
     } else {
         $this->template->addTemplateDir($this->bootstrapPath . 'Views/responsive');
     }
 }
コード例 #4
0
ファイル: Default.php プロジェクト: ClaudioThomas/shopware-4
 /**
  * This function adds a template directory into the internal instance of the Enlight_Template_Manager
  *
  * @param   $templateDir
  * @param   null $key
  * @return  Enlight_View_Default
  */
 public function addTemplateDir($templateDir, $key = null)
 {
     $this->engine->addTemplateDir($templateDir, $key);
     return $this;
 }
コード例 #5
0
ファイル: Default.php プロジェクト: nvdnkpr/Enlight
 /**
  * This function adds a template directory into the internal instance of the Enlight_Template_Manager
  *
  * @param   string|array $path
  * @return  Enlight_View_Default
  */
 public function addTemplateDir($path)
 {
     $this->engine->addTemplateDir($path);
     return $this;
 }
コード例 #6
0
ファイル: ControllerPath.php プロジェクト: Goucher/shopware
 /**
  * returns the backend controller path
  *
  * @return string
  */
 public function onGetTrustedShopsControllerPath()
 {
     $this->template->addTemplateDir($this->bootstrapPath . 'Views');
     return $this->bootstrapPath . 'Controllers/Backend/TrustedShops.php';
 }