Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / Discovery / YamlDirectoryDiscovery.php
1 <?php
2
3 namespace Drupal\Core\Plugin\Discovery;
4
5 use Drupal\Component\Discovery\YamlDirectoryDiscovery as ComponentYamlDirectoryDiscovery;
6
7 /**
8  * Allows multiple YAML files per directory to define plugin definitions.
9  */
10 class YamlDirectoryDiscovery extends YamlDiscovery {
11
12   /**
13    * Constructs a YamlDirectoryDiscovery object.
14    *
15    * @param array $directories
16    *   An array of directories to scan, keyed by the provider. The value can
17    *   either be a string or an array of strings. The string values should be
18    *   the path of a directory to scan.
19    * @param string $file_cache_key_suffix
20    *   The file cache key suffix. This should be unique for each type of
21    *   discovery.
22    * @param string $key
23    *   (optional) The key contained in the discovered data that identifies it.
24    *   Defaults to 'id'.
25    */
26   public function __construct(array $directories, $file_cache_key_suffix, $key = 'id') {
27     // Intentionally does not call parent constructor as this class uses a
28     // different YAML discovery.
29     $this->discovery = new ComponentYamlDirectoryDiscovery($directories, $file_cache_key_suffix, $key);
30   }
31
32 }