Paginator: relax requirements to Paginatable
* we need no full query interface here * introduced new interface "Paginatable" fixes #9483
This commit is contained in:
parent
593f90f330
commit
727a2d7141
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||
|
||||
namespace Icinga\Data;
|
||||
|
||||
use Countable;
|
||||
|
||||
interface Paginatable extends Limitable, Countable {};
|
||||
|
|
@ -3,6 +3,4 @@
|
|||
|
||||
namespace Icinga\Data;
|
||||
|
||||
use Countable;
|
||||
|
||||
interface QueryInterface extends Fetchable, Filterable, Limitable, Sortable, Countable {};
|
||||
interface QueryInterface extends Fetchable, Filterable, Paginatable, Sortable {};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Icinga\Web\Widget;
|
||||
|
||||
use Icinga\Data\QueryInterface;
|
||||
use Icinga\Data\Paginatable;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@ class Paginator extends AbstractWidget
|
|||
/**
|
||||
* The query the paginator widget is created for
|
||||
*
|
||||
* @var QueryInterface
|
||||
* @var Paginatable
|
||||
*/
|
||||
protected $query;
|
||||
|
||||
|
@ -28,11 +28,11 @@ class Paginator extends AbstractWidget
|
|||
/**
|
||||
* Set the query to create the paginator widget for
|
||||
*
|
||||
* @param QueryInterface $query
|
||||
* @param Paginatable $query
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQuery(QueryInterface $query)
|
||||
public function setQuery(Paginatable $query)
|
||||
{
|
||||
$this->query = $query;
|
||||
return $this;
|
||||
|
|
Loading…
Reference in New Issue