You are here

public function DrupalImage::settingsForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalImage::settingsForm()
  2. 10 core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalImage::settingsForm()

Overrides CKEditorPluginConfigurableInterface::settingsForm

See also

\Drupal\editor\Form\EditorImageDialog

editor_image_upload_settings_form()

File

core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php, line 65

Class

DrupalImage
Defines the "drupalimage" plugin.

Namespace

Drupal\ckeditor\Plugin\CKEditorPlugin

Code

public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) {
  $form_state
    ->loadInclude('editor', 'admin.inc');
  $form['image_upload'] = editor_image_upload_settings_form($editor);
  $form['image_upload']['#attached']['library'][] = 'ckeditor/drupal.ckeditor.drupalimage.admin';
  $form['image_upload']['#element_validate'][] = [
    $this,
    'validateImageUploadSettings',
  ];
  return $form;
}