You are here

public function NodeViewCountRecordsManagerInterface::getNodeViewsCount in Node view count 8

Return count of node views.

Parameters

\Drupal\node\NodeInterface $node: Node object.

\Drupal\user\UserInterface $user: Chosen user for counting or NULL for counting node views of all users.

bool $distinct_users: Should same user node view count as 1 view.

Return value

int Count of node views.

1 method overrides NodeViewCountRecordsManagerInterface::getNodeViewsCount()
NodeViewCountRecordsManager::getNodeViewsCount in src/NodeViewCountRecordsManager.php
Return count of node views.

File

src/NodeViewCountRecordsManagerInterface.php, line 39

Class

NodeViewCountRecordsManagerInterface
Provides an interface for interfering with nodeviewcount records.

Namespace

Drupal\nodeviewcount

Code

public function getNodeViewsCount(NodeInterface $node, UserInterface $user = NULL, $distinct_users = FALSE);