You are here

public function ComplexDataInterface::toArray in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/TypedData/ComplexDataInterface.php \Drupal\Core\TypedData\ComplexDataInterface::toArray()
  2. 10 core/lib/Drupal/Core/TypedData/ComplexDataInterface.php \Drupal\Core\TypedData\ComplexDataInterface::toArray()

Returns an array of all property values.

Gets an array of plain property values including all not-computed properties.

Return value

array An array of property values, keyed by property name.

Throws

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

2 methods override ComplexDataInterface::toArray()
EntityAdapter::toArray in core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php
Returns an array of all property values.
Map::toArray in core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php
Returns an array of all property values.

File

core/lib/Drupal/Core/TypedData/ComplexDataInterface.php, line 95

Class

ComplexDataInterface
Interface for complex data; i.e. data containing named and typed properties.

Namespace

Drupal\Core\TypedData

Code

public function toArray();