function YamlCacheCollectorDiscovery::__construct

Same name in this branch
  1. main core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php \Drupal\Core\Discovery\YamlCacheCollectorDiscovery::__construct()
Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php \Drupal\Core\Discovery\YamlCacheCollectorDiscovery::__construct()
  2. 11.x core/lib/Drupal/Core/Plugin/Discovery/YamlCacheCollectorDiscovery.php \Drupal\Core\Plugin\Discovery\YamlCacheCollectorDiscovery::__construct()

Construct a YamlDiscovery object.

Parameters

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

array $directories: An array of directories to scan.

Drupal\Core\Cache\CacheCollectorInterface $yamlCacheCollector: A YamlCacheCollector instance.

Overrides YamlDiscovery::__construct

File

core/lib/Drupal/Core/Plugin/Discovery/YamlCacheCollectorDiscovery.php, line 26

Class

YamlCacheCollectorDiscovery
Extends YamlDiscovery to add a file parsing cache collector.

Namespace

Drupal\Core\Plugin\Discovery

Code

public function __construct(string $name, array $directories, CacheCollectorInterface $yamlCacheCollector) {
  $this->discovery = new YamlCollector($name, $directories, $yamlCacheCollector);
}

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