function AttributeDiscoveryWithAnnotations::getDefinitions
Same name in other branches
- 11.x core/lib/Drupal/Core/Plugin/Discovery/AttributeDiscoveryWithAnnotations.php \Drupal\Core\Plugin\Discovery\AttributeDiscoveryWithAnnotations::getDefinitions()
Overrides AttributeClassDiscovery::getDefinitions
File
-
core/
lib/ Drupal/ Core/ Plugin/ Discovery/ AttributeDiscoveryWithAnnotations.php, line 63
Class
- AttributeDiscoveryWithAnnotations
- Enables both attribute and annotation discovery for plugin definitions.
Namespace
Drupal\Core\Plugin\DiscoveryCode
public function getDefinitions() {
// Clear the annotation loaders of any previous annotation classes.
AnnotationRegistry::reset();
// Register the namespaces of classes that can be used for annotations.
// @phpstan-ignore-next-line
AnnotationRegistry::registerLoader('class_exists');
$definitions = parent::getDefinitions();
$this->annotationReader = NULL;
return $definitions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.