increaseViewCount() public static method

Increase the number of views for this item
public static increaseViewCount ( integer $id ) : array
$id integer
return array
Beispiel #1
0
 /**
  * Update the view count for this item
  */
 private function updateStatistics()
 {
     // view has been counted
     if (\SpoonSession::exists('viewed_faq_' . $this->record['id'])) {
         return;
     }
     // update view count
     FrontendFaqModel::increaseViewCount($this->record['id']);
     // save in session so we know this view has been counted
     \SpoonSession::set('viewed_faq_' . $this->record['id'], true);
 }