You are here

public function EntityViewController::__construct in Drupal 8

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

Creates an EntityViewController object.

Parameters

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

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

2 calls to EntityViewController::__construct()
NodePreviewController::__construct in core/modules/node/src/Controller/NodePreviewController.php
Creates an NodeViewController object.
NodeViewController::__construct in core/modules/node/src/Controller/NodeViewController.php
Creates an NodeViewController object.
2 methods override EntityViewController::__construct()
NodePreviewController::__construct in core/modules/node/src/Controller/NodePreviewController.php
Creates an NodeViewController object.
NodeViewController::__construct in core/modules/node/src/Controller/NodeViewController.php
Creates an NodeViewController object.

File

core/lib/Drupal/Core/Entity/Controller/EntityViewController.php, line 47

Class

EntityViewController
Defines a generic controller to render a single entity.

Namespace

Drupal\Core\Entity\Controller

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer) {
  $this->entityTypeManager = $entity_type_manager;
  $this->renderer = $renderer;
}