コード例 #1
0
 function test_render_throw_on_file_not_found()
 {
     $context = new test_MockContext();
     $template = new k_Template("some/path/which/cant/possibly/exist/../or/so/i/hope");
     try {
         $template->render($context);
         $this->fail("Expected exception not thrown");
     } catch (Exception $ex) {
         $this->pass("Exception caught");
     }
 }
コード例 #2
0
ファイル: index.php プロジェクト: RussellDias/konstrukt
 function renderHtml()
 {
     $template = new k_Template(dirname(__FILE__) . '/template.php');
     return $template->render($this);
 }
コード例 #3
0
ファイル: index.php プロジェクト: RussellDias/konstrukt
 function renderHtml()
 {
     $t = new k_Template('templates/' . $this->template);
     return $t->render($this, array('collection' => $this->getPaginator(), 'order_asc' => $this->query('order') == 'asc', 'sort' => $this->query('sort'), 'keys' => $this->getKeys(), 'pages' => $this->getPaginator()->getPages()));
 }
コード例 #4
0
ファイル: list.php プロジェクト: Tobbe/lsinfo
 function renderHtml()
 {
     $this->document->setTitle('Articles');
     $t = new k_Template('templates/articles-list.tpl.php');
     return $t->render($this, array('articles' => $this->articles->all()));
 }
コード例 #5
0
ファイル: entity.php プロジェクト: Tobbe/lsinfo
 function renderHtml()
 {
     $this->document->setTitle($this->article->title());
     $t = new k_Template("templates/articles-entity.tpl.php");
     return $t->render($this, array('article' => $this->article));
 }
コード例 #6
0
ファイル: list.php プロジェクト: harrysame/PHP-MySQL
 function renderHtml()
 {
     $this->document->setTitle("Contacts");
     $t = new k_Template("templates/contacts-list.tpl.php");
     return $t->render($this, array('contacts' => $this->contacts->all()));
 }
コード例 #7
0
ファイル: entity.php プロジェクト: Tobbe/lsinfo
 function renderHtml()
 {
     $this->document->setTitle($this->questionAnswer->question());
     $t = new k_Template('templates/faq-entity.tpl.php');
     return $t->render($this, array('qa' => $this->questionAnswer));
 }
コード例 #8
0
ファイル: list.php プロジェクト: Tobbe/lsinfo
 function renderHtml()
 {
     $this->document->setTitle("FAQ");
     $t = new k_Template("templates/faq-list.tpl.php");
     return $t->render($this, array('faq' => $this->faq->all()));
 }
コード例 #9
0
ファイル: entity.php プロジェクト: harrysame/PHP-MySQL
 function renderHtmlEdit()
 {
     $this->document->setTitle("Edit " . $this->contact->full_name());
     $t = new k_Template("templates/contacts-entity-edit.tpl.php");
     return new k_HtmlResponse($t->render($this, array('contact' => $this->contact)));
 }
コード例 #10
0
ファイル: root.php プロジェクト: RussellDias/konstrukt
 function renderHtml()
 {
     $t = new k_Template("templates/root.tpl.php");
     return $t->render($this);
 }
コード例 #11
0
ファイル: wrapper.tpl.php プロジェクト: vih/vih.dk
<div id="content-main" style="<?php 
if (!empty($widepicture)) {
    e('background-image: url(' . $widepicture) . ')';
}
?>
">
    <?php 
echo $content;
?>
</div>
<div id="col3">
    <h2>Sidelinjen<em></em></h2>
    <div class="col3inner">
    <?php 
$news = array('nyheder' => VIH_News::getList(2));
$tpl = new k_Template(dirname(__FILE__) . '/News/sidebar-featured.tpl.php');
echo $tpl->render($context, $news);
?>
    </div>
</div>