public function TrackerController::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/tracker/src/Controller/TrackerController.php \Drupal\tracker\Controller\TrackerController::__construct()
- 9 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\ControllerCode
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');
}