function ConfigSchemaDiscovery::getDefinitions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php \Drupal\Core\Config\Schema\ConfigSchemaDiscovery::getDefinitions()
  2. 8.9.x core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php \Drupal\Core\Config\Schema\ConfigSchemaDiscovery::getDefinitions()
  3. 11.x core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php \Drupal\Core\Config\Schema\ConfigSchemaDiscovery::getDefinitions()

Overrides DiscoveryTrait::getDefinitions

File

core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php, line 36

Class

ConfigSchemaDiscovery
Allows YAML files to define config schema types.

Namespace

Drupal\Core\Config\Schema

Code

public function getDefinitions() {
    $definitions = [];
    foreach ($this->schemaStorage
        ->readMultiple($this->schemaStorage
        ->listAll()) as $schema) {
        foreach ($schema as $type => $definition) {
            $definitions[$type] = $definition;
        }
    }
    return $definitions;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.