public function markAllNotificationsAsSeen(AccountInterface $account) {

    // Retrieve all the activities referring this entity for this account.
    $ids = $this->getNotificationIds($account, [ACTIVITY_STATUS_RECEIVED]);

    foreach ($ids as $activity_id) {
      $activity = Activity::load($activity_id);
      $this->changeStatusOfActivity($activity, ACTIVITY_STATUS_SEEN);
    }

    $remaining_notifications = 0;
    return $remaining_notifications;
  }
public function markAllNotificationsAsSeen(AccountInterface $account) {

    // Retrieve all the activities referring this entity for this account.
    $ids = $this->getNotificationIds($account, [ACTIVITY_STATUS_RECEIVED]);

    foreach ($ids as $activity_id) {
      $activity = Activity::load($activity_id);
      $this->changeStatusOfActivity($activity, ACTIVITY_STATUS_SEEN);
    }

    $remaining_notifications = 0;
    return $remaining_notifications;
  }
public function markAllNotificationsAsSeen ( AccountInterface $ account ) { // Retrieve all the activities referring this entity for this account. $ ids = $ this -> getNotificationIds ( $ account , [ ACTIVITY_STATUS_RECEIVED ] ) ; foreach ( $ ids as $ activity_id ) { $ activity = Activity :: load ( $ activity_id ) ; $ this -> changeStatusOfActivity ( $ activity , ACTIVITY_STATUS_SEEN ) ; } $ remaining_notifications = 0 ; return $ remaining_notifications ; }
Mark all notifications as Seen for account.

@param \Drupal\Core\Session\AccountInterface $account
Account object.

@return int
Number of remaining notifications.
Mark all notifications as Seen for account .