You are here

public function UuidResolver::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/serialization/src/EntityResolver/UuidResolver.php \Drupal\serialization\EntityResolver\UuidResolver::__construct()
  2. 10 core/modules/serialization/src/EntityResolver/UuidResolver.php \Drupal\serialization\EntityResolver\UuidResolver::__construct()

Constructs a UuidResolver object.

Parameters

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

File

core/modules/serialization/src/EntityResolver/UuidResolver.php, line 26

Class

UuidResolver
Resolves entities from data that contains an entity UUID.

Namespace

Drupal\serialization\EntityResolver

Code

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