FilterEditor: add getter and setter for Filter

We will shift quite some logic over here
This commit is contained in:
Thomas Gelf 2014-11-15 22:52:55 +01:00
parent a75bfd1dfb
commit e75d0aa10e
1 changed files with 14 additions and 0 deletions

View File

@ -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)
{
$view = $this->view();