You are here

public function EntityConverter::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/ParamConverter/EntityConverter.php \Drupal\Core\ParamConverter\EntityConverter::__construct()

Constructs a new EntityConverter.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

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

See also

https://www.drupal.org/node/2938929

1 call to EntityConverter::__construct()
AdminPathConfigEntityConverter::__construct in core/lib/Drupal/Core/ParamConverter/AdminPathConfigEntityConverter.php
Constructs a new EntityConverter.
1 method overrides EntityConverter::__construct()
AdminPathConfigEntityConverter::__construct in core/lib/Drupal/Core/ParamConverter/AdminPathConfigEntityConverter.php
Constructs a new EntityConverter.

File

core/lib/Drupal/Core/ParamConverter/EntityConverter.php, line 109

Class

EntityConverter
Parameter converter for upcasting entity IDs to full objects.

Namespace

Drupal\Core\ParamConverter

Code

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