class CKEditor5Plugin in Drupal 10
Defines a CKEditor5Plugin annotation object.
Plugin Namespace: Plugin\CKEditor5Plugin.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\ckeditor5\Annotation\CKEditor5Plugin
Expanded class hierarchy of CKEditor5Plugin
See also
\Drupal\ckeditor5\Plugin\CKEditor5PluginInterface
\Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface
\Drupal\ckeditor5\Annotation\CKEditor5AspectsOfCKEditor5Plugin
\Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin
Related topics
2 files declare their use of CKEditor5Plugin
- CKEditor5PluginManager.php in core/
modules/ ckeditor5/ src/ Plugin/ CKEditor5PluginManager.php - SmartDefaultSettingsTest.php in core/
modules/ ckeditor5/ tests/ src/ Unit/ SmartDefaultSettingsTest.php
1 string reference to 'CKEditor5Plugin'
- CKEditor5PluginManagerTest::providerTestInvalidPluginDefinitions in core/
modules/ ckeditor5/ tests/ src/ Kernel/ CKEditor5PluginManagerTest.php - Data provider.
File
- core/
modules/ ckeditor5/ src/ Annotation/ CKEditor5Plugin.php, line 23
Namespace
Drupal\ckeditor5\AnnotationView source
class CKEditor5Plugin extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The CKEditor 5 aspects of the plugin definition.
*
* @var \Drupal\ckeditor5\Annotation\CKEditor5AspectsOfCKEditor5Plugin
*/
public $ckeditor5;
/**
* The Drupal aspects of the plugin definition.
*
* @var \Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin
*/
public $drupal;
/**
* {@inheritdoc}
*
* Overridden for compatibility with the AnnotationBridgeDecorator, which
* ensures YAML-defined CKEditor 5 plugin definitions are also processed by
* annotations. Unfortunately it does not (yet) support nested annotations.
* Force YAML-defined plugin definitions to be parsed by the
* annotations, to ensure consistent handling of defaults.
*
* @see \Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator::getDefinitions()
*/
public function __construct($values) {
if (isset($values['ckeditor5']) && is_array($values['ckeditor5'])) {
$values['ckeditor5'] = new CKEditor5AspectsOfCKEditor5Plugin($values['ckeditor5']);
}
if (isset($values['drupal']) && is_array($values['drupal'])) {
$values['drupal'] = new DrupalAspectsOfCKEditor5Plugin($values['drupal']);
}
parent::__construct($values);
}
/**
* {@inheritdoc}
*/
public function getClass() {
return $this->definition['drupal']['class'];
}
/**
* {@inheritdoc}
*/
public function setClass($class) {
$this->definition['drupal']['class'] = $class;
}
/**
* {@inheritdoc}
*/
public function get() : CKEditor5PluginDefinition {
return new CKEditor5PluginDefinition($this->definition);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CKEditor5Plugin:: |
public | property | The CKEditor 5 aspects of the plugin definition. | |
CKEditor5Plugin:: |
public | property | The Drupal aspects of the plugin definition. | |
CKEditor5Plugin:: |
public | property | The plugin ID. | |
CKEditor5Plugin:: |
public | function |
Gets the value of an annotation. Overrides Plugin:: |
|
CKEditor5Plugin:: |
public | function |
Gets the class of the annotated class. Overrides Plugin:: |
|
CKEditor5Plugin:: |
public | function |
Sets the class of the annotated class. Overrides Plugin:: |
|
CKEditor5Plugin:: |
public | function |
Overridden for compatibility with the AnnotationBridgeDecorator, which
ensures YAML-defined CKEditor 5 plugin definitions are also processed by
annotations. Unfortunately it does not (yet) support nested annotations.
Force YAML-defined plugin… Overrides Plugin:: |
|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
1 |
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |