public ContentEntityBase::getFields($include_computed = TRUE)
Gets an array of all field item lists.
bool $include_computed: If set to TRUE, computed fields are included. Defaults to TRUE.
\Drupal\Core\Field\FieldItemListInterface[] An array of field item lists implementing, keyed by field name.
Overrides FieldableEntityInterface::getFields
public function getFields($include_computed = TRUE) { $fields = array(); foreach ($this->getFieldDefinitions() as $name => $definition) { if ($include_computed || !$definition->isComputed()) { $fields[$name] = $this->get($name); } } return $fields; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!ContentEntityBase.php/function/ContentEntityBase::getFields/8.1.x