mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-22 13:24:24 +02:00
FilterEditor: Require an instance of Filterable for setQuery()
refs #9029
This commit is contained in:
parent
fc35f3e46b
commit
2e7ff7dd6e
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Web\Widget;
|
namespace Icinga\Web\Widget;
|
||||||
|
|
||||||
|
use Icinga\Data\Filterable;
|
||||||
use Icinga\Data\Filter\Filter;
|
use Icinga\Data\Filter\Filter;
|
||||||
use Icinga\Data\Filter\FilterExpression;
|
use Icinga\Data\Filter\FilterExpression;
|
||||||
use Icinga\Data\Filter\FilterChain;
|
use Icinga\Data\Filter\FilterChain;
|
||||||
@ -25,6 +26,11 @@ class FilterEditor extends AbstractWidget
|
|||||||
*/
|
*/
|
||||||
private $filter;
|
private $filter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The query to filter
|
||||||
|
*
|
||||||
|
* @var Filterable
|
||||||
|
*/
|
||||||
protected $query;
|
protected $query;
|
||||||
|
|
||||||
protected $url;
|
protected $url;
|
||||||
@ -112,7 +118,14 @@ class FilterEditor extends AbstractWidget
|
|||||||
return $this->preservedUrl;
|
return $this->preservedUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setQuery($query)
|
/**
|
||||||
|
* Set the query to filter
|
||||||
|
*
|
||||||
|
* @param Filterable $query
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setQuery(Filterable $query)
|
||||||
{
|
{
|
||||||
$this->query = $query;
|
$this->query = $query;
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user