annotate core/modules/ckeditor/src/CKEditorPluginConfigurableInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\ckeditor;
Chris@0 4
Chris@0 5 use Drupal\Core\Form\FormStateInterface;
Chris@0 6 use Drupal\editor\Entity\Editor;
Chris@0 7
Chris@0 8 /**
Chris@0 9 * Defines an interface for configurable CKEditor plugins.
Chris@0 10 *
Chris@0 11 * This allows a CKEditor plugin to define a settings form. These settings can
Chris@0 12 * then be automatically passed on to the corresponding CKEditor instance via
Chris@0 13 * CKEditorPluginInterface::getConfig().
Chris@0 14 *
Chris@0 15 * @see \Drupal\ckeditor\CKEditorPluginInterface
Chris@0 16 * @see \Drupal\ckeditor\CKEditorPluginButtonsInterface
Chris@0 17 * @see \Drupal\ckeditor\CKEditorPluginContextualInterface
Chris@0 18 * @see \Drupal\ckeditor\CKEditorPluginCssInterface
Chris@0 19 * @see \Drupal\ckeditor\CKEditorPluginBase
Chris@0 20 * @see \Drupal\ckeditor\CKEditorPluginManager
Chris@0 21 * @see \Drupal\ckeditor\Annotation\CKEditorPlugin
Chris@0 22 * @see plugin_api
Chris@0 23 */
Chris@0 24 interface CKEditorPluginConfigurableInterface extends CKEditorPluginInterface {
Chris@0 25
Chris@0 26 /**
Chris@0 27 * Returns a settings form to configure this CKEditor plugin.
Chris@0 28 *
Chris@0 29 * If the plugin's behavior depends on extensive options and/or external data,
Chris@0 30 * then the implementing module can choose to provide a separate, global
Chris@0 31 * configuration page rather than per-text-editor settings. In that case, this
Chris@0 32 * form should provide a link to the separate settings page.
Chris@0 33 *
Chris@0 34 * @param array $form
Chris@0 35 * An empty form array to be populated with a configuration form, if any.
Chris@0 36 * @param \Drupal\Core\Form\FormStateInterface $form_state
Chris@0 37 * The state of the entire filter administration form.
Chris@0 38 * @param \Drupal\editor\Entity\Editor $editor
Chris@0 39 * A configured text editor object.
Chris@0 40 *
Chris@0 41 * @return array
Chris@0 42 * A render array for the settings form.
Chris@0 43 */
Chris@0 44 public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor);
Chris@0 45
Chris@0 46 }