function EntityReferenceFieldItemNormalizer::__construct

Same name in other branches
  1. 9 core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php \Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer::__construct()
  2. 10 core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php \Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer::__construct()
  3. 11.x core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php \Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer::__construct()

Constructs a EntityReferenceFieldItemNormalizer object.

Parameters

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

File

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

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;
}

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