function claro_form_media_library_add_form_upload_alter
Same name in other branches
- 8.9.x core/themes/claro/claro.theme \claro_form_media_library_add_form_upload_alter()
- 10 core/themes/claro/claro.theme \claro_form_media_library_add_form_upload_alter()
- 11.x core/themes/claro/claro.theme \claro_form_media_library_add_form_upload_alter()
Implements hook_form_FORM_ID_alter().
File
-
core/
themes/ claro/ claro.theme, line 1359
Code
function claro_form_media_library_add_form_upload_alter(array &$form, FormStateInterface $form_state) {
$form['#attributes']['class'][] = 'media-library-add-form--upload';
if (isset($form['container']['upload'])) {
// Set this flag so we can prevent the details element from being added
// in \Drupal\claro\ClaroPreRender::managedFile.
$form['container']['upload']['#do_not_wrap_in_details'] = TRUE;
}
if (isset($form['container'])) {
$form['container']['#attributes']['class'][] = 'media-library-add-form__input-wrapper';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.