public function LoginHistoryController::__construct in Login History 8
Constructs a LoginHistoryController object.
Parameters
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.
\Drupal\Core\Database\Connection|null $database: The database connection.
\Drupal\Core\Entity\EntityTypeManagerInterface|null $entity_type_manager: The entity type manager.
File
- src/
Controller/ LoginHistoryController.php, line 53
Class
- LoginHistoryController
- Controller routines for Login history routes.
Namespace
Drupal\login_history\ControllerCode
public function __construct(DateFormatterInterface $date_formatter, Connection $database = NULL, EntityTypeManagerInterface $entity_type_manager = NULL) {
$this->dateFormatter = $date_formatter;
$this->database = $database ?: \Drupal::database();
$this->entityTypeManager = $entity_type_manager ?: \Drupal::entityTypeManager();
}