Example #1
0
 /**
  * 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();
 }
Example #2
0
 /**
  * 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/'));
 }
Example #3
0
 /**
  * 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');
 }
Example #4
0
 /**
  * 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']);
 }