You are here

public function AnnotationBridgeDecorator::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotationBridgeDecorator.php \Drupal\Component\Annotation\Plugin\Discovery\AnnotationBridgeDecorator::__construct()
  2. 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;
}