class YamlDirectoryDiscovery
Same name in this branch
- 9 core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
- 8.9.x core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery
- 10 core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
- 10 core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery
- 11.x core/lib/Drupal/Core/Plugin/Discovery/YamlDirectoryDiscovery.php \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery
- 11.x core/lib/Drupal/Component/Discovery/YamlDirectoryDiscovery.php \Drupal\Component\Discovery\YamlDirectoryDiscovery
Allows multiple YAML files per directory to define plugin definitions.
Hierarchy
- class \Drupal\Core\Plugin\Discovery\YamlDiscovery implements \Drupal\Component\Plugin\Discovery\DiscoveryInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryTrait
- class \Drupal\Core\Plugin\Discovery\YamlDirectoryDiscovery extends \Drupal\Core\Plugin\Discovery\YamlDiscovery
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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DiscoveryTrait::doGetDefinition | protected | function | Gets a specific plugin definition. | ||
DiscoveryTrait::getDefinition | public | function | 3 | ||
DiscoveryTrait::hasDefinition | public | function | |||
YamlDirectoryDiscovery::__construct | public | function | Constructs a YamlDirectoryDiscovery object. | Overrides YamlDiscovery::__construct | |
YamlDiscovery::$discovery | protected | property | YAML file discovery and parsing handler. | ||
YamlDiscovery::$translatableProperties | protected | property | Contains an array of translatable properties passed along to t(). | ||
YamlDiscovery::addTranslatableProperty | public | function | Set one of the YAML values as being translatable. | ||
YamlDiscovery::getDefinitions | public | function | Gets the definition of all plugins for this type. | Overrides DiscoveryTrait::getDefinitions | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.