FilterEditor: allow additional parameter control

We may want to keep additional parameters in our url and ignore other
ones when the filter changes
This commit is contained in:
Thomas Gelf 2014-11-15 22:57:25 +01:00
parent 269f4b4c83
commit c5ca3b633c

View File

@ -24,6 +24,12 @@ class FilterEditor extends AbstractWidget
protected $query;
protected $url;
protected $preserveParams = array();
protected $ignoreParams = array();
/**
* @var string
*/
@ -76,6 +82,18 @@ class FilterEditor extends AbstractWidget
return $this;
}
public function ignoreParams()
{
$this->ignoreParams = func_get_args();
return $this;
}
public function preserveParams()
{
$this->preserveParams = func_get_args();
return $this;
}
protected function select($name, $list, $selected, $attributes = null)
{
$view = $this->view();