function StatisticsStorageInterface::fetchViews

Same name in other branches
  1. 8.9.x core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchViews()
  2. 10 core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchViews()
  3. 11.x core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchViews()

Returns the number of times entities have been viewed.

Parameters

array $ids: An array of IDs of entities to fetch the views for.

Return value

\Drupal\statistics\StatisticsViewsResult[] An array of value objects representing the number of times each entity has been viewed. The array is keyed by entity ID. If an ID does not exist, it will not be present in the array.

1 method overrides StatisticsStorageInterface::fetchViews()
NodeStatisticsDatabaseStorage::fetchViews in core/modules/statistics/src/NodeStatisticsDatabaseStorage.php
Returns the number of times entities have been viewed.

File

core/modules/statistics/src/StatisticsStorageInterface.php, line 35

Class

StatisticsStorageInterface
Provides an interface defining Statistics Storage.

Namespace

Drupal\statistics

Code

public function fetchViews($ids);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.