/**
  * @param PaginationParams $params
  * @return RangeAdvancePagination
  */
 public function getPagination(PaginationParams $params)
 {
     if (!$params instanceof RangePaginationParams) {
         throw new \RuntimeException('Wrong Pagination Params, need RangePaginationParams');
     }
     $pagination = new RangeAdvancePagination($this->router, $params->getRoute(), $params->getRouteParam(), $params->getLimit(), $params->getNbElement(), $params->getIdPage(), $params->getRange());
     return $pagination;
 }
Ejemplo n.º 2
0
 /**
  * @return Pagination
  */
 public function getPagination(PaginationParams $params)
 {
     $pagination = new Pagination($this->router, $params->getRoute(), $params->getRouteParam(), $params->getLimit(), $params->getNbElement(), $params->getIdPage());
     return $pagination;
 }