public function invoke(FilterableServiceInterface $service, $perPageCount, array $parameters = array())
    {
        $page = $this->getPageNumber();
        $sort = $this->getSortingColumn();
        $desc = $this->getDesc();

        $records = $service->filter($this->getData(), $page, $perPageCount, $sort, $desc, $parameters);

        // Tweak pagination if available
        if (method_exists($service, 'getPaginator')) {
            $paginator = $service->getPaginator();

            if ($paginator instanceof PaginatorInterface) {
                $paginator->setUrl($this->getPaginationUrl($page, $sort, $desc));
            }
        }

        return $records;
    }
public function invoke(FilterableServiceInterface $service, $perPageCount, array $parameters = array())
    {
        $page = $this->getPageNumber();
        $sort = $this->getSortingColumn();
        $desc = $this->getDesc();

        $records = $service->filter($this->getData(), $page, $perPageCount, $sort, $desc, $parameters);

        // Tweak pagination if available
        if (method_exists($service, 'getPaginator')) {
            $paginator = $service->getPaginator();

            if ($paginator instanceof PaginatorInterface) {
                $paginator->setUrl($this->getPaginationUrl($page, $sort, $desc));
            }
        }

        return $records;
    }
public function invoke ( FilterableServiceInterface $ service , $ perPageCount , array $ parameters = array ( ) ) { $ page = $ this -> getPageNumber ( ) ; $ sort = $ this -> getSortingColumn ( ) ; $ desc = $ this -> getDesc ( ) ; $ records = $ service -> filter ( $ this -> getData ( ) , $ page , $ perPageCount , $ sort , $ desc , $ parameters ) ; // Tweak pagination if available if ( method_exists ( $ service , 'getPaginator' ) ) { $ paginator = $ service -> getPaginator ( ) ; if ( $ paginator instanceof PaginatorInterface ) { $ paginator -> setUrl ( $ this -> getPaginationUrl ( $ page , $ sort , $ desc ) ) ; } } return $ records ; }
Invokes a filter

@param \Krystal\Db\Filter\FilterableServiceInterface $service
@param integer $perPageCount Amount of items to be display per page
@param array $parameters Custom user-defined parameters
@return array
Invokes a filter