You are here

public function ConfigSchemaDiscovery::getDefinitions in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php \Drupal\Core\Config\Schema\ConfigSchemaDiscovery::getDefinitions()
  2. 9 core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php \Drupal\Core\Config\Schema\ConfigSchemaDiscovery::getDefinitions()

Gets the definition of all plugins for this type.

Return value

mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.

Overrides DiscoveryTrait::getDefinitions

See also

\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()

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;
}