function AnnotationBridgeDecorator::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecorator.php \Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator::__construct()
  2. 8.9.x core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecorator.php \Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator::__construct()
  3. 10 core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecorator.php \Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator::__construct()

ObjectDefinitionDiscoveryDecorator constructor.

Parameters

\Drupal\Component\Plugin\Discovery\DiscoveryInterface $decorated: The discovery object that is being decorated.

string $plugin_definition_annotation_name: The name of the annotation that contains the plugin definition. The class corresponding to this name must implement \Drupal\Component\Annotation\AnnotationInterface.

File

core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecorator.php, line 39

Class

AnnotationBridgeDecorator
Ensures that all definitions are run through the annotation process.

Namespace

Drupal\Component\Annotation\Plugin\Discovery

Code

public function __construct(DiscoveryInterface $decorated, $plugin_definition_annotation_name) {
    $this->decorated = $decorated;
    $this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.