monitoring/commands: Add `ToggleNotificationsCommandForm'

`ToggleNotificationsCommandForm' is the form for enabling/disabling host and service notifications on an Icinga instance.

refs #6593
This commit is contained in:
Eric Lippmann 2014-09-04 13:04:54 +02:00
parent bc1d00f146
commit 3d0a74bfdb
1 changed files with 33 additions and 0 deletions

View File

@ -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();
}
}