コード例 #1
0
ファイル: PluginTest.php プロジェクト: nvdnkpr/Enlight
 /**
  * Test case
  */
 public function testTemplateExists()
 {
     $result = $this->manager->templateExists('index.tpl');
     $this->assertEquals('success', $result);
     $result = $this->manager->fetch('string:{if {"index.tpl"|template_exists}}true{/if}');
     $this->assertEquals('true', $result);
     $result = $this->manager->fetch('string:{if {"test.tpl"|template_exists}}true{else}false{/if}');
     $this->assertEquals('false', $result);
 }
コード例 #2
0
ファイル: Default.php プロジェクト: ClaudioThomas/shopware-4
 /**
  * Checks if the Enlight_Template_Manager stored the given template.
  * @param   $template_name
  * @return  bool
  */
 public function templateExists($template_name)
 {
     return $this->engine->templateExists($template_name);
 }