Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ArrayElement.php

function 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
Gets an array of contained elements.

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\Schema

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal