function ComplexDataInterface::toArray
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/ComplexDataInterface.php \Drupal\Core\TypedData\ComplexDataInterface::toArray()
- 10 core/lib/Drupal/Core/TypedData/ComplexDataInterface.php \Drupal\Core\TypedData\ComplexDataInterface::toArray()
- 11.x 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\TypedDataCode
public function toArray();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.