function StatisticsStorageInterface::fetchAll

Same name in other branches
  1. 9 core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchAll()
  2. 8.9.x core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchAll()
  3. 10 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.

File

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

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.