protected function Mapping::getElementDefinition in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Config/Schema/Mapping.php \Drupal\Core\Config\Schema\Mapping::getElementDefinition()
Gets data definition object for contained element.
Parameters
int|string $key: Property name or index of the element.
Return value
\Drupal\Core\TypedData\DataDefinitionInterface
Overrides ArrayElement::getElementDefinition
File
- core/
lib/ Drupal/ Core/ Config/ Schema/ Mapping.php, line 28 - Contains \Drupal\Core\Config\Schema\Mapping.
Class
- Mapping
- Defines a mapping configuration element.
Namespace
Drupal\Core\Config\SchemaCode
protected function getElementDefinition($key) {
$value = isset($this->value[$key]) ? $this->value[$key] : NULL;
$definition = isset($this->definition['mapping'][$key]) ? $this->definition['mapping'][$key] : array();
return $this
->buildDataDefinition($definition, $value, $key);
}