You are here

function paragraphs_pack_field_widget_info_alter in Paragraphs pack 7

Implements hook_field_widget_info_alter().

The pp_view_mode field type does not implement widgets of its own, but reuses the widgets defined in options.module.

See also

paragraphs_pack_options_list()

File

includes/paragraphs_pack.fields.inc, line 100
Implements custom fields: PP_FIELD_TYPE_VIEW_MODE.

Code

function paragraphs_pack_field_widget_info_alter(&$info) {
  $widgets = array(
    'options_select' => array(
      PP_FIELD_TYPE_VIEW_MODE,
    ),
  );
  foreach ($widgets as $widget => $field_types) {
    $info[$widget]['field types'] = array_merge($info[$widget]['field types'], $field_types);
  }
}