src/PageTypes/EventHolderController.php
public function FilteredUpdates($pageSize = 20)
    {
        $params = $this->parseParams();

        $items = $this->Updates(
            $params['tag'],
            $params['from'],
            $params['to'],
            $params['year'],
            $params['month']
        );

        if ($params['upcomingOnly']) {
            $items = $items->filter(['Date:LessThan:Not' => DBDatetime::now()->Format('y-MM-dd')]);
        }

        // Apply pagination
        $list = PaginatedList::create($items, $this->getRequest());
        $list->setPageLength($pageSize);
        return $list;
    }
public function FilteredUpdates($pageSize = 20)
    {
        $params = $this->parseParams();

        $items = $this->Updates(
            $params['tag'],
            $params['from'],
            $params['to'],
            $params['year'],
            $params['month']
        );

        if ($params['upcomingOnly']) {
            $items = $items->filter(['Date:LessThan:Not' => DBDatetime::now()->Format('y-MM-dd')]);
        }

        // Apply pagination
        $list = PaginatedList::create($items, $this->getRequest());
        $list->setPageLength($pageSize);
        return $list;
    }
public function FilteredUpdates ( $ pageSize = 20 ) { $ params = $ this -> parseParams ( ) ; $ items = $ this -> Updates ( $ params [ 'tag' ] , $ params [ 'from' ] , $ params [ 'to' ] , $ params [ 'year' ] , $ params [ 'month' ] ) ; if ( $ params [ 'upcomingOnly' ] ) { $ items = $ items -> filter ( [ 'Date:LessThan:Not' => DBDatetime :: now ( ) -> Format ( 'y-MM-dd' ) ] ) ; } // Apply pagination $ list = PaginatedList :: create ( $ items , $ this -> getRequest ( ) ) ; $ list -> setPageLength ( $ pageSize ) ; return $ list ; }
Get the events based on the current query.
Get the events based on the current query .