class CKEditor5Plugin
Same name in this branch
- 10 core/modules/ckeditor5/src/Attribute/CKEditor5Plugin.php \Drupal\ckeditor5\Attribute\CKEditor5Plugin
Same name in other branches
- 9 core/modules/ckeditor5/src/Annotation/CKEditor5Plugin.php \Drupal\ckeditor5\Annotation\CKEditor5Plugin
- 11.x core/modules/ckeditor5/src/Annotation/CKEditor5Plugin.php \Drupal\ckeditor5\Annotation\CKEditor5Plugin
- 11.x core/modules/ckeditor5/src/Attribute/CKEditor5Plugin.php \Drupal\ckeditor5\Attribute\CKEditor5Plugin
Defines a CKEditor5Plugin annotation object.
Plugin Namespace: Plugin\CKEditor5Plugin.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
- class \Drupal\ckeditor5\Annotation\CKEditor5Plugin extends \Drupal\Component\Annotation\Plugin
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
1 file declares its use of CKEditor5Plugin
- SmartDefaultSettingsTest.php in core/
modules/ ckeditor5/ tests/ src/ Unit/ SmartDefaultSettingsTest.php
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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
CKEditor5Plugin::$ckeditor5 | public | property | The CKEditor 5 aspects of the plugin definition. | ||
CKEditor5Plugin::$drupal | public | property | The Drupal aspects of the plugin definition. | ||
CKEditor5Plugin::$id | public | property | The plugin ID. | ||
CKEditor5Plugin::get | public | function | Overrides Plugin::get | ||
CKEditor5Plugin::getClass | public | function | Overrides Plugin::getClass | ||
CKEditor5Plugin::setClass | public | function | Overrides Plugin::setClass | ||
CKEditor5Plugin::__construct | 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::__construct | |
Plugin::$definition | protected | property | The plugin definition read from the class annotation. | 1 | |
Plugin::getId | public | function | Overrides AnnotationInterface::getId | ||
Plugin::getProvider | public | function | Overrides AnnotationInterface::getProvider | 1 | |
Plugin::parse | protected | function | Parses an annotation into its definition. | ||
Plugin::setProvider | public | function | Overrides AnnotationInterface::setProvider |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.