function EntityRevisionParamConverter::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/ParamConverter/EntityRevisionParamConverter.php \Drupal\Core\ParamConverter\EntityRevisionParamConverter::__construct()
  2. 10 core/lib/Drupal/Core/ParamConverter/EntityRevisionParamConverter.php \Drupal\Core\ParamConverter\EntityRevisionParamConverter::__construct()
  3. 11.x core/lib/Drupal/Core/ParamConverter/EntityRevisionParamConverter.php \Drupal\Core\ParamConverter\EntityRevisionParamConverter::__construct()

Creates a new EntityRevisionParamConverter instance.

Parameters

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

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

File

core/lib/Drupal/Core/ParamConverter/EntityRevisionParamConverter.php, line 54

Class

EntityRevisionParamConverter
Parameter converter for upcasting entity revision 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;
}

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