FilterEditor: make constructor parameter optional

...and use new setters
This commit is contained in:
Thomas Gelf 2014-11-15 23:02:38 +01:00
parent c5ca3b633c
commit 44d5ee8fa0

View File

@ -42,9 +42,11 @@ class FilterEditor extends AbstractWidget
*/ */
public function __construct($props) public function __construct($props)
{ {
$this->filter = $props['filter']; if (array_key_exists('filter', $props)) {
$this->setFilter($props['filter']);
}
if (array_key_exists('query', $props)) { if (array_key_exists('query', $props)) {
$this->query = $props['query']; $this->setQuery($props['query']);
} }
} }