You are here

function DrupalImage::validateImageUploadSettings in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 87
Contains \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalImage.

Class

DrupalImage
Defines the "drupalimage" plugin.

Namespace

Drupal\ckeditor\Plugin\CKEditorPlugin

Code

function validateImageUploadSettings(array $element, FormStateInterface $form_state) {
  $settings =& $form_state
    ->getValue(array(
    'editor',
    'settings',
    'plugins',
    'drupalimage',
    'image_upload',
  ));
  $form_state
    ->get('editor')
    ->setImageUploadSettings($settings);
  $form_state
    ->unsetValue(array(
    'editor',
    'settings',
    'plugins',
    'drupalimage',
  ));
}