You are here

public function OverviewController::__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\Extension\ModuleHandlerInterface $moduleHandler: A module handler.

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

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

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

Overrides ControllerBase::__construct

File

modules/mongodb_watchdog/src/Controller/OverviewController.php, line 101

Class

OverviewController
The controller for the logger overview page.

Namespace

Drupal\mongodb_watchdog\Controller

Code

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

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