From ba906d2fca5aa48d19197e4ae7154dbe0731fde1 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 29 Jul 2015 17:13:18 +0200 Subject: [PATCH] FilterEditor: allow to set custom filter columns --- library/Icinga/Web/Widget/FilterEditor.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php index 42561aeee..1b04bc71e 100644 --- a/library/Icinga/Web/Widget/FilterEditor.php +++ b/library/Icinga/Web/Widget/FilterEditor.php @@ -540,11 +540,17 @@ class FilterEditor extends AbstractWidget ); } + public function setColumns(array $columns) + { + $this->cachedColumnSelect = $this->arrayForSelect($columns); + return $this; + } + protected function selectColumn(Filter $filter = null) { $active = $filter === null ? null : $filter->getColumn(); - if ($this->query === null) { + if ($this->cachedColumnSelect === null && $this->query === null) { return sprintf( '', $this->elementId('column', $filter),