You are here

function field_placeholder_get_widget in Field placeholder 7.2

Same name and namespace in other branches
  1. 7 field_placeholder.module \field_placeholder_get_widget()

Returns information about a widget_type from hook_field_placeholder_info().

Parameters

string $widget_type: (optional) A widget type name. If omitted, all widget types will be returned.

Return value

string|bool Columns name for the required widget if if exists, otherwise returns FALSE.

1 call to field_placeholder_get_widget()
field_placeholder_field_widget_form_alter in ./field_placeholder.module
Implements hook_field_widget_form_alter().

File

./field_placeholder.module, line 146
Field placeholder module hooks and main functionality.

Code

function field_placeholder_get_widget($widget_type) {
  $widgets = module_invoke_all('field_placeholder_info');
  return isset($widgets[$widget_type]) ? $widgets[$widget_type] : FALSE;
}