"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/modules/ckeditor/src/CKEditorPluginContextualInterface.php" (26 Nov 2020, 1420 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "CKEditorPluginContextualInterface.php" see the Fossies "Dox" file reference documentation.

    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 }