You are here

public function EntityReferenceFieldItemNormalizer::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php \Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer::__construct()

Constructs an EntityReferenceFieldItemNormalizer object.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

File

core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php, line 36

Class

EntityReferenceFieldItemNormalizer
Adds the file URI to embedded file entities.

Namespace

Drupal\serialization\Normalizer

Code

public function __construct(EntityRepositoryInterface $entity_repository) {
  $this->entityRepository = $entity_repository;
}