You are here

public function ReferenceUpgrader::registerEntity in Inline Entity Form 8

File

src/ReferenceUpgrader.php, line 28

Class

ReferenceUpgrader
Class ReferenceUpgrader

Namespace

Drupal\inline_entity_form

Code

public function registerEntity(EntityInterface $entity) {
  $entityId = $entity
    ->id() ?? $this
    ->throwNeedsId();
  $this->entities[$entity
    ->getEntityTypeId()][$entityId] = $entity;
}