22 $vars[
'class'][] =
'elgg-input-dropdown';
27 'options_values' => array(),
34 unset(
$vars[
'options_values']);
37 unset(
$vars[
'options']);
41 unset(
$vars[
'value']);
46 if (
$vars[
'multiple'] && !empty(
$vars[
'name']) && is_string(
$vars[
'name'])) {
47 if (substr(
$vars[
'name'], -2) !=
'[]') {
57 $option_attrs = array(
58 'value' => $opt_value,
59 'selected' => in_array((
string)$opt_value,
$value),
68 $option_attrs = [
'selected' => in_array((
string)$option,
$value)];
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
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.