You are here

protected function StorableConfigBase::getSchemaWrapper in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/StorableConfigBase.php \Drupal\Core\Config\StorableConfigBase::getSchemaWrapper()

Gets the schema wrapper for the whole configuration object.

The schema wrapper is dependent on the configuration name and the whole data structure, so if the name or the data changes in any way, the wrapper should be reset.

Return value

\Drupal\Core\Config\Schema\Element

File

core/lib/Drupal/Core/Config/StorableConfigBase.php, line 135
Contains \Drupal\Core\Config\StorableConfigBase.

Class

StorableConfigBase
Provides a base class for configuration objects with storage support.

Namespace

Drupal\Core\Config

Code

protected function getSchemaWrapper() {
  if (!isset($this->schemaWrapper)) {
    $definition = $this->typedConfigManager
      ->getDefinition($this->name);
    $data_definition = $this->typedConfigManager
      ->buildDataDefinition($definition, $this->data);
    $this->schemaWrapper = $this->typedConfigManager
      ->create($data_definition, $this->data);
  }
  return $this->schemaWrapper;
}