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


PHP JCckPluginField::g_getOptionText方法代码示例

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


在下文中一共展示了JCckPluginField::g_getOptionText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
     }
     $divider = '';
     $value2 = '';
     // Prepare
     if ($field->bool3) {
         // Set Multiple
         $divider = $field->divider != '' ? $field->divider : ',';
         if ($divider) {
             $nb = count($value);
             if (is_array($value) && $nb > 0) {
                 $value = implode($divider, $value);
             }
         }
     }
     /* tmp */
     $jtext = $config['doTranslation'];
     $config['doTranslation'] = 0;
     /* tmp */
     $options2 = JCckDev::fromJSON($field->options2);
     self::_languageDetection($lang_code, $value2, $options2);
     $options_2 = self::_getOptionsList($options2, $field->bool2, $lang_code);
     $field->options = $field->options ? $field->options . '||' . $options_2 : $options_2;
     // Validate
     $text = parent::g_getOptionText($value, $field->options, $divider, $config);
     parent::g_onCCK_FieldPrepareStore_Validation($field, $name, $value, $config);
     /* tmp */
     $config['doTranslation'] = $jtext;
     /* tmp */
     // Set or Return
     if ($return === true) {
         return $value;
     }
     $field->text = $text;
     $field->value = $value;
     parent::g_onCCK_FieldPrepareStore($field, $name, $value, $config);
 }
开发者ID:hamby,项目名称:SEBLOD,代码行数:46,代码来源:select_dynamic.php

示例2: 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;
     }
     $doTranslation = $config['doTranslation'];
     if ($config['doTranslation']) {
         $config['doTranslation'] = $field->bool8;
     }
     // Prepare
     $divider = $field->divider != '' ? $field->divider : ',';
     if ($divider) {
         $nb = count($value);
         if (is_array($value) && $nb > 0) {
             $value = implode($divider, $value);
         }
     }
     // Validate
     $text = parent::g_getOptionText($value, $field->options, $divider, $config);
     $config['doTranslation'] = $doTranslation;
     parent::g_onCCK_FieldPrepareStore_Validation($field, $name, $value, $config);
     // Set or Return
     if ($return === true) {
         return $value;
     }
     $field->text = $text;
     $field->value = $value;
     parent::g_onCCK_FieldPrepareStore($field, $name, $value, $config);
 }
开发者ID:pctechnikch,项目名称:SEBLOD,代码行数:35,代码来源:checkbox.php

示例3: 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;
     }
     $doTranslation = $config['doTranslation'];
     if ($config['doTranslation']) {
         $config['doTranslation'] = $field->bool8;
     }
     // Validate
     $text = parent::g_getOptionText($value, $field->options, '', $config);
     $config['doTranslation'] = $doTranslation;
     parent::g_onCCK_FieldPrepareStore_Validation($field, $name, $value, $config);
     // Set or Return
     // $field->text		=	$text;
     // $field->value	=	$value;
     if ($return === true) {
         return $value;
     }
     $field->text = $text;
     //todo: move up
     $field->value = $value;
     //todo: move up
     parent::g_onCCK_FieldPrepareStore($field, $name, $value, $config);
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:31,代码来源:select_simple.php


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