You are here

function YamlDiscovery::__construct in Plug 7

Same name in this branch
  1. 7 lib/Drupal/Component/Discovery/YamlDiscovery.php \Drupal\Component\Discovery\YamlDiscovery::__construct()
  2. 7 lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDiscovery::__construct()

Construct a YamlDiscovery object.

Parameters

string $name: The file name suffix to use for discovery. E.g. 'test' will become 'MODULE.test.yml'.

array $directories: An array of directories to scan.

1 call to YamlDiscovery::__construct()
YamlDiscoveryDecorator::__construct in lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php
Constructs a YamlDiscoveryDecorator object.
1 method overrides YamlDiscovery::__construct()
YamlDiscoveryDecorator::__construct in lib/Drupal/Core/Plugin/Discovery/YamlDiscoveryDecorator.php
Constructs a YamlDiscoveryDecorator object.

File

lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php, line 37
Contains \Drupal\Core\Plugin\Discovery\YamlDiscovery.

Class

YamlDiscovery
Allows YAML files to define plugin definitions.

Namespace

Drupal\Core\Plugin\Discovery

Code

function __construct($name, array $directories) {
  $this->discovery = new ComponentYamlDiscovery($name, $directories);
}