function widgets_set_options in Widgets 7
Get an array of widget sets suitable for using as select list options.
Parameters
$include_empty: If TRUE a <none> option will be inserted in the options array.
Return value
Array of widget sets both key and value are set to set name.
1 call to widgets_set_options()
- widgets_set_delete_form in ./
widgets.admin.inc - Form builder; Form for deleting an widget set.
File
- ./
widgets.module, line 627 - Exposes global functionality for creating widget sets.
Code
function widgets_set_options($include_empty = TRUE) {
$sets = widgets_sets();
$options = array();
if ($include_empty && !empty($sets)) {
$options[''] = t('<none>');
}
$options = array_merge($options, drupal_map_assoc(array_keys($sets)));
if (empty($options)) {
$options[''] = t('No defined sets');
}
return $options;
}