You are here

function gutenberg_form_media_edit_form_cancel in Gutenberg 8.2

Same name and namespace in other branches
  1. 8 gutenberg.module \gutenberg_form_media_edit_form_cancel()

Alter media edit form cancel.

1 string reference to 'gutenberg_form_media_edit_form_cancel'
_gutenberg_media_form_alter in ./gutenberg.module
Alter media form.

File

./gutenberg.module, line 643
Provides integration with the Gutenberg editor.

Code

function gutenberg_form_media_edit_form_cancel(array $form, FormStateInterface $form_state) {
  $form_state
    ->disableRedirect();
  $command = new CloseModalDialogCommand();
  $response = new AjaxResponse();
  $response
    ->addCommand($command);
  return $response;
}