本文整理匯總了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;
}