views_test_checkboxes_theme.theme in Drupal 10
Changes an exposed "type" filter from a multi-select to checkboxes.
File
core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.themeView source
<?php
/**
* @file
* Changes an exposed "type" filter from a multi-select to checkboxes.
*/
use Drupal\Core\Form\FormStateInterface;
/**
* Changes an exposed "type" filter from a multi-select to checkboxes.
*/
function views_test_checkboxes_theme_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) {
if (isset($form['type'])) {
$form['type']['#type'] = 'checkboxes';
}
if (isset($form['tid'])) {
$form['tid']['#type'] = 'checkboxes';
}
}
Functions
Name | Description |
---|---|
views_test_checkboxes_theme_form_views_exposed_form_alter | Changes an exposed "type" filter from a multi-select to checkboxes. |