You are here

function classy_paragraphs_field_widget_info_alter in Classy paragraphs 7

Implements hook_field_widget_info_alter().

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

See also

paragraphs_pack_options_list()

File

includes/classy_paragraphs.fields.inc, line 66
Implements custom field: cp_list (CLASSY_PARAGRAPHS_FIELD_TYPE_LIST).

Code

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