diff --git a/library/Icinga/Web/Dashboard/Common/WidgetState.php b/library/Icinga/Web/Dashboard/Common/WidgetState.php new file mode 100644 index 000000000..40e2c6251 --- /dev/null +++ b/library/Icinga/Web/Dashboard/Common/WidgetState.php @@ -0,0 +1,73 @@ +disabled = $disabled; + + return $this; + } + + /** + * Get whether this widget has been disabled + * + * @return bool + */ + public function isDisabled(): bool + { + return $this->disabled; + } + + /** + * Set whether this widget is currently being loaded + * + * @param bool $active + * + * @return $this + */ + public function setActive(bool $active = true): self + { + $this->active = $active; + + return $this; + } + + /** + * Get whether this widget is currently being loaded + * + * This indicates which dashboard tab is currently open if this widget type is a Dashboard Pane + * or whether the Dashboard Home in the navigation bar is active/focused + * + * @return bool + */ + public function isActive(): bool + { + return $this->active; + } +}