ActivityModel::getNotificationsSince PHP Метод

getNotificationsSince() публичный Метод

Events: BeforeGetNotificationsSince.
С версии: 2.0.18
public getNotificationsSince ( integer $UserID, integer $LastActivityID, array | string $FilterToActivityTypeIDs = '', integer $Limit = 5 ) : Gdn_DataSet
$UserID integer Unique ID of user.
$LastActivityID integer ID of activity to start at.
$FilterToActivityTypeIDs array | string Limits returned activity to particular types.
$Limit integer Max number to return.
Результат Gdn_DataSet SQL results.
    public function getNotificationsSince($UserID, $LastActivityID, $FilterToActivityTypeIDs = '', $Limit = 5)
    {
        $this->activityQuery();
        $this->fireEvent('BeforeGetNotificationsSince');
        if (is_array($FilterToActivityTypeIDs)) {
            $this->SQL->whereIn('a.ActivityTypeID', $FilterToActivityTypeIDs);
        } else {
            $this->SQL->where('t.Notify', '1');
        }
        $Result = $this->SQL->where('RegardingUserID', $UserID)->where('a.ActivityID >', $LastActivityID)->limit($Limit, 0)->orderBy('a.ActivityID', 'desc')->get();
        return $Result;
    }