function YamlDirectoryDiscovery::__construct
Same name in this branch
- 10 core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery::__construct()
Same name in other branches
- 9 core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery::__construct()
- 9 core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery::__construct()
- 8.9.x core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery::__construct()
- 8.9.x core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery::__construct()
- 11.x core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery::__construct()
- 11.x core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery::__construct()
Constructs a YamlDirectoryDiscovery 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.
string $key: (optional) The key contained in the discovered data that identifies it. Defaults to 'id'.
2 calls to YamlDirectoryDiscovery::__construct()
- DirectoryWithMetadataDiscovery::__construct in core/
modules/ sdc/ src/ Plugin/ Discovery/ DirectoryWithMetadataDiscovery.php - Constructs a DirectoryWithMetadataDiscovery object.
- DirectoryWithMetadataDiscovery::__construct in core/
lib/ Drupal/ Core/ Plugin/ Discovery/ DirectoryWithMetadataDiscovery.php - Constructs a DirectoryWithMetadataDiscovery object.
2 methods override YamlDirectoryDiscovery::__construct()
- DirectoryWithMetadataDiscovery::__construct in core/
modules/ sdc/ src/ Plugin/ Discovery/ DirectoryWithMetadataDiscovery.php - Constructs a DirectoryWithMetadataDiscovery object.
- DirectoryWithMetadataDiscovery::__construct in core/
lib/ Drupal/ Core/ Plugin/ Discovery/ DirectoryWithMetadataDiscovery.php - Constructs a DirectoryWithMetadataDiscovery object.
File
-
core/
lib/ Drupal/ Component/ Discovery/ YamlDirectoryDiscovery.php, line 58
Class
- YamlDirectoryDiscovery
- Discovers multiple YAML files in a set of directories.
Namespace
Drupal\Component\DiscoveryCode
public function __construct(array $directories, $file_cache_key_suffix, $key = 'id') {
$this->directories = $directories;
$this->fileCacheKeySuffix = $file_cache_key_suffix;
$this->idKey = $key;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.