Skip to content

Commit

Permalink
monitoring/commands: Add `ToggleNotificationsCommandForm'
Browse files Browse the repository at this point in the history
`ToggleNotificationsCommandForm' is the form for enabling/disabling host and service notifications on an Icinga instance.

refs #6593
  • Loading branch information
lippserd committed Sep 4, 2014
1 parent bc1d00f commit 3d0a74b
Showing 1 changed file with 33 additions and 0 deletions.
@@ -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();
}
}

0 comments on commit 3d0a74b

Please sign in to comment.