Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
monitoring/commands: Add `ToggleNotificationsCommandForm'
`ToggleNotificationsCommandForm' is the form for enabling/disabling host and service notifications on an Icinga instance. refs #6593
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
modules/monitoring/application/forms/Command/Instance/ToggleNotificationsCommandForm.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
// {{{ICINGA_LICENSE_HEADER}}} | ||
// {{{ICINGA_LICENSE_HEADER}}} | ||
|
||
namespace Icinga\Module\Monitoring\Form\Command\Instance; | ||
|
||
use Icinga\Module\Monitoring\Command\Instance\ToggleNotifications; | ||
|
||
/** | ||
* Form for enabling/disabling host and service notifications on an Icinga instance | ||
*/ | ||
class ToggleNotificationsCommandForm extends ToggleFeatureCommandForm | ||
{ | ||
/** | ||
* (non-PHPDoc) | ||
* @see \Zend_Form::init() For the method documentation. | ||
*/ | ||
public function init() | ||
{ | ||
$this->setSubmitLabel(mt('monitoring', 'Toggle Notifications')); | ||
$this->setFeature('notifications_enabled', mt('monitoring', 'Notifications Enabled')); | ||
} | ||
|
||
/** | ||
* Get the command which is to be sent to an Icinga instance | ||
* | ||
* @return ToggleNotifications | ||
*/ | ||
public function getCommand() | ||
{ | ||
return new ToggleNotifications(); | ||
} | ||
} |