FilterEditor: Require an instance of Filterable for setQuery()

refs #9029
This commit is contained in:
Johannes Meyer 2015-08-13 11:35:45 +02:00
parent fc35f3e46b
commit 2e7ff7dd6e
1 changed files with 14 additions and 1 deletions

View File

@ -3,6 +3,7 @@
namespace Icinga\Web\Widget;
use Icinga\Data\Filterable;
use Icinga\Data\Filter\Filter;
use Icinga\Data\Filter\FilterExpression;
use Icinga\Data\Filter\FilterChain;
@ -25,6 +26,11 @@ class FilterEditor extends AbstractWidget
*/
private $filter;
/**
* The query to filter
*
* @var Filterable
*/
protected $query;
protected $url;
@ -112,7 +118,14 @@ class FilterEditor extends AbstractWidget
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;
return $this;