function _media_library_views_form_media_library_after_build
Same name in other branches
- 9 core/modules/media_library/media_library.module \_media_library_views_form_media_library_after_build()
- 10 core/modules/media_library/media_library.module \_media_library_views_form_media_library_after_build()
- 11.x core/modules/media_library/media_library.module \_media_library_views_form_media_library_after_build()
Form #after_build callback for media_library view's exposed filters form.
1 string reference to '_media_library_views_form_media_library_after_build'
- media_library_form_alter in core/
modules/ media_library/ media_library.module - Implements hook_form_alter().
File
-
core/
modules/ media_library/ media_library.module, line 311
Code
function _media_library_views_form_media_library_after_build(array $form, FormStateInterface $form_state) {
// Remove .form-actions from the view's exposed filter actions. This prevents
// the "Apply filters" submit button from being moved into the dialog's
// button area.
// @see \Drupal\Core\Render\Element\Actions::processActions
// @see Drupal.behaviors.dialog.prepareDialogButtons
// @todo Remove this after
// https://www.drupal.org/project/drupal/issues/3089751 is fixed.
if (($key = array_search('form-actions', $form['actions']['#attributes']['class'])) !== FALSE) {
unset($form['actions']['#attributes']['class'][$key]);
}
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.