コード例 #1
0
ファイル: ViewTest.php プロジェクト: nvdnkpr/Enlight
 /**
  * Sets up
  */
 public function setUp()
 {
     $tempDir = Enlight_TestHelper::Instance()->TestPath('TempFiles');
     $this->engine = new Enlight_Template_Manager();
     $this->engine->setCompileDir($tempDir);
     $this->engine->setCompileId('view');
     $this->engine->clearCompiledTemplate(null, 'view');
     Smarty::$global_tpl_vars = array();
 }
コード例 #2
0
ファイル: PluginTest.php プロジェクト: nvdnkpr/Enlight
 /**
  * Set up the test case
  */
 public function setUp()
 {
     parent::setUp();
     $tempDir = Enlight_TestHelper::Instance()->TestPath('TempFiles');
     $dataDir = Enlight_TestHelper::Instance()->TestPath('DataSets');
     $this->manager = new Enlight_Template_Manager();
     $this->manager->setCompileDir($tempDir);
     $this->manager->setCompileId('resource');
     $this->manager->setTemplateDir(array($dataDir . 'Template/parent1/', $dataDir . 'Template/parent2/'));
 }
コード例 #3
0
ファイル: ResourceTest.php プロジェクト: nvdnkpr/Enlight
 /**
  * Set up the test case
  */
 public function setUp()
 {
     parent::setUp();
     $tempDir = Enlight_TestHelper::Instance()->TestPath('TempFiles');
     $adapter = new Enlight_Config_Adapter_File(array('configType' => 'ini', 'configDir' => $tempDir, 'namePrefix' => 'snippet_'));
     $this->manager = new Enlight_Components_Snippet_Manager($adapter);
     $this->engine = new Enlight_Template_Manager();
     $this->engine->setCompileDir($tempDir);
     $this->engine->setCompileId('snippet');
     $this->engine->clearCompiledTemplate(null, 'snippet');
 }
コード例 #4
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']);
 }