mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Add SPDX license headers and mark source files as GPL-3.0-or-later to preserve the option to relicense under later GPL versions.
45 lines
941 B
PHP
45 lines
941 B
PHP
<?php
|
|
|
|
// SPDX-FileCopyrightText: 2021 Icinga GmbH <https://icinga.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
namespace Icinga\Module\Icingadb\Command\Object;
|
|
|
|
/**
|
|
* Send custom notifications for a host or service
|
|
*/
|
|
class SendCustomNotificationCommand extends WithCommentCommand
|
|
{
|
|
/**
|
|
* Whether the notification is forced
|
|
*
|
|
* Forced notifications are sent out regardless of time restrictions and whether or not notifications are enabled.
|
|
*
|
|
* @var bool
|
|
*/
|
|
protected $forced;
|
|
|
|
/**
|
|
* Get whether to force the notification
|
|
*
|
|
* @return ?bool
|
|
*/
|
|
public function getForced()
|
|
{
|
|
return $this->forced;
|
|
}
|
|
|
|
/**
|
|
* Set whether to force the notification
|
|
*
|
|
* @param bool $forced
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setForced(bool $forced = true): self
|
|
{
|
|
$this->forced = $forced;
|
|
|
|
return $this;
|
|
}
|
|
}
|