function StorableConfigBase::getSchemaWrapper

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/StorableConfigBase.php \Drupal\Core\Config\StorableConfigBase::getSchemaWrapper()
  2. 8.9.x core/lib/Drupal/Core/Config/StorableConfigBase.php \Drupal\Core\Config\StorableConfigBase::getSchemaWrapper()
  3. 11.x 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

1 call to StorableConfigBase::getSchemaWrapper()
StorableConfigBase::castValue in core/lib/Drupal/Core/Config/StorableConfigBase.php
Casts the value to correct data type using the configuration schema.

File

core/lib/Drupal/Core/Config/StorableConfigBase.php, line 175

Class

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

Namespace

Drupal\Core\Config

Code

protected function getSchemaWrapper() {
    if (!isset($this->schemaWrapper)) {
        $this->schemaWrapper = $this->typedConfigManager
            ->createFromNameAndData($this->name, $this->data);
    }
    return $this->schemaWrapper;
}

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