function ContentEntityBase::getFieldDefinitions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::getFieldDefinitions()
  2. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::getFieldDefinitions()
  3. 11.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::getFieldDefinitions()
9 calls to ContentEntityBase::getFieldDefinitions()
ContentEntityBase::getFieldDefinition in core/lib/Drupal/Core/Entity/ContentEntityBase.php
ContentEntityBase::getFields in core/lib/Drupal/Core/Entity/ContentEntityBase.php
ContentEntityBase::getTranslatableFields in core/lib/Drupal/Core/Entity/ContentEntityBase.php
ContentEntityBase::hasTranslationChanges in core/lib/Drupal/Core/Entity/ContentEntityBase.php
ContentEntityBase::removeTranslation in core/lib/Drupal/Core/Entity/ContentEntityBase.php

... See full list

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 710

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 = \Drupal::service('entity_field.manager')->getFieldDefinitions($this->entityTypeId, $this->bundle());
    }
    return $this->fieldDefinitions;
}

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