function DbLogController::__construct

Same name in other branches
  1. 9 core/modules/dblog/src/Controller/DbLogController.php \Drupal\dblog\Controller\DbLogController::__construct()
  2. 8.9.x core/modules/dblog/src/Controller/DbLogController.php \Drupal\dblog\Controller\DbLogController::__construct()
  3. 11.x core/modules/dblog/src/Controller/DbLogController.php \Drupal\dblog\Controller\DbLogController::__construct()

Constructs a DbLogController object.

Parameters

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: A module handler.

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

\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder service.

File

core/modules/dblog/src/Controller/DbLogController.php, line 62

Class

DbLogController
Returns responses for dblog routes.

Namespace

Drupal\dblog\Controller

Code

public function __construct(Connection $database, ModuleHandlerInterface $module_handler, DateFormatterInterface $date_formatter, FormBuilderInterface $form_builder) {
    $this->database = $database;
    $this->moduleHandler = $module_handler;
    $this->dateFormatter = $date_formatter;
    $this->formBuilder = $form_builder;
    $this->userStorage = $this->entityTypeManager()
        ->getStorage('user');
}

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