本文整理汇总了PHP中JCckDevHelper::secureField方法的典型用法代码示例。如果您正苦于以下问题:PHP JCckDevHelper::secureField方法的具体用法?PHP JCckDevHelper::secureField怎么用?PHP JCckDevHelper::secureField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JCckDevHelper
的用法示例。
在下文中一共展示了JCckDevHelper::secureField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onCCK_FieldPrepareForm
//.........这里部分代码省略.........
}
if ($optgroups !== false) {
$opts[] = JHtml::_('select.option', '</OPTGROUP>');
}
if ($field->bool4 == 2 || $field->bool4 == 3) {
if ($field->bool4 == 3) {
if ($static > 1 && isset($current) && isset($half) && isset($static) && isset($results)) {
for (; $current < $static; $current++) {
$opts[] = $results[$current];
}
}
} else {
$results = self::_getStaticOption($field, $field->options, $config);
foreach ($results as $result) {
$opts[] = $result;
}
}
}
$class = 'inputbox select' . $validate . ($field->css ? ' ' . $field->css : '');
if ($value != '') {
$class .= ' has-value';
}
$multi = @$field->bool3 ? ' multiple="multiple"' : '';
$size = !@$field->bool3 ? '1' : (@$field->rows ? $field->rows : count($opts));
$size = (int) $size > 1 ? ' size="' . $size . '"' : '';
$attr = 'class="' . $class . '"' . $size . $multi . ($field->attributes ? ' ' . $field->attributes : '');
$count = count($opts);
$form = '';
if ($field->variation == 'hidden_auto') {
if ($auto == $count && is_object($opts[$auto - 1])) {
$count = 0;
$field->variation = 'hidden';
$value = $opts[$auto - 1]->value;
if (!$field->live) {
JCckDevHelper::secureField($field, $value);
}
} else {
$field->variation = '';
}
}
if ($count) {
if ($attrib) {
$attr = array('id' => $id, 'list.attr' => $attr, 'list.select' => $value, 'list.translate' => false, 'option.attr' => 'data-cck', 'option.key' => 'value', 'option.text' => 'text');
$form = JHtml::_('select.genericlist', $opts, $name, $attr);
} else {
$form = JHtml::_('select.genericlist', $opts, $name, $attr, 'value', 'text', $value, $id);
}
}
/* tmp */
$jtext = $config['doTranslation'];
$config['doTranslation'] = 0;
/* tmp */
// Set
if (!$field->variation) {
$field->form = $form;
if ($field->script) {
parent::g_addScriptDeclaration($field->script);
}
} else {
$options_2 = self::_getOptionsList($options2, $field->bool2, $lang_code);
if ($field->options) {
if ($field->bool4 == 3) {
$current = 0;
$static_opts = explode('||', $field->options);
$static_opts1 = array();
$static_opts2 = array();
foreach ($static_opts as $static_opt) {
if ($current < $half) {
$static_opts1[] = $static_opt;
} else {
$static_opts2[] = $static_opt;
}
$current++;
}
$field->optionsList = implode('||', $static_opts1) . '||' . $options_2 . '||' . implode('||', $static_opts2);
} elseif ($field->bool4 == 2) {
$field->optionsList = $options_2 . '||' . $field->options;
} else {
$field->optionsList = $field->options . '||' . $options_2;
}
} else {
$field->optionsList = $options_2;
}
if ($field->bool4) {
$field->text = parent::g_getOptionText($value, $field->optionsList, $divider, $config);
} else {
$field->text = parent::g_getOptionText($value, $options_2, $divider, $config);
}
parent::g_getDisplayVariation($field, $field->variation, $value, $field->text, $form, $id, $name, '<select', '', '', $config);
}
/* tmp */
$config['doTranslation'] = $jtext;
/* tmp */
}
$field->value = $value;
// Return
if ($return === true) {
return $field;
}
}
示例2: array
} else {
if ($field->live) {
$dispatcher->trigger('onCCK_Field_LivePrepareForm', array(&$field, &$value, &$config));
if (!($field->variation == 'hidden_auto' || $field->variation == 'hidden_isfilled')) {
JCckDevHelper::secureField($field, $value);
}
} else {
$value = isset($lives[$name]) ? $lives[$name] : $field->live_value;
}
}
}
$field->value = $value;
if ($field->variation == 'hidden_isfilled') {
if ($value != '') {
$field->variation = 'hidden';
JCckDevHelper::secureField($field, $value);
} else {
$field->variation = '';
}
}
$dispatcher->trigger('onCCK_FieldPrepareForm', array(&$field, $value, &$config, array()));
$position = $field->position;
$positions[$position][] = $field->name;
// Was it the last one?
if ($config['error']) {
break;
}
}
// Merge
if (count($config['fields'])) {
$fields = array_merge($fields, $config['fields']);