function YamlDiscoveryDecorator::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php \Drupal\Core\Plugin\Discovery\YamlDiscoveryDecorator::__construct()
  2. 8.9.x core/lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php \Drupal\Core\Plugin\Discovery\YamlDiscoveryDecorator::__construct()
  3. 11.x core/lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php \Drupal\Core\Plugin\Discovery\YamlDiscoveryDecorator::__construct()

Constructs a YamlDiscoveryDecorator object.

Parameters

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

string $name: The file name suffix to use for discovery; for instance, 'test' will become 'MODULE.test.yml'.

array $directories: An array of directories to scan.

Overrides YamlDiscovery::__construct

File

core/lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php, line 33

Class

YamlDiscoveryDecorator
Enables YAML discovery for plugin definitions.

Namespace

Drupal\Core\Plugin\Discovery

Code

public function __construct(DiscoveryInterface $decorated, $name, array $directories) {
    parent::__construct($name, $directories);
    $this->decorated = $decorated;
}

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