You are here

public function StatisticsStorageInterface::fetchAll in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchAll()

Returns the number of times a 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 a entity has been viewed.

File

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

Class

StatisticsStorageInterface
Provides an interface defining Statistics Storage.

Namespace

Drupal\statistics

Code

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