You are here

function icon_select_field_widget_form_alter in Icon Select 8

Implements hook_field_widget_form_alter().

File

./icon_select.module, line 54
Basic module file for icon_select module.

Code

function icon_select_field_widget_form_alter(&$element, FormStateInterface $form_state, $context) {
  if (get_class($context['widget']) === 'Drupal\\icon_select\\Plugin\\Field\\FieldWidget\\IconSelectFieldWidgetDefault') {
    $element['target_id']['#process'][] = [
      'Drupal\\icon_select\\Plugin\\Field\\FieldWidget\\IconSelectFieldWidgetDefault',
      'processCheckboxes',
    ];
  }
}