public function CKEditorUploadImageDrupalImage::settingsForm in CKEditor Upload Image 8
Same name and namespace in other branches
- 8.2 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
Namespace
Drupal\ckeditor_uploadimage\FormCode
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;
}