本文整理汇总了PHP中TemplateEngine::display方法的典型用法代码示例。如果您正苦于以下问题:PHP TemplateEngine::display方法的具体用法?PHP TemplateEngine::display怎么用?PHP TemplateEngine::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TemplateEngine
的用法示例。
在下文中一共展示了TemplateEngine::display方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render()
{
$template = new TemplateEngine($this->filepath);
$template->set($this->templateData);
$template->setGlobals($this->templateGlobals);
$template->display();
if (isset($_GET['DEBUG'])) {
echo '<pre>';
var_dump($this->templateData);
echo '</pre>';
}
}
示例2: display
/** Display output of TSunic
*
* Call this function to display the output of TSunic.
* If you call this function from an ajax request, it will return xml output
*
* @param string $template
* Request output of certain template only
*
* @return bool
*/
public function display($template = false)
{
// validate template
if (empty($template)) {
$template = $this->Input->get('tmpl');
// is tmpl?
if (empty($template)) {
$template = '$$$html';
}
}
// display templates
if (!$this->isAjax()) {
$this->Tmpl->display($template);
} else {
$this->Tmpl->responseAjax();
}
return true;
}
示例3: redirectURI
} else {
$isAdmin = 0;
if ($user != null && $user->checkPermissions(0, 0, 0, 1, 1)) {
// wenn ORDERER
redirectURI("/orderer/index.php");
}
if ($user != null && $user->checkPermissions(0, 0, 1)) {
// wenn USER
redirectURI("/user/index.php");
}
}
$LOG = new Log();
$tpl = new TemplateEngine("template/viewProduct.html", "template/frame.html", $lang["viewer_viewProduct"]);
$LOG->write('3', 'viewer/viewProduct.php');
$pID = $_GET['pID'];
$tpl->assign('ID', $pID);
//Produktdaten
$product_query = DB_query("SELECT\n\t\t\t\t*\n\t\t\t\tFROM products\n\t\t\t\tWHERE products_id = " . $pID . "\n\t\t\t\tAND deleted = 0\n\t\t\t\tORDER BY sort_order, name\n\t\t\t\t");
$product = DB_fetchArray($product_query);
$tpl->assign('name', $product['name']);
$tpl->assign('description', $product['description']);
//$tpl->assign('sort_order',$product['sort_order']);
$tpl->assign('active', $product['active']);
// zur Unterscheidung, ob anzeigbar, weiterhin mitliefern
$tpl->assign('image_small', $product['image_small']);
$tpl->assign('image_big', $product['image_big']);
$tpl->assign('stock', $product['stock']);
$tpl->assign('price', $product['price']);
$tpl->assign('is_admin', $isAdmin);
$tpl->display();
示例4: display
/**
* Helper function: Avoids having to call $theme->template_engine->display( 'template_name' );
* @param string $template_name The name of the template to display
*/
public function display($template_name)
{
$this->play_var_stack();
$this->template_engine->assign('theme', $this);
$this->template_engine->display($template_name);
}
示例5: display
/**
* 显示模版
*
* @param null $templateFile
*/
protected function display($templateFile = null)
{
$path = $this->setTemplatePath($templateFile);
file_exists($path) or Halt($path . '模版文件不存在');
$this->assign('__PUBLIC__', __PUBLIC__ . '/');
$this->assign('__UPLOAD__', __UPLOAD__ . '/');
if (C('TEMPLATE_ENGINE_START')) {
parent::display($path);
} else {
extract($this->vars);
include $path;
}
}