function umami_form_alter
Same name in other branches
- 9 core/profiles/demo_umami/themes/umami/umami.theme \umami_form_alter()
- 10 core/profiles/demo_umami/themes/umami/umami.theme \umami_form_alter()
Implements hook_form_alter().
@todo revisit in https://drupal.org/node/3110132
File
-
core/
profiles/ demo_umami/ themes/ umami/ umami.theme, line 155
Code
function umami_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
$form_object = $form_state->getFormObject();
if ($form_object instanceof ViewsForm && str_starts_with($form_object->getBaseFormId(), 'views_form_media_library')) {
$form['#attributes']['class'][] = 'media-library-views-form';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.