StatisticsStorageInterface
interface StatisticsStorageInterface (View source)
Provides an interface defining Statistics Storage.
Stores the views per day, total views and timestamp of last view for entities.
Methods
Counts an entity view.
Returns the number of times entities have been viewed.
Returns the number of times a single entity has been viewed.
Returns the number of times an entity has been viewed.
Delete counts for a specific entity.
Reset the day counter for all entities once every day.
Returns the highest 'totalcount' value.
Details
bool
recordView(int $id)
Counts an entity view.
StatisticsViewsResult[]
fetchViews(array $ids)
Returns the number of times entities have been viewed.
StatisticsViewsResult|false
fetchView(int $id)
Returns the number of times a single entity has been viewed.
array
fetchAll(string $order = 'totalcount', int $limit = 5)
Returns the number of times an entity has been viewed.
bool
deleteViews(int $id)
Delete counts for a specific entity.
resetDayCount()
Reset the day counter for all entities once every day.
int
maxTotalCount()
Returns the highest 'totalcount' value.