function StatisticsStorageInterface::fetchAll

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

Returns the number of times an entity has been viewed.

Parameters

string $order: The counter name to order by:

  • 'totalcount' The total number of views.
  • 'daycount' The number of views today.
  • 'timestamp' The unix timestamp of the last view.

int $limit: The number of entity IDs to return.

Return value

array An ordered array of entity IDs.

1 method overrides StatisticsStorageInterface::fetchAll()
NodeStatisticsDatabaseStorage::fetchAll in core/modules/statistics/src/NodeStatisticsDatabaseStorage.php
Returns the number of times an entity has been viewed.

File

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

Class

StatisticsStorageInterface
Provides an interface defining Statistics Storage.

Namespace

Drupal\statistics

Code

public function fetchAll($order = 'totalcount', $limit = 5);

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