31 'options_values' => array(),
38 unset(
$vars[
'options_values']);
41 unset(
$vars[
'options']);
45 unset(
$vars[
'value']);
50 if (
$vars[
'multiple'] && !empty(
$vars[
'name']) && is_string(
$vars[
'name'])) {
51 if (substr(
$vars[
'name'], -2) !=
'[]') {
61 $option_attrs = array(
62 'value' => $opt_value,
63 'selected' => in_array((
string)$opt_value,
$value),
66 if (is_array($option)) {
68 unset($option[
'text']);
70 elgg_log(
'No text defined for input/select option with value "' . $opt_value .
'"',
'ERROR');
73 $option_attrs = array_merge($option_attrs, $option);
84 if (is_array($option)) {
86 unset($option[
'text']);
89 elgg_log(
'No text defined for input/select option',
'ERROR');
95 $option_attrs = array_merge($option_attrs, $option);
98 'selected' => in_array((
string)$option,
$value),
elgg_extract_class(array $array, $existing=[])
Extract class names from an array with key "class", optionally merging into a preexisting set...
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
if($vars['multiple']&&!empty($vars['name'])&&is_string($vars['name'])) $options_list
elgg echo
Translates a string.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_log($message, $level= 'NOTICE')
Display or log a message.