public ContentEntityBase::getFieldDefinitions()
Gets an array of field definitions of all contained fields.
Return value
\Drupal\Core\Field\FieldDefinitionInterface[] An array of field definitions, keyed by field name.
Overrides FieldableEntityInterface::getFieldDefinitions
See also
\Drupal\Core\Entity\EntityManagerInterface::getFieldDefinitions()
File
- core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 564
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\Entity
Code
public function getFieldDefinitions() { if (!isset($this->fieldDefinitions)) { $this->fieldDefinitions = $this->entityManager()->getFieldDefinitions($this->entityTypeId, $this->bundle()); } return $this->fieldDefinitions; }
Please login to continue.