function ContentEntityBase::getFields
3 calls to ContentEntityBase::getFields()
- ContentEntityBase::getIterator in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - ContentEntityBase::referencedEntities in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - Gets a list of entities referenced by this entity.
- ContentEntityBase::toArray in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - Gets an array of all property values.
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php, line 664
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\EntityCode
public function getFields($include_computed = TRUE) {
$fields = [];
foreach ($this->getFieldDefinitions() as $name => $definition) {
if ($include_computed || !$definition->isComputed()) {
$fields[$name] = $this->get($name);
}
}
return $fields;
}