function FieldableEntityInterface::toArray

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/FieldableEntityInterface.php \Drupal\Core\Entity\FieldableEntityInterface::toArray()
  2. 10 core/lib/Drupal/Core/Entity/FieldableEntityInterface.php \Drupal\Core\Entity\FieldableEntityInterface::toArray()
  3. 11.x core/lib/Drupal/Core/Entity/FieldableEntityInterface.php \Drupal\Core\Entity\FieldableEntityInterface::toArray()

Gets an array of all field values.

Gets an array of plain field values, including only non-computed values. Note that the structure varies by entity type and bundle.

Return value

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

Overrides EntityInterface::toArray

File

core/lib/Drupal/Core/Entity/FieldableEntityInterface.php, line 137

Class

FieldableEntityInterface
Interface for entities having fields.

Namespace

Drupal\Core\Entity

Code

public function toArray();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.