function hook_list_option_info in List field predefined options 7
Provide information about available predefined list options.
Return value
An associative array whose keys define the machine name for each predefined list options and whose values contain the list options descriptions. Each list options description is itself an associative array, with the following key-value pairs:
- 'label': (required) The human-readable name of the list options.
- 'callback': (required) The name of the function that will return the list options.
See also
2 functions implement hook_list_option_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- list_predefined_options_get_list_option_info in ./
list_predefined_options.module - Get all the predefined options via hook_list_option_info().
- list_predefined_options_list_option_info in ./
list_predefined_options.module - Implements hook_list_option_info().
1 invocation of hook_list_option_info()
- list_predefined_options_get_list_option_info in ./
list_predefined_options.module - Get all the predefined options via hook_list_option_info().
File
- ./
list_predefined_options.api.php, line 27 - Hooks provided by the List predefined options module.
Code
function hook_list_option_info() {
$info['cats'] = array(
'label' => t('Types of cats'),
'callback' => 'mymodule_list_option_cats',
);
$info['dogs'] = array(
'label' => t('Types of dogs'),
'callback' => 'mymodule_list_option_dogs',
);
return $info;
}