You are here

public function NodeStatisticsDatabaseStorage::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 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.

File

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

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;
}