foreach ($messages as $type =>
$messages_per_type) { foreach ($messages_per_type as $message) { $this->
messenger()->
addMessage($message,
$type);
} } if (isset($messages[MessengerInterface::TYPE_WARNING
]) ||
isset($messages[MessengerInterface::TYPE_ERROR
])) { $this->
messenger()->
addMessage($this->
t('Check <a href=":handbook">this handbook page</a> for details about compatibility issues of contrib modules.',
[ ':handbook' => 'https://www.drupal.org/node/3273985',
]), MessengerInterface::TYPE_WARNING
);
} } $eventual_editor_and_format =
$this->
getEventualEditorWithPrimedFilterFormat($form_state,
$editor);
// Provide the validated eventual pair in form state to
// ::getGeneratedAllowedHtmlValue(), to update filter_html's
// "allowed_html".
$form_state->
set('ckeditor5_validated_pair',
$eventual_editor_and_format);
// Ensure that CKEditor 5 plugins that need to interact with the Editor
// config entity are able to access the computed Editor, which was cloned
// from $form_state->get('editor').
// @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image::buildConfigurationForm
$form_state->
set('editor',
$editor);
}