This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
<?php

class Concrete5_Model_SystemNotificationList extends DatabaseItemList {
    
    public function filterByType($type) {
        $db = Loader::db();
        $this->filter('sn.snTypeID', $type);
    }
    
    function __construct() {
        $this->setQuery("select sn.snID from SystemNotifications sn");
        $this->sortBy('snDateTime', 'desc');
    }

    public function get($itemsToGet = 0, $offset = 0) {
        $r = parent::get($itemsToGet, $offset);
        $posts = array();
        foreach($r as $row) {
            $sn = SystemNotification::getByID($row['snID']);
            if (is_object($sn)) {
                $posts[] = $sn;
            }
        }
        return $posts;
    }
    
}