You are here

public function EntityController::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/Controller/EntityController.php \Drupal\Core\Entity\Controller\EntityController::__construct()

Constructs a new EntityController.

Parameters

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

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.

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

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator.

File

core/lib/Drupal/Core/Entity/Controller/EntityController.php, line 83

Class

EntityController
Provides the add-page and title callbacks for entities.

Namespace

Drupal\Core\Entity\Controller

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityRepositoryInterface $entity_repository, RendererInterface $renderer, TranslationInterface $string_translation, UrlGeneratorInterface $url_generator) {
  $this->entityTypeManager = $entity_type_manager;
  $this->entityTypeBundleInfo = $entity_type_bundle_info;
  $this->entityRepository = $entity_repository;
  $this->renderer = $renderer;
  $this->stringTranslation = $string_translation;
  $this->urlGenerator = $url_generator;
}