function ArrayElement::parse
Same name in other branches
- 9 core/lib/Drupal/Core/Config/Schema/ArrayElement.php \Drupal\Core\Config\Schema\ArrayElement::parse()
- 8.9.x core/lib/Drupal/Core/Config/Schema/ArrayElement.php \Drupal\Core\Config\Schema\ArrayElement::parse()
- 11.x core/lib/Drupal/Core/Config/Schema/ArrayElement.php \Drupal\Core\Config\Schema\ArrayElement::parse()
Builds an array of contained elements.
Return value
\Drupal\Core\TypedData\TypedDataInterface[] An array of elements contained in this element.
1 call to ArrayElement::parse()
- ArrayElement::getElements in core/
lib/ Drupal/ Core/ Config/ Schema/ ArrayElement.php
File
-
core/
lib/ Drupal/ Core/ Config/ Schema/ ArrayElement.php, line 52
Class
- ArrayElement
- Defines a generic configuration element that contains multiple properties.
Namespace
Drupal\Core\Config\SchemaCode
protected function parse() {
$elements = [];
foreach ($this->getAllKeys() as $key) {
$value = $this->value[$key] ?? NULL;
$definition = $this->getElementDefinition($key);
$elements[$key] = $this->createElement($definition, $value, $key);
}
return $elements;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.