summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Command/Object/ScheduleHostDowntimeCommand.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Icingadb/Command/Object/ScheduleHostDowntimeCommand.php')
-rw-r--r--library/Icingadb/Command/Object/ScheduleHostDowntimeCommand.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/library/Icingadb/Command/Object/ScheduleHostDowntimeCommand.php b/library/Icingadb/Command/Object/ScheduleHostDowntimeCommand.php
new file mode 100644
index 0000000..0e4d84f
--- /dev/null
+++ b/library/Icingadb/Command/Object/ScheduleHostDowntimeCommand.php
@@ -0,0 +1,42 @@
+<?php
+
+/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */
+
+namespace Icinga\Module\Icingadb\Command\Object;
+
+/**
+ * Schedule a host downtime
+ */
+class ScheduleHostDowntimeCommand extends ScheduleServiceDowntimeCommand
+{
+ /**
+ * Whether to schedule a downtime for all services associated with a particular host
+ *
+ * @var bool
+ */
+ protected $forAllServices = false;
+
+ /**
+ * Set whether to schedule a downtime for all services associated with a particular host
+ *
+ * @param bool $forAllServices
+ *
+ * @return $this
+ */
+ public function setForAllServices(bool $forAllServices = true): self
+ {
+ $this->forAllServices = $forAllServices;
+
+ return $this;
+ }
+
+ /**
+ * Get whether to schedule a downtime for all services associated with a particular host
+ *
+ * @return bool
+ */
+ public function getForAllServices(): bool
+ {
+ return $this->forAllServices;
+ }
+}