Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 10 |
| ConfigSchemaDiscovery | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
20 | |
0.00% |
0 / 10 |
| __construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getDefinitions | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 8 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\Core\Config\Schema\ConfigSchemaDiscovery. | |
| */ | |
| namespace Drupal\Core\Config\Schema; | |
| use Drupal\Component\Plugin\Discovery\DiscoveryInterface; | |
| use Drupal\Component\Plugin\Discovery\DiscoveryTrait; | |
| use Drupal\Core\Config\StorageInterface; | |
| /** | |
| * Allows YAML files to define config schema types. | |
| */ | |
| 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. | |
| */ | |
| function __construct(StorageInterface $schema_storage) { | |
| $this->schemaStorage = $schema_storage; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function getDefinitions() { | |
| $definitions = array(); | |
| foreach ($this->schemaStorage->readMultiple($this->schemaStorage->listAll()) as $schema) { | |
| foreach ($schema as $type => $definition) { | |
| $definitions[$type] = $definition; | |
| } | |
| } | |
| return $definitions; | |
| } | |
| } |