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


PHP CMS::field_type方法代码示例

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


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

示例1: initialize

 static function initialize($config)
 {
     //TODO: автоматически регистрировать тепы из CMS.Fields.Types.*
     CMS::field_type('input', 'CMS.Fields.Types.Input');
     CMS::field_type('hidden', 'CMS.Fields.Types.Hidden');
     CMS::field_type('radio', 'CMS.Fields.Types.Radio');
     CMS::field_type('checkbox', 'CMS.Fields.Types.Checkbox');
     CMS::field_type('select', 'CMS.Fields.Types.Select');
     CMS::field_type('textarea', 'CMS.Fields.Types.Textarea');
     CMS::field_type('sqldate', 'CMS.Fields.Types.SQLDate');
     CMS::field_type('datestr', 'CMS.Fields.Types.DateStr');
     CMS::field_type('sqldatestr', 'CMS.Fields.Types.SQLDateStr');
     CMS::field_type('upload', 'CMS.Fields.Types.Upload');
     CMS::field_type('ajaxupload', 'CMS.Fields.Types.AjaxUpload');
     CMS::field_type('subheader', 'CMS.Fields.Types.Subheader');
     CMS::field_type('email', 'CMS.Fields.Types.Email');
     CMS::field_type('attaches', 'CMS.Fields.Types.Attaches');
     CMS::field_type('image', 'CMS.Fields.Types.Image');
     CMS::field_type('protect', 'CMS.Fields.Types.Protect');
     CMS::field_type('html', 'CMS.Fields.Types.HTML');
     CMS::field_type('wiki', 'CMS.Fields.Types.Wiki');
     CMS::field_type('gallery', 'CMS.Fields.Types.Gallery');
     CMS::field_type('parms', 'CMS.Fields.Types.Parms');
     CMS::field_type('tree_select', 'CMS.Fields.Types.TreeSelect');
     CMS::field_type('multivalue', 'CMS.Fields.Types.Multivalue');
     CMS::field_type('multilink', 'CMS.Fields.Types.Multilink');
     CMS::field_type('static_multilink', 'CMS.Fields.Types.StaticMultilink');
     CMS::field_type('checkboxes', 'CMS.Fields.Types.Checkboxes');
     CMS::field_type('autocomplete', 'CMS.Fields.Types.Autocomplete');
     CMS::field_type('content', 'CMS.Fields.Types.Content');
     CMS::field_type('documents', 'CMS.Fields.Types.Documents');
     CMS::field_type('documents_grid', 'CMS.Fields.Types.DocumentsGrid');
     CMS::field_type('youtube', 'CMS.Fields.Types.Youtube');
     CMS::field_type('map_coords', 'CMS.Fields.Types.MapCoords');
     CMS::field_type('fieldset', 'CMS.Fields.Types.FieldSet');
     CMS::field_type('array', 'CMS.Fields.Types.Array');
     CMS::field_type('tags', 'CMS.Fields.Types.Tags');
     CMS::field_type('iframe', 'CMS.Fields.Types.IFrame');
     CMS::field_type('multilang_ext', 'CMS.Fields.Types.ExtendedMultilang');
 }
开发者ID:techart,项目名称:tao,代码行数:40,代码来源:Fields.php

示例2: process_component_config

 protected function process_component_config($config_name = 'component')
 {
     $config = $this->config($config_name);
     // TODO: split to methods
     if (isset($config->admin_menu)) {
         $menu = (object) $config->admin_menu;
         CMS_Admin::menu($menu->caption, $menu->path, $menu->items, $menu->icon);
     }
     if (isset($config->templates)) {
         $helpers = $config->templates['helpers'];
         Templates_HTML::use_helpers($helpers);
     }
     if (isset($config->field_types)) {
         $types = $config->field_types;
         foreach ($types as $name => $class) {
             CMS::field_type($name, $class);
         }
     }
     if (isset($config->commands)) {
         $commands = $config->commands;
         foreach ($commands as $chapter => $data) {
             $args = array_merge(array($chapter, $data['name'], $data['callback']), isset($data['args']) ? $data['args'] : array());
             call_user_func_array(array('CMS', 'add_command'), $args);
         }
     }
     if (isset($config->insertions)) {
         $insertions = $config->insertions;
         foreach ($insertions as $ins) {
             $args = array_merge(array($ins['class']), $ins['names']);
             call_user_func_array(array('CMS', 'register_insertions'), $args);
         }
     }
     if (isset($config->events)) {
         $events = $config->events;
         foreach ($events as $name => $callback) {
             Events::add_listener($name, $callback);
         }
     }
     if (isset($config->orm)) {
         $orm = $config->orm;
         foreach ($orm as $name => $class) {
             CMS::orm()->submapper($name, $class);
         }
     }
 }
开发者ID:techart,项目名称:tao,代码行数:45,代码来源:Component.php

示例3: initialize

 public static function initialize()
 {
     CMS::field_type('varcode', 'CMS.Vars.Fields.Code');
 }
开发者ID:techart,项目名称:tao,代码行数:4,代码来源:Fields.php


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