You are here

public function Bgimage::settingsForm in CkEditor Background Image 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/CKEditorPlugin/Bgimage.php \Drupal\ckeditor_bgimage\Plugin\CKEditorPlugin\Bgimage::settingsForm()

Overrides CKEditorPluginConfigurableInterface::settingsForm

See also

\Drupal\editor\Form\EditorFileDialog

ckeditor_bgimage_upload_settings_form()

File

src/Plugin/CKEditorPlugin/Bgimage.php, line 66

Class

Bgimage
Defines the "bgimage" plugin.

Namespace

Drupal\ckeditor_bgimage\Plugin\CKEditorPlugin

Code

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