diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php index d6f186fdd..f512ffe67 100644 --- a/library/Icinga/Web/Widget/FilterEditor.php +++ b/library/Icinga/Web/Widget/FilterEditor.php @@ -55,6 +55,13 @@ class FilterEditor extends AbstractWidget */ private $selectedIdx; + /** + * Whether the filter control is visible + * + * @var bool + */ + protected $visible = true; + /** * Create a new FilterWidget * @@ -144,6 +151,30 @@ class FilterEditor extends AbstractWidget return $this; } + /** + * Get whether the filter control is visible + * + * @return bool + */ + public function isVisible() + { + return $this->visible; + } + + /** + * Set whether the filter control is visible + * + * @param bool $visible + * + * @return $this + */ + public function setVisible($visible) + { + $this->visible = (bool) $visible; + + return $this; + } + protected function redirectNow($url) { $response = Icinga::app()->getFrontController()->getResponse(); @@ -731,6 +762,9 @@ class FilterEditor extends AbstractWidget public function render() { + if (! $this->visible) { + return ''; + } if (! $this->preservedUrl()->getParam('modifyFilter')) { return '