function StatisticsStorageInterface::fetchView
Same name in other branches
- 8.9.x core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchView()
- 10 core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchView()
- 11.x core/modules/statistics/src/StatisticsStorageInterface.php \Drupal\statistics\StatisticsStorageInterface::fetchView()
Returns the number of times a single entity has been viewed.
Parameters
int $id: The ID of the entity to fetch the views for.
Return value
\Drupal\statistics\StatisticsViewsResult|false If the entity exists, a value object representing the number of times if has been viewed. If it does not exist, FALSE is returned.
1 method overrides StatisticsStorageInterface::fetchView()
- NodeStatisticsDatabaseStorage::fetchView in core/
modules/ statistics/ src/ NodeStatisticsDatabaseStorage.php - Returns the number of times a single entity has been viewed.
File
-
core/
modules/ statistics/ src/ StatisticsStorageInterface.php, line 47
Class
- StatisticsStorageInterface
- Provides an interface defining Statistics Storage.
Namespace
Drupal\statisticsCode
public function fetchView($id);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.