• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JCckPluginField类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onCCK_FieldPrepareStore

 public function onCCK_FieldPrepareStore(&$field, $value = '', &$config = array(), $inherit = array(), $return = false)
 {
     if (self::$type != $field->type) {
         return;
     }
     // Init
     if (count($inherit)) {
         $name = isset($inherit['name']) && $inherit['name'] != '' ? $inherit['name'] : $field->name;
     } else {
         $name = $field->name;
     }
     $dispatcher = JDispatcher::getInstance();
     // Prepare
     $store = '';
     $text = '';
     $xi = 0;
     if (count($value)) {
         $store = '<br />';
         foreach ($value as $key => $val) {
             $store .= '<br />::cck_' . $name . '::' . $field->extended . '::/cck_' . $name . '::';
             $text .= '- ' . $field->label . ' ' . $xi . ': <ul style="line-height:10px;">';
             $fields = self::_getChildren($field, $config);
             if (count($fields)) {
                 foreach ($fields as $f) {
                     $f->storage = $field->storage;
                     $f->storage_table = $field->storage_table;
                     $f->storage_field = $field->storage_field;
                     $f->state = '';
                     //todo;
                     $f_label = $f->label;
                     $f_name = $f->name;
                     $f_value = @$val[$f_name];
                     $inherit = array('xk' => $key, 'xi' => $xi, 'parent' => $name, 'array_x' => 1, 'post' => $val);
                     $results = $dispatcher->trigger('onCCK_FieldPrepareStore', array(&$f, $f_value, &$config, $inherit, true));
                     $v = $results[0];
                     $store .= '<br />::' . $f_name . '|' . $xi . '|' . $name . '::' . $v . '::/' . $f_name . '|' . $xi . '|' . $name . '::';
                     $text .= '<li style="line-height:10px;">' . $f_label . ' : ' . $v . '</li>';
                     // todo: add childs (secondary) storages.. not primary!
                 }
             }
             $store .= '<br />::cckend_' . $name . '::::/cckend_' . $name . '::';
             $text .= '</ul>';
             $xi++;
         }
         $store .= '<br />';
     }
     $value = $xi;
     $field->value = $value;
     $field->text = $text;
     parent::g_onCCK_FieldPrepareStore_X($field, $name, $value, $store, $config);
 }
开发者ID:codigoaberto,项目名称:SEBLOD,代码行数:51,代码来源:group_x.php


示例2: onCCK_FieldRenderForm

 public static function onCCK_FieldRenderForm($field, &$config = array())
 {
     return parent::g_onCCK_FieldRenderForm($field);
 }
开发者ID:olafzieger,项目名称:joomla3.x-seblod-test,代码行数:4,代码来源:jform_menuitem.php


