annotate core/modules/ckeditor/src/CKEditorPluginContextualInterface.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\editor\Entity\Editor;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Defines an interface for contextually enabled CKEditor plugins.
Chris@0 9 *
Chris@0 10 * Contextually enabled CKEditor plugins can be enabled via an explicit setting,
Chris@0 11 * or enable themselves based on the configuration of another setting, such as
Chris@0 12 * enabling based on a particular button being present in the toolbar.
Chris@0 13 *
Chris@0 14 * If a contextually enabled CKEditor plugin must also be configurable (for
Chris@0 15 * instance, in the case where it must be enabled based on an explicit setting),
Chris@0 16 * then one must also implement the CKEditorPluginConfigurableInterface
Chris@0 17 * interface.
Chris@0 18 *
Chris@0 19 * @see \Drupal\ckeditor\CKEditorPluginInterface
Chris@0 20 * @see \Drupal\ckeditor\CKEditorPluginButtonsInterface
Chris@0 21 * @see \Drupal\ckeditor\CKEditorPluginConfigurableInterface
Chris@0 22 * @see \Drupal\ckeditor\CKEditorPluginCssInterface
Chris@0 23 * @see \Drupal\ckeditor\CKEditorPluginBase
Chris@0 24 * @see \Drupal\ckeditor\CKEditorPluginManager
Chris@0 25 * @see \Drupal\ckeditor\Annotation\CKEditorPlugin
Chris@0 26 * @see plugin_api
Chris@0 27 */
Chris@0 28 interface CKEditorPluginContextualInterface extends CKEditorPluginInterface {
Chris@0 29
Chris@0 30 /**
Chris@0 31 * Checks if this plugin should be enabled based on the editor configuration.
Chris@0 32 *
Chris@0 33 * The editor's settingsĀ can be retrieved via $editor->getSettings().
Chris@0 34 *
Chris@0 35 * @param \Drupal\editor\Entity\Editor $editor
Chris@0 36 * A configured text editor object.
Chris@0 37 *
Chris@0 38 * @return bool
Chris@0 39 */
Chris@0 40 public function isEnabled(Editor $editor);
Chris@0 41
Chris@0 42 }