You are here

interface GutenbergPluginConfigurableInterface in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 src/GutenbergPluginConfigurableInterface.php \Drupal\gutenberg\GutenbergPluginConfigurableInterface

Defines an interface for configurable Gutenberg plugins.

This allows a Gutenberg plugin to define a settings form. These settings can then be automatically passed on to the corresponding Gutenberg instance via GutenbergPluginInterface::getConfig().

Hierarchy

Expanded class hierarchy of GutenbergPluginConfigurableInterface

All classes that implement GutenbergPluginConfigurableInterface

1 file declares its use of GutenbergPluginConfigurableInterface
DrupalImage.php in src/Plugin/GutenbergPlugin/DrupalImage.php

File

src/GutenbergPluginConfigurableInterface.php, line 15

Namespace

Drupal\gutenberg
View source
interface GutenbergPluginConfigurableInterface extends GutenbergPluginInterface {

  /**
   * Returns a settings form to configure this Gutenberg plugin.
   *
   * If the plugin's behavior depends on extensive options and/or external data,
   * then the implementing module can choose to provide a separate, global
   * configuration page rather than per-text-editor settings. In that case, this
   * form should provide a link to the separate settings page.
   *
   * @param array $form
   *   An empty form array to be populated with a configuration form, if any.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The state of the entire filter administration form.
   * @param \Drupal\editor\Entity\Editor $editor
   *   A configured text editor object.
   *
   * @return array
   *   A render array for the settings form.
   */
  public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor);

}

Members

Namesort descending Modifiers Type Description Overrides
GutenbergPluginConfigurableInterface::settingsForm public function Returns a settings form to configure this Gutenberg plugin. 1
GutenbergPluginInterface::getConfig public function Returns the additions to CKEDITOR.config for a specific CKEditor instance. 1
GutenbergPluginInterface::getFile public function Returns the Drupal root-relative file path to the plugin JavaScript file. 1
GutenbergPluginInterface::getLibraries public function Returns a list of libraries this plugin requires. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2