function _media_library_media_type_form_submit
Same name in other branches
- 8.9.x core/modules/media_library/media_library.module \_media_library_media_type_form_submit()
- 10 core/modules/media_library/media_library.module \_media_library_media_type_form_submit()
- 11.x core/modules/media_library/media_library.module \_media_library_media_type_form_submit()
Submit callback for media type form.
1 string reference to '_media_library_media_type_form_submit'
- 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 324
Code
function _media_library_media_type_form_submit(array &$form, FormStateInterface $form_state) {
$form_object = $form_state->getFormObject();
if ($form_object->getOperation() === 'add') {
$type = $form_object->getEntity();
$form_display_created = _media_library_configure_form_display($type);
$view_display_created = _media_library_configure_view_display($type);
if ($form_display_created || $view_display_created) {
\Drupal::messenger()->addStatus(t('Media Library form and view displays have been created for the %type media type.', [
'%type' => $type->label(),
]));
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.