class CKEditor5PluginDefault in Drupal 10
Defines the default CKEditor 5 plugin implementation.
When a CKEditor 5 plugin is not configurable nor has dynamic plugin configuration, no custom code needs to be written: this default implementation will be used under the hood.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\ckeditor5\Plugin\CKEditor5PluginDefault implements CKEditor5PluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of CKEditor5PluginDefault
See also
@see \Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin::$class
12 files declare their use of CKEditor5PluginDefault
- Alignment.php in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5Plugin/ Alignment.php - DrupalAspectsOfCKEditor5Plugin.php in core/
modules/ ckeditor5/ src/ Annotation/ DrupalAspectsOfCKEditor5Plugin.php - GlobalAttribute.php in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5Plugin/ GlobalAttribute.php - Heading.php in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5Plugin/ Heading.php - ImageResize.php in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5Plugin/ ImageResize.php
File
- core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5PluginDefault.php, line 19
Namespace
Drupal\ckeditor5\PluginView source
class CKEditor5PluginDefault extends PluginBase implements CKEditor5PluginInterface {
/**
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
// Ensure the configuration is set as expected for configurable plugins.
if ($this instanceof CKEditor5PluginConfigurableInterface) {
$this
->setConfiguration($configuration);
}
}
/**
* {@inheritdoc}
*/
public function getDynamicPluginConfig(array $static_plugin_config, EditorInterface $editor) : array {
return $static_plugin_config;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CKEditor5PluginDefault:: |
public | function |
Allows a plugin to modify its static configuration. Overrides CKEditor5PluginInterface:: |
|
CKEditor5PluginDefault:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
public | function | 2 | |
DependencySerializationTrait:: |
public | function | 2 | |
MessengerTrait:: |
protected | property | The messenger. | 18 |
MessengerTrait:: |
public | function | Gets the messenger. | 18 |
MessengerTrait:: |
public | function | Sets the messenger. | |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | 2 | |
PluginBase:: |
public | function | ||
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 3 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 1 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |