class YamlDirectoryDiscovery in Drupal 8
Same name in this branch
- 8 core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery
- 8 core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
- 10 core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
Allows multiple YAML files per directory to define plugin definitions.
Hierarchy
- class \Drupal\Core\Plugin\Discovery\YamlDiscovery implements DiscoveryInterface uses DiscoveryTrait
- class \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
Expanded class hierarchy of YamlDirectoryDiscovery
2 files declare their use of YamlDirectoryDiscovery
- MigrationPluginManager.php in core/
modules/ migrate/ src/ Plugin/ MigrationPluginManager.php - YamlDirectoryDiscoveryTest.php in core/
tests/ Drupal/ Tests/ Core/ Plugin/ Discovery/ YamlDirectoryDiscoveryTest.php
File
- core/
lib/ Drupal/ Core/ Plugin/ Discovery/ YamlDirectoryDiscovery.php, line 10
Namespace
Drupal\Core\Plugin\DiscoveryView source
class YamlDirectoryDiscovery extends YamlDiscovery {
/**
* Constructs a YamlDirectoryDiscovery object.
*
* @param 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.
* @param string $file_cache_key_suffix
* The file cache key suffix. This should be unique for each type of
* discovery.
* @param string $key
* (optional) The key contained in the discovered data that identifies it.
* Defaults to 'id'.
*/
public function __construct(array $directories, $file_cache_key_suffix, $key = 'id') {
// Intentionally does not call parent constructor as this class uses a
// different YAML discovery.
$this->discovery = new ComponentYamlDirectoryDiscovery($directories, $file_cache_key_suffix, $key);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiscoveryTrait:: |
protected | function | Gets a specific plugin definition. | |
DiscoveryTrait:: |
public | function | 3 | |
DiscoveryTrait:: |
public | function | ||
YamlDirectoryDiscovery:: |
public | function |
Constructs a YamlDirectoryDiscovery object. Overrides YamlDiscovery:: |
|
YamlDiscovery:: |
protected | property | YAML file discovery and parsing handler. | |
YamlDiscovery:: |
protected | property | Contains an array of translatable properties passed along to t(). | |
YamlDiscovery:: |
public | function | Set one of the YAML values as being translatable. | |
YamlDiscovery:: |
public | function |
Gets the definition of all plugins for this type. Overrides DiscoveryTrait:: |
1 |