function YamlCacheCollectorDiscovery::__construct
Same name in this branch
- 11.x core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php \Drupal\Core\Discovery\YamlCacheCollectorDiscovery::__construct()
Same name and namespace in other branches
- main core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php \Drupal\Core\Discovery\YamlCacheCollectorDiscovery::__construct()
- main 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\DiscoveryCode
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.