コード例 #1
0
ファイル: Document.php プロジェクト: GerDner/luck-docker
 /**
  * Initiate smarty template engine
  */
 protected function initTemplateEngine()
 {
     $this->_template = clone Shopware()->Template();
     $this->_view = $this->_template->createData();
     $path = basename($this->_subshop["doc_template"]);
     $this->_template->setTemplateDir(array('custom' => $path, 'local' => '_emotion_local', 'emotion' => '_emotion'));
     $this->_template->setCompileId(str_replace('/', '_', $path) . '_' . $this->_subshop['id']);
 }
コード例 #2
0
ファイル: sRewriteTable.php プロジェクト: GerDner/luck-docker
 /**
  * Sets up the environment for seo url calculation
  */
 public function baseSetup()
 {
     MemoryLimit::setMinimumMemoryLimit(1024 * 1024 * 512);
     @set_time_limit(0);
     $keys = array_keys($this->template->registered_plugins['function']);
     if (!in_array('sCategoryPath', $keys)) {
         $this->template->registerPlugin(Smarty::PLUGIN_FUNCTION, 'sCategoryPath', array($this, 'sSmartyCategoryPath'));
     }
     if (!in_array('createSupplierPath', $keys)) {
         $this->template->registerPlugin(Smarty::PLUGIN_FUNCTION, 'createSupplierPath', array($this, 'createSupplierPath'));
     }
     $this->data = $this->template->createData();
     $this->data->assign('sConfig', $this->config);
     $this->data->assign('sRouter', $this);
     $this->data->assign('sCategoryStart', Shopware()->Shop()->getCategory()->getId());
 }