2014-09-01 16:16:56 +02:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2014-09-01 16:16:56 +02:00
|
|
|
|
2014-11-14 10:57:14 +01:00
|
|
|
namespace Icinga\Forms\Config;
|
2014-09-01 16:16:56 +02:00
|
|
|
|
2014-11-14 10:57:14 +01:00
|
|
|
use Icinga\Forms\Config\General\ApplicationConfigForm;
|
2015-10-01 00:02:02 +02:00
|
|
|
use Icinga\Forms\Config\General\LoggingConfigForm;
|
|
|
|
use Icinga\Forms\ConfigForm;
|
2014-09-01 16:16:56 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Form class for application-wide and logging specific settings
|
|
|
|
*/
|
|
|
|
class GeneralConfigForm extends ConfigForm
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Initialize this configuration form
|
|
|
|
*/
|
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
$this->setName('form_config_general');
|
2015-01-19 11:26:23 +01:00
|
|
|
$this->setSubmitLabel($this->translate('Save Changes'));
|
2014-09-01 16:16:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @see Form::createElements()
|
|
|
|
*/
|
|
|
|
public function createElements(array $formData)
|
|
|
|
{
|
|
|
|
$appConfigForm = new ApplicationConfigForm();
|
|
|
|
$loggingConfigForm = new LoggingConfigForm();
|
2014-09-03 12:21:31 +02:00
|
|
|
$this->addElements($appConfigForm->createElements($formData)->getElements());
|
|
|
|
$this->addElements($loggingConfigForm->createElements($formData)->getElements());
|
2014-09-01 16:16:56 +02:00
|
|
|
}
|
|
|
|
}
|