function NodeController::__construct

Same name and namespace in other branches
  1. 11.x core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::__construct()
  2. 10 core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::__construct()
  3. 9 core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::__construct()
  4. 8.9.x core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::__construct()

Constructs a NodeController object.

Parameters

\Drupal\Core\Datetime\DateFormatterInterface $dateFormatter: The date formatter service.

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

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

File

core/modules/node/src/Controller/NodeController.php, line 33

Class

NodeController
Returns responses for Node routes.

Namespace

Drupal\node\Controller

Code

public function __construct(protected DateFormatterInterface $dateFormatter, protected RendererInterface $renderer, protected EntityRepositoryInterface $entityRepository) {
}

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