You are here

class ConfigSchemaDiscovery in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php \Drupal\Core\Config\Schema\ConfigSchemaDiscovery

Allows YAML files to define config schema types.

Hierarchy

Expanded class hierarchy of ConfigSchemaDiscovery

1 file declares its use of ConfigSchemaDiscovery
TypedConfigManager.php in core/lib/Drupal/Core/Config/TypedConfigManager.php
Contains \Drupal\Core\Config\TypedConfigManager.

File

core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php, line 17
Contains \Drupal\Core\Config\Schema\ConfigSchemaDiscovery.

Namespace

Drupal\Core\Config\Schema
View 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.
   */
  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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigSchemaDiscovery::$schemaStorage protected property A storage instance for reading configuration schema data.
ConfigSchemaDiscovery::getDefinitions public function Gets the definition of all plugins for this type. Overrides DiscoveryTrait::getDefinitions
ConfigSchemaDiscovery::__construct function Constructs a ConfigSchemaDiscovery object.
DiscoveryTrait::doGetDefinition protected function Gets a specific plugin definition.
DiscoveryTrait::getDefinition public function 3
DiscoveryTrait::hasDefinition public function