Вход Регистрация
Файл: concrete5.7.5.6/concrete/src/Gathering/Item/ItemList.php
Строк: 28
<?php
namespace ConcreteCoreGatheringItem;
use 
Loader;
use 
ConcreteCoreLegacyDatabaseItemList;
class 
ItemList extends DatabaseItemList {

    protected 
$itemsPerPage 24;

    public function 
__construct(Gathering $ag) {
        
$this->setQuery('select gaiID from GatheringItems');
        
$this->filter('gaID'$ag->getGatheringID());
        
$this->filter('gaiIsDeleted'0);
    }

    public function 
filterByPublicDate($item$operator) {
        
$this->filter('gaiPublicDateTime'$item$operator);
    }

    public function 
sortByDateDescending() {
        
$this->sortByMultiple('gaiBatchTimestamp desc''gaiBatchDisplayOrder asc');
    }

    public function 
sortByDateAscending() {
        
$this->sortByMultiple('gaiBatchTimestamp asc''gaiBatchDisplayOrder desc');
    }

    public function 
get($itemsToGet 10000$offset 0) {
        
$items = array();
        
$r parent::get($itemsToGetintval($offset));
        foreach(
$r as $row) {
            
$ag GatheringItem::getByID($row['gaiID']);
            if (
is_object($ag)) {
                
$items[] = $ag;
            }
        }
        return 
$items;
    }

}
Онлайн: 2
Реклама