function NodeStatisticsDatabaseStorage::__construct
Same name in other branches
- 8.9.x core/modules/statistics/src/NodeStatisticsDatabaseStorage.php \Drupal\statistics\NodeStatisticsDatabaseStorage::__construct()
- 10 core/modules/statistics/src/NodeStatisticsDatabaseStorage.php \Drupal\statistics\NodeStatisticsDatabaseStorage::__construct()
- 11.x 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\statisticsCode
public function __construct(Connection $connection, StateInterface $state, RequestStack $request_stack) {
$this->connection = $connection;
$this->state = $state;
$this->requestStack = $request_stack;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.