You are here

public function ArrayElement::getProperties in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Config/Schema/ArrayElement.php \Drupal\Core\Config\Schema\ArrayElement::getProperties()

Gets an array of property objects.

Parameters

bool $include_computed: If set to TRUE, computed properties are included. Defaults to FALSE.

Return value

\Drupal\Core\TypedData\TypedDataInterface[] An array of property objects implementing the TypedDataInterface, keyed by property name.

Throws

\Drupal\Core\TypedData\Exception\MissingDataException If the complex data structure is unset and no property can be created.

Overrides ComplexDataInterface::getProperties

File

core/lib/Drupal/Core/Config/Schema/ArrayElement.php, line 179

Class

ArrayElement
Defines a generic configuration element that contains multiple properties.

Namespace

Drupal\Core\Config\Schema

Code

public function getProperties($include_computed = FALSE) {
  $properties = [];
  foreach (array_keys($this->value) as $name) {
    $properties[$name] = $this
      ->get($name);
  }
  return $properties;
}