function Mapping::getElementDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/Schema/Mapping.php \Drupal\Core\Config\Schema\Mapping::getElementDefinition()
  2. 10 core/lib/Drupal/Core/Config/Schema/Mapping.php \Drupal\Core\Config\Schema\Mapping::getElementDefinition()
  3. 11.x core/lib/Drupal/Core/Config/Schema/Mapping.php \Drupal\Core\Config\Schema\Mapping::getElementDefinition()

Overrides ArrayElement::getElementDefinition

File

core/lib/Drupal/Core/Config/Schema/Mapping.php, line 23

Class

Mapping
Defines a mapping configuration element.

Namespace

Drupal\Core\Config\Schema

Code

protected function getElementDefinition($key) {
    $value = isset($this->value[$key]) ? $this->value[$key] : NULL;
    $definition = isset($this->definition['mapping'][$key]) ? $this->definition['mapping'][$key] : [];
    return $this->buildDataDefinition($definition, $value, $key);
}

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