function ViewsTestCheckboxesThemeHooks::formViewsExposedFormAlter

Implements hook_form_FORM_ID_alter().

Attributes

#[Hook('form_views_exposed_form_alter')]

File

core/modules/views/tests/themes/views_test_checkboxes_theme/src/Hook/ViewsTestCheckboxesThemeHooks.php, line 18

Class

ViewsTestCheckboxesThemeHooks
Form alter hooks for views tests.

Namespace

Drupal\views_test_checkboxes_theme\Hook

Code

public function formViewsExposedFormAlter(&$form, FormStateInterface $form_state) : void {
  if (isset($form['type'])) {
    $form['type']['#type'] = 'checkboxes';
  }
  if (isset($form['tid'])) {
    $form['tid']['#type'] = 'checkboxes';
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.