You are here

function gutenberg_handle_messages in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 gutenberg.module \gutenberg_handle_messages()

Handle messages.

File

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

Code

function gutenberg_handle_messages(&$form) {
  $messages = \Drupal::messenger()
    ->deleteAll();
  $form['#attached']['drupalSettings']['gutenberg']['messages'] = $messages;
}