2014-10-29 15:40:34 +01:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2014-10-29 15:40:34 +01:00
|
|
|
|
2014-11-14 11:17:22 +01:00
|
|
|
namespace Icinga\Module\Monitoring\Forms\Setup;
|
2014-10-29 15:40:34 +01:00
|
|
|
|
|
|
|
use Icinga\Web\Form;
|
2014-11-14 11:17:22 +01:00
|
|
|
use Icinga\Module\Monitoring\Forms\Config\InstanceConfigForm;
|
2014-10-29 15:40:34 +01:00
|
|
|
|
|
|
|
class InstancePage extends Form
|
|
|
|
{
|
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
$this->setName('setup_monitoring_instance');
|
2015-03-02 18:36:04 +01:00
|
|
|
$this->setTitle($this->translate('Monitoring Instance', 'setup.page.title'));
|
|
|
|
$this->addDescription($this->translate(
|
|
|
|
'Please define the settings specific to your monitoring instance below.'
|
|
|
|
));
|
2014-10-29 15:40:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function createElements(array $formData)
|
|
|
|
{
|
|
|
|
$instanceConfigForm = new InstanceConfigForm();
|
2015-07-03 15:07:58 +02:00
|
|
|
$this->addSubForm($instanceConfigForm, 'instance_form');
|
|
|
|
$instanceConfigForm->create($formData);
|
|
|
|
$instanceConfigForm->getElement('name')->setValue('icinga');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getValues($suppressArrayNotation = false)
|
|
|
|
{
|
|
|
|
return $this->getSubForm('instance_form')->getValues($suppressArrayNotation);
|
2014-10-29 15:40:34 +01:00
|
|
|
}
|
|
|
|
}
|