示例3: onCCK_FieldRenderForm

 public static function onCCK_FieldRenderForm(&$field, &$config = array())
 {
     $field->markup = 'none';
     return parent::g_onCCK_FieldRenderForm($field);
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:5,代码来源:div.php


示例4: getValueFromOptions

 public static function getValueFromOptions($field, $value, $config = array())
 {
     // Init
     $options2 = JCckDev::fromJSON($field->options2);
     $divider = '';
     $lang_code = '';
     $value2 = '';
     // Prepare
     self::_languageDetection($lang_code, $value2, $options2);
     if ($field->bool3) {
         $divider = $field->divider != '' ? $field->divider : ',';
     }
     $options_2 = self::_getOptionsList($options2, $field->bool2, $lang_code);
     $field->options = $field->options ? $field->options . '||' . $options_2 : $options_2;
     return parent::getValueFromOptions($field, $value, $config);
 }
开发者ID:hamby,项目名称:SEBLOD,代码行数:16,代码来源:select_dynamic.php


示例5: onCCK_FieldPrepareStore

 public function onCCK_FieldPrepareStore(&$field, $value = '', &$config = array(), $inherit = array(), $return = false)
 {
     if (self::$type != $field->type) {
         return;
     }
     // Init
     if (count($inherit)) {
         $name = isset($inherit['name']) && $inherit['name'] != '' ? $inherit['name'] : $field->name;
     } else {
         $name = $field->name;
     }
     $value = isset($config['post'][$name . '_hidden']) ? $config['post'][$name . '_hidden'] : $value;
     $dispatcher = JDispatcher::getInstance();
     // Prepare
     $store = '';
     $xk = 0;
     $xi = 0;
     if (count($value)) {
         $store = '<br />';
         //begin?
         $f = self::_getChild($field, $config);
         $f_name = $f->name;
         $f->state = '';
         //todo;
         foreach ($value as $val) {
             //if ( $val != '' ) {
             $inherit = array('name' => $name, 'xk' => $xk, 'xi' => $xi, 'parent' => $name);
             $results = $dispatcher->trigger('onCCK_FieldPrepareStore', array(&$f, $val, &$config, $inherit, true));
             $v = $results[0];
             if ($v != '') {
                 $store .= '<br />::' . $f_name . '|' . $xi . '|' . $name . '::' . $v . '::/' . $f_name . '|' . $xi . '|' . $name . '::';
                 $xi++;
             }
             // todo: add childs (secondary) storages.. not primary!
             //}
             $xk++;
         }
         $store .= '<br />';
         //end?
     }
     $value = $xi;
     $field->value = $value;
     parent::g_onCCK_FieldPrepareStore_X($field, $name, $value, $store, $config);
 }
开发者ID:hamby,项目名称:SEBLOD,代码行数:44,代码来源:field_x.php


示例6: onCCK_FieldPrepareForm

 public function onCCK_FieldPrepareForm(&$field, $value = '', &$config = array(), $inherit = array(), $return = false)
 {
     if (self::$type != $field->type) {
         return;
     }
     self::$path = parent::g_getPath(self::$type . '/');
     parent::g_onCCK_FieldPrepareForm($field, $config);
     // Init
     if (count($inherit)) {
         $id = isset($inherit['id']) && $inherit['id'] != '' ? $inherit['id'] : $field->name;
         $name = isset($inherit['name']) && $inherit['name'] != '' ? $inherit['name'] : $field->name;
     } else {
         $id = $field->name;
         $name = $field->name;
     }
     // Prepare
     $dispatcher = JDispatcher::getInstance();
     $fields = self::_getChildren($field, $config);
     $xn = $value ? $value : $field->rows;
     $form = array();
     for ($xi = 0; $xi < $xn; $xi++) {
         foreach ($fields as $f) {
             if (is_object($f)) {
                 $f_name = $f->name;
                 $f_value = '';
                 if ($config['pk']) {
                     $table = $f->storage_table;
                     if ($table && !isset($config['storages'][$table])) {
                         $config['storages'][$table] = '';
                         $dispatcher->trigger('onCCK_Storage_LocationPrepareForm', array(&$f, &$config['storages'][$table], $config['pk']));
                     }
                     $dispatcher->trigger('onCCK_StoragePrepareForm_Xi', array(&$f, &$f_value, &$config['storages'][$table], $name, $xi));
                 } elseif ($f->live) {
                     $dispatcher->trigger('onCCK_Field_LivePrepareForm', array(&$f, &$f_value, &$config));
                 }
                 $inherit = array();
                 $clone = clone $f;
                 $results = $dispatcher->trigger('onCCK_FieldPrepareForm', array(&$clone, $f_value, &$config, $inherit, true));
                 $form[$f_name] = $results[0];
                 @($form[$f_name]->name = $f->name);
                 $config['fields'][$f->name] = $form[$f_name];
             }
         }
     }
     // Set
     $field->form = $form;
     $field->value = '';
 }
开发者ID:hamby,项目名称:SEBLOD,代码行数:48,代码来源:group.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JClientFtp类代码示例发布时间:2022-05-23
下一篇:
PHP JCckDevHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap