FilterEditor: add getter and setter for Filter
We will shift quite some logic over here
This commit is contained in:
parent
a75bfd1dfb
commit
e75d0aa10e
|
@ -42,6 +42,20 @@ class FilterEditor extends AbstractWidget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setFilter(Filter $filter)
|
||||||
|
{
|
||||||
|
$this->filter = $filter;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFilter()
|
||||||
|
{
|
||||||
|
if ($this->filter === null) {
|
||||||
|
$this->filter = Filter::fromQueryString((string) $this->url()->getParams());
|
||||||
|
}
|
||||||
|
return $this->filter;
|
||||||
|
}
|
||||||
|
|
||||||
protected function select($name, $list, $selected, $attributes = null)
|
protected function select($name, $list, $selected, $attributes = null)
|
||||||
{
|
{
|
||||||
$view = $this->view();
|
$view = $this->view();
|
||||||
|
|
Loading…
Reference in New Issue