You are here

public function TrackerController::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/tracker/src/Controller/TrackerController.php \Drupal\tracker\Controller\TrackerController::__construct()

Constructs a TrackerController object.

Parameters

\Drupal\Core\Database\Connection $database: The database connection.

\Drupal\Core\Database\Connection $databaseReplica: The database replica connection.

\Drupal\comment\CommentStatisticsInterface $commentStatistics: The comment statistics.

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

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

File

core/modules/tracker/src/Controller/TrackerController.php, line 71

Class

TrackerController
Controller for tracker pages.

Namespace

Drupal\tracker\Controller

Code

public function __construct(Connection $database, Connection $databaseReplica, CommentStatisticsInterface $commentStatistics, DateFormatterInterface $dateFormatter, EntityTypeManagerInterface $entityTypeManager) {
  $this->database = $database;
  $this->databaseReplica = $databaseReplica;
  $this->commentStatistics = $commentStatistics;
  $this->dateFormatter = $dateFormatter;
  $this->entityTypeManager = $entityTypeManager;
  $this->nodeStorage = $entityTypeManager
    ->getStorage('node');
}