You are here

public function DrupalImage::settingsForm in Gutenberg 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/GutenbergPlugin/DrupalImage.php \Drupal\gutenberg\Plugin\GutenbergPlugin\DrupalImage::settingsForm()

Overrides GutenbergPluginConfigurableInterface::settingsForm

See also

\Drupal\editor\Form\EditorImageDialog

editor_image_upload_settings_form()

File

src/Plugin/GutenbergPlugin/DrupalImage.php, line 53

Class

DrupalImage
Defines the "drupalimage" plugin.

Namespace

Drupal\gutenberg\Plugin\GutenbergPlugin

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']['#element_validate'][] = [
    $this,
    'validateImageUploadSettings',
  ];
  return $form;
}