class DirectoryWithMetadataPluginDiscovery
Same name in this branch
- 11.x core/modules/sdc/src/Plugin/Discovery/DirectoryWithMetadataPluginDiscovery.php \Drupal\sdc\Plugin\Discovery\DirectoryWithMetadataPluginDiscovery
Same name in other branches
- 10 core/modules/sdc/src/Plugin/Discovery/DirectoryWithMetadataPluginDiscovery.php \Drupal\sdc\Plugin\Discovery\DirectoryWithMetadataPluginDiscovery
- 10 core/lib/Drupal/Core/Plugin/Discovery/DirectoryWithMetadataPluginDiscovery.php \Drupal\Core\Plugin\Discovery\DirectoryWithMetadataPluginDiscovery
Discover directories that contain a specific metadata file.
Hierarchy
- class \Drupal\Core\Plugin\Discovery\YamlDiscovery implements \Drupal\Component\Plugin\Discovery\DiscoveryInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryTrait
- class \Drupal\Core\Plugin\Discovery\DirectoryWithMetadataPluginDiscovery extends \Drupal\Core\Plugin\Discovery\YamlDiscovery
Expanded class hierarchy of DirectoryWithMetadataPluginDiscovery
1 file declares its use of DirectoryWithMetadataPluginDiscovery
- ComponentPluginManager.php in core/
lib/ Drupal/ Core/ Theme/ ComponentPluginManager.php
File
-
core/
lib/ Drupal/ Core/ Plugin/ Discovery/ DirectoryWithMetadataPluginDiscovery.php, line 10
Namespace
Drupal\Core\Plugin\DiscoveryView source
class DirectoryWithMetadataPluginDiscovery extends YamlDiscovery {
/**
* Constructs a DirectoryWithMetadataPluginDiscovery 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 \Drupal\Core\File\FileSystemInterface $file_system
* The file system service.
*/
public function __construct(array $directories, $file_cache_key_suffix, FileSystemInterface $file_system) {
// Intentionally does not call parent constructor as this class uses a
// different YAML discovery.
$this->discovery = new DirectoryWithMetadataDiscovery($directories, $file_cache_key_suffix, $file_system);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DirectoryWithMetadataPluginDiscovery::__construct | public | function | Constructs a DirectoryWithMetadataPluginDiscovery object. | Overrides YamlDiscovery::__construct | |
DiscoveryTrait::doGetDefinition | protected | function | Gets a specific plugin definition. | ||
DiscoveryTrait::getDefinition | public | function | 3 | ||
DiscoveryTrait::hasDefinition | public | function | |||
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.