public function DrupalImage::validateImageUploadSettings in Drupal 8
Same name and namespace in other branches
- 9 core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalImage::validateImageUploadSettings()
#element_validate handler for the "image_upload" element in settingsForm().
Moves the text editor's image upload settings from the DrupalImage plugin's own settings into $editor->image_upload.
See also
\Drupal\editor\Form\EditorImageDialog
editor_image_upload_settings_form()
File
- core/
modules/ ckeditor/ src/ Plugin/ CKEditorPlugin/ DrupalImage.php, line 82
Class
- DrupalImage
- Defines the "drupalimage" plugin.
Namespace
Drupal\ckeditor\Plugin\CKEditorPluginCode
public function validateImageUploadSettings(array $element, FormStateInterface $form_state) {
$settings =& $form_state
->getValue([
'editor',
'settings',
'plugins',
'drupalimage',
'image_upload',
]);
$form_state
->get('editor')
->setImageUploadSettings($settings);
$form_state
->unsetValue([
'editor',
'settings',
'plugins',
'drupalimage',
]);
}