class ConfigSchemaDiscovery in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php \Drupal\Core\Config\Schema\ConfigSchemaDiscovery
Allows YAML files to define config schema types.
Hierarchy
- class \Drupal\Core\Config\Schema\ConfigSchemaDiscovery implements DiscoveryInterface uses DiscoveryTrait
Expanded class hierarchy of ConfigSchemaDiscovery
1 file declares its use of ConfigSchemaDiscovery
- TypedConfigManager.php in core/
lib/ Drupal/ Core/ Config/ TypedConfigManager.php
File
- core/
lib/ Drupal/ Core/ Config/ Schema/ ConfigSchemaDiscovery.php, line 12
Namespace
Drupal\Core\Config\SchemaView source
class ConfigSchemaDiscovery implements DiscoveryInterface {
use DiscoveryTrait;
/**
* A storage instance for reading configuration schema data.
*
* @var \Drupal\Core\Config\StorageInterface
*/
protected $schemaStorage;
/**
* Constructs a ConfigSchemaDiscovery object.
*
* @param $schema_storage
* The storage object to use for reading schema data.
*/
public function __construct(StorageInterface $schema_storage) {
$this->schemaStorage = $schema_storage;
}
/**
* {@inheritdoc}
*/
public function getDefinitions() {
$definitions = [];
foreach ($this->schemaStorage
->readMultiple($this->schemaStorage
->listAll()) as $schema) {
foreach ($schema as $type => $definition) {
$definitions[$type] = $definition;
}
}
return $definitions;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigSchemaDiscovery:: |
protected | property | A storage instance for reading configuration schema data. | |
ConfigSchemaDiscovery:: |
public | function |
Gets the definition of all plugins for this type. Overrides DiscoveryTrait:: |
|
ConfigSchemaDiscovery:: |
public | function | Constructs a ConfigSchemaDiscovery object. | |
DiscoveryTrait:: |
protected | function | Gets a specific plugin definition. | |
DiscoveryTrait:: |
public | function | 3 | |
DiscoveryTrait:: |
public | function |