You are here

public function NodeStatisticsDatabaseStorage::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/statistics/src/NodeStatisticsDatabaseStorage.php \Drupal\statistics\NodeStatisticsDatabaseStorage::__construct()

Constructs the statistics storage.

Parameters

\Drupal\Core\Database\Connection $connection: The database connection for the node view storage.

\Drupal\Core\State\StateInterface $state: The state service.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

File

core/modules/statistics/src/NodeStatisticsDatabaseStorage.php, line 45

Class

NodeStatisticsDatabaseStorage
Provides the default database storage backend for statistics.

Namespace

Drupal\statistics

Code

public function __construct(Connection $connection, StateInterface $state, RequestStack $request_stack) {
  $this->connection = $connection;
  $this->state = $state;
  $this->requestStack = $request_stack;
}