/**
* {@inheritdoc}
*/
protected function getDiscovery() { if (!
$this->discovery
) { $discovery =
new AnnotatedClassDiscovery($this->subdir,
$this->namespaces,
$this->pluginDefinitionAnnotationName,
$this->additionalAnnotationNamespaces
);
$discovery =
new YamlDiscoveryDecorator($discovery, 'ckeditor5',
$this->moduleHandler->
getModuleDirectories());
// Note: adding translatable properties here is impossible because it only
// supports top-level properties.
// @see \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::label()
$discovery =
new AnnotationBridgeDecorator($discovery,
$this->pluginDefinitionAnnotationName
);
$discovery =
new ContainerDerivativeDiscoveryDecorator($discovery);
$this->discovery =
$discovery;
} return $this->discovery;
} /**
* {@inheritdoc}
*/
public function processDefinition(&
$definition,
$plugin_id) { if (!
$definition instanceof CKEditor5PluginDefinition
) { throw new InvalidPluginDefinitionException($plugin_id,
sprintf('The "%s" CKEditor 5 plugin definition must extend %s',
$plugin_id, CKEditor5PluginDefinition::
class));
}