function classy_form_alter
Same name in other branches
- 9 core/themes/classy/classy.theme \classy_form_alter()
Implements hook_form_alter().
File
-
core/
themes/ classy/ classy.theme, line 29
Code
function classy_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
$form_object = $form_state->getFormObject();
if ($form_object instanceof ViewsForm && strpos($form_object->getBaseFormId(), 'views_form_media_library') === 0) {
$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.