You are here

public function NodeViewSubscriber::__construct in Open Social 8.5

Same name and namespace in other branches
  1. 8.9 modules/custom/social_node_statistics/src/EventSubscriber/NodeViewSubscriber.php \Drupal\social_node_statistics\EventSubscriber\NodeViewSubscriber::__construct()
  2. 8.4 modules/custom/social_node_statistics/src/EventSubscriber/NodeViewSubscriber.php \Drupal\social_node_statistics\EventSubscriber\NodeViewSubscriber::__construct()
  3. 8.6 modules/custom/social_node_statistics/src/EventSubscriber/NodeViewSubscriber.php \Drupal\social_node_statistics\EventSubscriber\NodeViewSubscriber::__construct()
  4. 8.7 modules/custom/social_node_statistics/src/EventSubscriber/NodeViewSubscriber.php \Drupal\social_node_statistics\EventSubscriber\NodeViewSubscriber::__construct()
  5. 8.8 modules/custom/social_node_statistics/src/EventSubscriber/NodeViewSubscriber.php \Drupal\social_node_statistics\EventSubscriber\NodeViewSubscriber::__construct()

Constructor.

Parameters

\Drupal\Core\Database\Connection $database: The database connection.

\Drupal\Core\Session\AccountProxyInterface $account: The user account.

\Drupal\Core\Routing\CurrentRouteMatch $matcher: The route matcher.

\Drupal\Component\Datetime\TimeInterface $time: The system time.

File

modules/custom/social_node_statistics/src/EventSubscriber/NodeViewSubscriber.php, line 62

Class

NodeViewSubscriber
Class NodeViewSubscriber.

Namespace

Drupal\social_node_statistics\EventSubscriber

Code

public function __construct(Connection $database, AccountProxyInterface $account, CurrentRouteMatch $matcher, TimeInterface $time) {
  $this->database = $database;
  $this->account = $account;
  $this->routeMatcher = $matcher;
  $this->time = $time;
}