You are here

function views_ui_test_field_form_views_ui_add_handler_form_alter in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.module \views_ui_test_field_form_views_ui_add_handler_form_alter()
  2. 9 core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.module \views_ui_test_field_form_views_ui_add_handler_form_alter()

Implements hook_form_FORM_ID_alter() for views_ui_add_handler_form.

Changes the label for one of the tests fields to validate this label is not searched on.

File

core/modules/views_ui/tests/modules/views_ui_test_field/views_ui_test_field.module, line 16
ViewsUI Test field module.

Code

function views_ui_test_field_form_views_ui_add_handler_form_alter(&$form, FormStateInterface $form_state) {
  $form['options']['name']['#options']['views.views_test_field_1']['title']['data']['#title'] .= ' FIELD_1_LABEL';
}