You are here

public function DrupalFile::settingsForm in Editor File upload 8

Overrides CKEditorPluginConfigurableInterface::settingsForm

See also

\Drupal\editor\Form\EditorFileDialog

editor_file_upload_settings_form()

File

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

Class

DrupalFile
Defines the "drupalfile" plugin.

Namespace

Drupal\editor_file\Plugin\CKEditorPlugin

Code

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