ConfigSchemaDiscovery.php in Drupal 8
File
core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php
View source
<?php
namespace Drupal\Core\Config\Schema;
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
use Drupal\Component\Plugin\Discovery\DiscoveryTrait;
use Drupal\Core\Config\StorageInterface;
class ConfigSchemaDiscovery implements DiscoveryInterface {
use DiscoveryTrait;
protected $schemaStorage;
public function __construct(StorageInterface $schema_storage) {
$this->schemaStorage = $schema_storage;
}
public function getDefinitions() {
$definitions = [];
foreach ($this->schemaStorage
->readMultiple($this->schemaStorage
->listAll()) as $schema) {
foreach ($schema as $type => $definition) {
$definitions[$type] = $definition;
}
}
return $definitions;
}
}