當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CMS::view方法代碼示例

本文整理匯總了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;
 }
開發者ID:techart,項目名稱:tao,代碼行數:23,代碼來源:PageNavigator.php

示例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;
 }
開發者ID:techart,項目名稱:tao,代碼行數:20,代碼來源:Admin.php

示例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');
 }
開發者ID:techart,項目名稱:tao,代碼行數:16,代碼來源:AdminTable.php

示例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();
 }
開發者ID:techart,項目名稱:tao,代碼行數:19,代碼來源:Navigation2.php

示例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;
 }
開發者ID:techart,項目名稱:tao,代碼行數:9,代碼來源:AdminTableBase.php

示例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();
 }
開發者ID:techart,項目名稱:tao,代碼行數:14,代碼來源:Navigation3.php

示例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");
 }
開發者ID:techart,項目名稱:tao,代碼行數:8,代碼來源:Insertions.php

示例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;
 }
開發者ID:techart,項目名稱:tao,代碼行數:16,代碼來源:Protect.php


注:本文中的CMS::view方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。