You are here

public function ReportController::__construct in Redis 8

ReportController constructor.

Parameters

\Drupal\redis\ClientFactory $client_factory: The client factory.

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

File

src/Controller/ReportController.php, line 44

Class

ReportController
Redis Report page.

Namespace

Drupal\redis\Controller

Code

public function __construct(ClientFactory $client_factory, DateFormatterInterface $date_formatter) {
  if (ClientFactory::hasClient()) {
    $this->redis = $client_factory
      ->getClient();
  }
  else {
    $this->redis = FALSE;
  }
  $this->dateFormatter = $date_formatter;
}