function DirectoryWithMetadataDiscovery::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Plugin/Discovery/DirectoryWithMetadataDiscovery.php \Drupal\Core\Plugin\Discovery\DirectoryWithMetadataDiscovery::__construct()
- 10 core/lib/Drupal/Core/Plugin/Discovery/DirectoryWithMetadataDiscovery.php \Drupal\Core\Plugin\Discovery\DirectoryWithMetadataDiscovery::__construct()
Constructs a DirectoryWithMetadataDiscovery object.
Parameters
array $directories: An array of directories to scan, keyed by the provider. The value can either be a string or an array of strings. The string values should be the path of a directory to scan.
string $file_cache_key_suffix: The file cache key suffix. This should be unique for each type of discovery.
\Drupal\Core\File\FileSystemInterface|null $fileSystem: The file system service.
Overrides YamlDirectoryDiscovery::__construct
File
-
core/
lib/ Drupal/ Core/ Plugin/ Discovery/ DirectoryWithMetadataDiscovery.php, line 38
Class
- DirectoryWithMetadataDiscovery
- Does the actual finding of the directories with metadata files.
Namespace
Drupal\Core\Plugin\DiscoveryCode
public function __construct(array $directories, string $file_cache_key_suffix, ?FileSystemInterface $fileSystem = NULL) {
parent::__construct($directories, $file_cache_key_suffix);
if ($fileSystem) {
@trigger_error(sprintf('Passing the $fileSystem parameter to %s() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. The class no longer uses the file system service. See https://www.drupal.org/node/3530869', __METHOD__), E_USER_DEPRECATED);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.