comparison core/modules/ckeditor/src/CKEditorPluginContextualInterface.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 namespace Drupal\ckeditor;
4
5 use Drupal\editor\Entity\Editor;
6
7 /**
8 * Defines an interface for contextually enabled CKEditor plugins.
9 *
10 * Contextually enabled CKEditor plugins can be enabled via an explicit setting,
11 * or enable themselves based on the configuration of another setting, such as
12 * enabling based on a particular button being present in the toolbar.
13 *
14 * If a contextually enabled CKEditor plugin must also be configurable (for
15 * instance, in the case where it must be enabled based on an explicit setting),
16 * then one must also implement the CKEditorPluginConfigurableInterface
17 * interface.
18 *
19 * @see \Drupal\ckeditor\CKEditorPluginInterface
20 * @see \Drupal\ckeditor\CKEditorPluginButtonsInterface
21 * @see \Drupal\ckeditor\CKEditorPluginConfigurableInterface
22 * @see \Drupal\ckeditor\CKEditorPluginCssInterface
23 * @see \Drupal\ckeditor\CKEditorPluginBase
24 * @see \Drupal\ckeditor\CKEditorPluginManager
25 * @see \Drupal\ckeditor\Annotation\CKEditorPlugin
26 * @see plugin_api
27 */
28 interface CKEditorPluginContextualInterface extends CKEditorPluginInterface {
29
30 /**
31 * Checks if this plugin should be enabled based on the editor configuration.
32 *
33 * The editor's settingsĀ can be retrieved via $editor->getSettings().
34 *
35 * @param \Drupal\editor\Entity\Editor $editor
36 * A configured text editor object.
37 *
38 * @return bool
39 */
40 public function isEnabled(Editor $editor);
41
42 }