function variable_build_options in Variable 7
Same name and namespace in other branches
- 7.2 variable.inc \variable_build_options()
Build variable with options
3 calls to variable_build_options()
- variable_format_options in ./
variable.variable.inc - Format options variable. Value is an array of options.
- variable_format_selection in ./
variable.variable.inc - Format select variable
- variable_form_element in ./
variable.form.inc - Build form element for a variable
File
- ./
variable.inc, line 116 - Variable API module. Extended API.
Code
function variable_build_options($variable, $options) {
$variable = variable_build_variable($variable, $options);
if (isset($variable['options callback'])) {
$variable['options'] = variable_callback($variable['options callback'], $variable, $options);
}
if (!empty($variable['options']) && !is_array($variable['options'])) {
$variable['options'] = variable_option_list($variable['options'], $variable, $options);
}
return $variable;
}