You are here

public function FieldableEdgeEntityBase::getFieldDefinitions in Apigee Edge 8

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\EntityFieldManagerInterface::getFieldDefinitions()

3 calls to FieldableEdgeEntityBase::getFieldDefinitions()
FieldableEdgeEntityBase::getFieldDefinition in src/Entity/FieldableEdgeEntityBase.php
Gets the definition of a contained field.
FieldableEdgeEntityBase::getFields in src/Entity/FieldableEdgeEntityBase.php
Gets an array of all field item lists.
FieldableEdgeEntityBase::getTranslatableFields in src/Entity/FieldableEdgeEntityBase.php
Gets an array of field item lists for translatable fields.

File

src/Entity/FieldableEdgeEntityBase.php, line 319

Class

FieldableEdgeEntityBase
Base field support for Apigee Entities without making them content entities.

Namespace

Drupal\apigee_edge\Entity

Code

public function getFieldDefinitions() {
  if (!isset($this->fieldDefinitions)) {
    $this->fieldDefinitions = \Drupal::service('entity_field.manager')
      ->getFieldDefinitions($this->entityTypeId, $this
      ->bundle());
  }
  return $this->fieldDefinitions;
}