field_info_widget_types
function field_info_widget_types
field_info_widget_types($widget_type = NULL)
Returns information about field widgets from hook_field_widget_info().
Parameters
$widget_type: (optional) A widget type name. If omitted, all widget types will be returned.
Return value
Either a single widget type description, as provided by hook_field_widget_info(), or an array of all existing widget types, keyed by widget type name.
Related topics
File
- modules/field/field.info.inc, line 358
- Field Info API, providing information about available fields and field types.
Code
function field_info_widget_types($widget_type = NULL) { $info = _field_info_collate_types(); $widget_types = $info['widget types']; if ($widget_type) { if (isset($widget_types[$widget_type])) { return $widget_types[$widget_type]; } } else { return $widget_types; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.info.inc/function/field_info_widget_types/7.x