Ldap\Query: Remove method paginate()
This commit is contained in:
parent
3296522d90
commit
73e8c51fd1
|
@ -281,31 +281,6 @@ class Query
|
||||||
return $this->sort_columns;
|
return $this->sort_columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a pagination adapter for the current query
|
|
||||||
*
|
|
||||||
* @return \Zend_Paginator
|
|
||||||
*/
|
|
||||||
public function paginate($limit = null, $page = null)
|
|
||||||
{
|
|
||||||
if ($page === null || $limit === null) {
|
|
||||||
$request = \Zend_Controller_Front::getInstance()->getRequest();
|
|
||||||
if ($page === null) {
|
|
||||||
$page = $request->getParam('page', 0);
|
|
||||||
}
|
|
||||||
if ($limit === null) {
|
|
||||||
$limit = $request->getParam('limit', 20);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$paginator = new \Zend_Paginator(
|
|
||||||
// TODO: Adapter doesn't fit yet:
|
|
||||||
new \Icinga\Web\Paginator\Adapter\QueryAdapter($this)
|
|
||||||
);
|
|
||||||
$paginator->setItemCountPerPage($limit);
|
|
||||||
$paginator->setCurrentPageNumber($page);
|
|
||||||
return $paginator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a filter expression to this query
|
* Add a filter expression to this query
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue