Inheritance: extends Pimcore\Controller\Action
コード例 #1
0
 public function init()
 {
     //allow website path to override templates
     $this->view->addScriptPath(PIMCORE_WEBSITE_PATH . '/views/scripts');
     $this->view->addScriptPath(PIMCORE_WEBSITE_PATH . '/views/layouts');
     parent::init();
 }
コード例 #2
0
ファイル: Action.php プロジェクト: ChristophWurst/pimcore
 public function init()
 {
     parent::init();
     if (\Zend_Registry::isRegistered("Zend_Locale")) {
         $locale = \Zend_Registry::get("Zend_Locale");
     } else {
         $locale = new \Zend_Locale("en");
         \Zend_Registry::set("Zend_Locale", $locale);
     }
     $this->view->language = (string) $locale;
     $this->language = (string) $locale;
 }
コード例 #3
0
ファイル: Action.php プロジェクト: hagith/pimcore-boilerplate
 public function init()
 {
     parent::init();
     if (\Zend_Registry::isRegistered('Zend_Locale')) {
         $this->locale = \Zend_Registry::get('Zend_Locale');
     } else {
         $this->locale = new \Zend_Locale('en');
         \Zend_Registry::set('Zend_Locale', $this->locale);
     }
     $this->view->language = $this->locale->getLanguage();
     $this->language = $this->locale->getLanguage();
     $this->translate = $this->initTranslation();
     \Zend_View_Helper_PaginationControl::setDefaultViewPartial('partial/pagination.php');
 }
コード例 #4
0
ファイル: Action.php プロジェクト: solverat/pimcore
 public function init()
 {
     if (self::$isInitial) {
         // only do this once
         // eg. registering view helpers or other generic things
     }
     parent::init();
     if (\Zend_Registry::isRegistered("Zend_Locale")) {
         $locale = \Zend_Registry::get("Zend_Locale");
     } else {
         $locale = new \Zend_Locale("en");
         \Zend_Registry::set("Zend_Locale", $locale);
     }
     $this->view->language = (string) $locale;
     $this->language = (string) $locale;
 }
コード例 #5
0
 public function init()
 {
     parent::init();
     $config = Pimcore\Config::getSystemConfig();
     $this->validLanguages = explode(",", $config->general->validLanguages);
     $this->view->headTitle()->setSeparator(" " . "|" . " ");
     if (\Zend_Registry::isRegistered("Zend_Locale")) {
         $locale = \Zend_Registry::get("Zend_Locale");
     } else {
         $locale = new \Zend_Locale();
         if (!in_array($locale->getLanguage(), $this->validLanguages)) {
             $locale = new \Zend_Locale("en_EN");
         }
         \Zend_Registry::set("Zend_Locale", $locale);
     }
     $this->view->language = $locale->getLanguage();
     $this->language = $locale->getLanguage();
     $this->view->addHelperPath(PIMCORE_WEBSITE_PATH . '/lib/Website/Helper/View', 'Website\\Helper\\View');
     $this->addScriptAndCss();
     $this->enableLayout();
 }
コード例 #6
0
 public function init()
 {
     parent::init();
     if ($this->_getParam("language") && \Zend_Locale::isLocale($this->_getParam("language"))) {
         $locale = new \Zend_Locale($this->_getParam("language"));
         \Zend_Registry::set("Zend_Locale", $locale);
     }
     if (\Zend_Auth::getInstance()->hasIdentity()) {
         $ident = \Zend_Auth::getInstance()->getIdentity();
         $member = User::getById($ident['oid']);
         $this->currentMember = $member;
         $this->view->currentMember = $member;
     }
     if (\Zend_Registry::isRegistered("Zend_Locale")) {
         $locale = \Zend_Registry::get("Zend_Locale");
     } else {
         $locale = new \Zend_Locale("en");
         \Zend_Registry::set("Zend_Locale", $locale);
     }
     $this->view->language = (string) $locale;
     $this->language = (string) $locale;
 }
コード例 #7
0
ファイル: Action.php プロジェクト: sgabison/website
 public function init()
 {
     parent::init();
     $this->createWebsiteSession("SITE");
     $this->storeLanguage();
 }