function theme_select2widget_options_none in Select2 Field Widget 7
Same name and namespace in other branches
- 7.2 select2widget.module \theme_select2widget_options_none()
Returns HTML for the label for the empty value that are not required.
The default theme will display N/A for a radio list and '- None -' for a select.
Parameters
array $variables: An associative array containing:
- instance: An array representing the widget requesting the options.
Return value
string "None" string for select
1 theme call to theme_select2widget_options_none()
- _select2widget_options_get_options in ./
select2widget.module - Collects the options for a field.
File
- ./
select2widget.module, line 227 - Select2Widget module functionality.
Code
function theme_select2widget_options_none($variables) {
$instance = $variables['instance'];
$option = $variables['option'];
$output = '';
switch ($instance['widget']['type']) {
case 'select2widget':
$output = $option == 'option_none' ? t('- None -') : t('- Select a value -');
break;
}
return $output;
}