本文整理汇总了PHP中CMS::view方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS::view方法的具体用法?PHP CMS::view怎么用?PHP CMS::view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMS
的用法示例。
在下文中一共展示了CMS::view方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* @param int $page
* @param int $numpages
* @param string $url_template
*
* @return string
*/
static function run($page, $numpages, $tpl)
{
if ($numpages < 2) {
return '';
}
self::$url_template = $tpl;
self::$current = $page;
ob_start();
if (IO_FS::exists(self::$template)) {
include self::$template;
} else {
include CMS::view('page-navigator.phtml');
}
$out = ob_get_clean();
return $out;
}
示例2: admin_menu
/**
* @param string $access
*
* @return string
*/
static function admin_menu($access = 'full')
{
if (!CMS::$globals[$access]) {
return '';
}
ob_start();
$tpl = self::$admin_menu_tpl . '.phtml';
if (IO_FS::exists("../app/views/{$tpl}")) {
include "../app/views/{$tpl}";
} else {
include CMS::view("{$tpl}");
}
$content = ob_get_clean();
return $content;
}
示例3: field_template_path
protected function field_template_path($name)
{
$f = "{$name}.phtml";
if (file_exists($f)) {
return $f;
}
$f = CMS::app_view("admin/table/fields/{$name}.phtml");
if (file_exists($f)) {
return $f;
}
$f = CMS::view("admin/table/fields/{$name}.phtml");
if (file_exists($f)) {
return $f;
}
return CMS::view('admin/table/fields/input.phtml');
}
示例4: draw
public function draw($template = 'simple', $parms = array())
{
//var_dump($this);
$this->links = $this->sub();
if (!$this->links) {
$this->links = new ArrayObject();
}
ob_start();
$filename1 = CMS_Navigation2::$tpl_path . "/{$template}.phtml";
$filename2 = CMS::view("navigation/{$template}.phtml");
if (IO_FS::exists($filename1)) {
include $filename1;
} else {
if (IO_FS::exists($filename2)) {
include $filename2;
}
}
return ob_get_clean();
}
示例5: generate
public function generate()
{
$tree = $this->data;
ob_start();
include CMS::view('admin/table/layout-tree.phtml');
$rc = ob_get_contents();
ob_end_clean();
return $rc;
}
示例6: draw
public function draw($template = 'simple', $parms = array())
{
ob_start();
$filename1 = CMS_Navigation3::$tpl_path . "/{$template}.phtml";
$filename2 = CMS::view("navigation/{$template}.phtml");
if (IO_FS::exists($filename1)) {
include $filename1;
} else {
if (IO_FS::exists($filename2)) {
include $filename2;
}
}
return ob_get_clean();
}
示例7: tpl
static function tpl($tpl)
{
$t = CMS::app_view("insertions/{$tpl}.phtml");
if (IO_FS::exists($t)) {
return $t;
}
return CMS::view("insertions/{$tpl}.phtml");
}
示例8: jsprotect
/**
* @param string $field
* @param string $page
*/
public function jsprotect($field, $page = '')
{
$keystring = self::key($page);
ob_start();
if (IO_FS::exists('../app/views/jsprotect.phtml')) {
include '../app/views/jsprotect.phtml';
} else {
include CMS::view('jsprotect.phtml');
}
$content = ob_get_clean();
return $content;
}