You are here

public function RequestController::__construct in MongoDB 8.2

Controller constructor.

Parameters

\Psr\Log\LoggerInterface $logger: The logger service, to log intervening events.

\Drupal\mongodb_watchdog\Logger $watchdog: The MongoDB logger, to load stored events.

\Drupal\Core\Config\ImmutableConfig $config: The module configuration.

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

\Drupal\Core\Pager\PagerManagerInterface $pagerManager: The core pager.manager service.

\Drupal\Core\Logger\RfcLogLevel $rfcLogLevel: A RfcLogLevel instance, to avoid static access.

Overrides ControllerBase::__construct

File

modules/mongodb_watchdog/src/Controller/RequestController.php, line 61

Class

RequestController
The controller for the request events page.

Namespace

Drupal\mongodb_watchdog\Controller

Code

public function __construct(LoggerInterface $logger, Logger $watchdog, ImmutableConfig $config, DateFormatterInterface $dateFormatter, PagerManagerInterface $pagerManager, RfcLogLevel $rfcLogLevel) {
  parent::__construct($logger, $watchdog, $pagerManager, $config);
  $this->dateFormatter = $dateFormatter;
  $this->rfcLogLevel = $rfcLogLevel;

  // Add terminal "/".
  $this->rootLength = mb_strlen(DRUPAL_ROOT) + 1;
}