当前位置: 首页>>代码示例>>PHP>>正文


PHP CMS::views_path方法代码示例

本文整理汇总了PHP中CMS::views_path方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS::views_path方法的具体用法?PHP CMS::views_path怎么用?PHP CMS::views_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMS的用法示例。


在下文中一共展示了CMS::views_path方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setup

 public function setup()
 {
     if (CMS::vars()->storage_type() == 'orm') {
         $this->orm_name = 'vars';
     }
     if (CMS::vars()->storage_type() == 'storage') {
         $this->storage_name = 'vars';
     }
     $this->merge_options();
     Templates_HTML::add_scripts_settings(array('adminvars' => $this->js_config));
     $this->auth_realm = CMS::$admin_realm;
     if (isset(CMS::$cfg->vars->use_tinymce)) {
         $s = trim(CMS::$cfg->vars->use_tinymce);
         if ($s == '' || $s == '0') {
             $this->use_tinymce = false;
         }
     }
     $this->use_views_from(CMS::views_path('admin/vars'))->use_views_from(CMS::views_path('admin/vars2'));
     if (CMS::vars()->storage_type() == 'orm') {
         $types = WS::env()->orm->vars->types();
         $this->form_fields = $types->fields;
         $types->end();
     }
     if (CMS::vars()->storage_type() == 'storage') {
         $this->form_fields = $this->storage()->make_entity()->fields();
         // var_dump($this->form_fields);
     }
     $this->component = WS::env()->adminvars->component;
     //TODO: configure fields
     if (empty($this->tree_fields)) {
         $this->tree_fields = array('title' => array('caption' => 'Комментарий', 'flex' => 1), 'var_description' => array('caption' => 'Тип', 'flex' => 1), 'full_code' => array('caption' => 'Идентификатор', 'width' => 200));
     }
     return parent::setup();
 }
开发者ID:techart,项目名称:tao,代码行数:34,代码来源:TreeAdminVars.php

示例2: setup

 public function setup()
 {
     $this->auth_realm = CMS::$admin_realm;
     if (isset(CMS::$cfg->vars->use_tinymce)) {
         $s = trim(CMS::$cfg->vars->use_tinymce);
         if ($s == '' || $s == '0') {
             $this->use_tinymce = false;
         }
     }
     return parent::setup()->use_views_from(CMS::views_path('admin/vars'));
 }
开发者ID:techart,项目名称:tao,代码行数:11,代码来源:AdminVars.php

示例3: setup

 public function setup()
 {
     $this->orm_module = $this->getp('orm_module');
     $this->admin_module = $this->getp('admin_module');
     $this->schema_module = $this->getp('schema_module');
     $this->orm_fields = $this->getp('orm_fields');
     $this->admin_fields = $this->getp('admin_fields');
     $this->component = $this->getp('component');
     $this->component_module = "Component.{$this->component}";
     $this->admin_tabs = (bool) $this->getp('admin_tabs', 0);
     $this->item_name = "{$this->orm_module}.Item";
     $this->urls = WS::env()->urls->cmscomponentfactory;
     $this->auth_realm = CMS::$admin_realm;
     return parent::setup()->use_views_from(CMS::views_path('admin/factory'))->render_defaults('tables', 'urls', 'table', 'fields', 'key_field');
 }
开发者ID:techart,项目名称:tao,代码行数:15,代码来源:Factory.php

示例4: embedded_admin_menu

 /**
  * @return string
  */
 static function embedded_admin_menu($style = '')
 {
     $menu = CMS::navigation()->admin();
     if (!$menu || $menu->count() == 0) {
         return '';
     }
     ob_start();
     if (IO_FS::exists(CMS::app_path('views/embedded-admin-menu.phtml'))) {
         include CMS::app_path('views/embedded-admin-menu.phtml');
     } else {
         include CMS::views_path('embedded-admin-menu.phtml');
     }
     $contents = ob_get_contents();
     ob_end_clean();
     return $contents;
 }
开发者ID:techart,项目名称:tao,代码行数:19,代码来源:Admin.php

示例5: draw

 static function draw($e)
 {
     $title = 'Exception';
     include CMS::views_path('exception.phtml');
 }
开发者ID:techart,项目名称:tao,代码行数:5,代码来源:ExceptionCatcher.php

示例6: templates_dir

 protected function templates_dir()
 {
     return CMS::views_path('admin/stockroom');
 }
开发者ID:techart,项目名称:tao,代码行数:4,代码来源:Stockroom.php

示例7: configure_paths

 protected static function configure_paths()
 {
     $path_info = IO_FS::Path(__FILE__);
     self::$libpath = $path_info->dirname;
     self::$taopath = rtrim(self::$libpath, '/');
     self::$taopath = preg_replace('{[a-z0-9_-]+$}i', '', self::$taopath);
     self::$taopath = rtrim(self::$taopath, '/');
     self::$stdfiles_path = self::$taopath . '/files';
     self::$views_path = self::$taopath . '/views';
     self::check_assets();
     if ($m = Core_Regexps::match_with_results('{/([^/]+)$}', rtrim($_SERVER['DOCUMENT_ROOT'], '/'))) {
         CMS::$www = $m[1];
     }
 }
开发者ID:techart,项目名称:tao,代码行数:14,代码来源:CMS.php

示例8: templates_dir

 public function templates_dir()
 {
     return CMS::views_path('admin/vars2');
 }
开发者ID:techart,项目名称:tao,代码行数:4,代码来源:Controller.php

示例9: template

 public function template($template)
 {
     if (!Core_Regexps::match('{\\.phtml$}', $template)) {
         $template .= '.phtml';
     }
     if ($template[0] == '.' || $template[0] == '/') {
         return $template;
     }
     if ($t = $this->redefined_template($template)) {
         return $t;
     }
     $tpl = CMS::views_path('admin/table2/' . $template);
     if (is_file($tpl)) {
         return $tpl;
     }
     if ($this->view_exists($template)) {
         return $this->view_path_for($template);
     }
     return $tpl;
 }
开发者ID:techart,项目名称:tao,代码行数:20,代码来源:Table.php


注:本文中的CMS::views_path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。