You are here

public function CKEditorUploadImageDrupalImage::settingsForm in CKEditor Upload Image 8.2

Same name and namespace in other branches
  1. 8 src/Form/CKEditorUploadImageDrupalImage.php \Drupal\ckeditor_uploadimage\Form\CKEditorUploadImageDrupalImage::settingsForm()

Overrides DrupalImage::settingsForm

See also

\Drupal\editor\Form\EditorImageDialog

editor_image_upload_settings_form()

File

src/Form/CKEditorUploadImageDrupalImage.php, line 17
Contains \Drupal\ckeditor_uploadimage\Form\CKEditorUploadImageDrupalImageSettings.

Class

CKEditorUploadImageDrupalImage

Namespace

Drupal\ckeditor_uploadimage\Form

Code

public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) {
  $form = parent::settingsForm($form, $form_state, $editor);
  $imageUpload = $editor
    ->getImageUploadSettings();
  $form['image_upload']['media_entity_image'] = [
    '#type' => 'checkbox',
    '#title' => t('Enable uploaded images that were dropped or pasted from clipboard into the editor save as media entity
        image'),
    '#default_value' => isset($imageUpload['media_entity_image']) ?: FALSE,
  ];
  return $form;
}