function _media_library_views_form_media_library_after_build
Same name and namespace in other branches
- 10 core/modules/media_library/media_library.module \_media_library_views_form_media_library_after_build()
- 9 core/modules/media_library/media_library.module \_media_library_views_form_media_library_after_build()
- 8.9.x core/modules/media_library/media_library.module \_media_library_views_form_media_library_after_build()
- main 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.
Deprecated
in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement.
See also
https://www.drupal.org/node/3566774
File
-
core/
modules/ media_library/ media_library.module, line 64
Code
function _media_library_views_form_media_library_after_build(array $form, FormStateInterface $form_state) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
// 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.