function seven_form_media_library_add_form_oembed_alter in Drupal 8
Same name and namespace in other branches
- 9 core/themes/seven/seven.theme \seven_form_media_library_add_form_oembed_alter()
- 10 core/themes/seven/seven.theme \seven_form_media_library_add_form_oembed_alter()
Implements hook_form_FORM_ID_alter().
File
- core/
themes/ seven/ seven.theme, line 259 - Functions to support theming in the Seven theme.
Code
function seven_form_media_library_add_form_oembed_alter(array &$form, FormStateInterface $form_state) {
$form['#attributes']['class'][] = 'media-library-add-form--oembed';
// If no media items have been added yet, add a couple of styling classes
// to the initial URL form.
if (isset($form['container'])) {
$form['container']['#attributes']['class'][] = 'media-library-add-form__input-wrapper';
$form['container']['url']['#attributes']['class'][] = 'media-library-add-form-oembed-url';
$form['container']['submit']['#attributes']['class'][] = 'media-library-add-form-oembed-submit';
}
}