public function ImagePopup::validateImageUploadSettings in Simple Image Popup 2.x
The #element_validate handler for "image_upload" element in settingsForm().
Moves the text editor's image upload settings from the ImagePopup plugin's own settings into $editor->image_upload.
See also
\Drupal\editor\Form\EditorImageDialog
editor_image_upload_settings_form()
File
- src/
Plugin/ CKEditorPlugin/ ImagePopup.php, line 91
Class
- ImagePopup
- Defines the "imagepopup" plugin.
Namespace
Drupal\image_popup\Plugin\CKEditorPluginCode
public function validateImageUploadSettings(array $element, FormStateInterface $form_state) {
$settings =& $form_state
->getValue([
'editor',
'settings',
'plugins',
'imagepopup',
'image_upload',
]);
$form_state
->get('editor')
->setImageUploadSettings($settings);
$form_state
->unsetValue([
'editor',
'settings',
'plugins',
'imagepopup',
]);
}