2014-09-29 12:29:13 +02:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2014-09-29 12:29:13 +02:00
|
|
|
|
2014-11-14 11:01:16 +01:00
|
|
|
namespace Icinga\Module\Setup\Forms;
|
2014-09-29 12:29:13 +02:00
|
|
|
|
2015-07-01 16:02:40 +02:00
|
|
|
use Icinga\Forms\Config\General\ApplicationConfigForm;
|
2014-11-14 10:57:14 +01:00
|
|
|
use Icinga\Forms\Config\General\LoggingConfigForm;
|
2015-07-01 16:02:40 +02:00
|
|
|
use Icinga\Web\Form;
|
2014-09-29 12:29:13 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Wizard page to define the application and logging configuration
|
|
|
|
*/
|
|
|
|
class GeneralConfigPage extends Form
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Initialize this page
|
|
|
|
*/
|
|
|
|
public function init()
|
|
|
|
{
|
2014-10-06 13:52:32 +02:00
|
|
|
$this->setName('setup_general_config');
|
2015-03-02 18:36:04 +01:00
|
|
|
$this->setTitle($this->translate('Application Configuration', 'setup.page.title'));
|
|
|
|
$this->addDescription($this->translate(
|
|
|
|
'Now please adjust all application and logging related configuration options to fit your needs.'
|
|
|
|
));
|
2014-09-29 12:29:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @see Form::createElements()
|
|
|
|
*/
|
|
|
|
public function createElements(array $formData)
|
|
|
|
{
|
2015-07-01 16:02:40 +02:00
|
|
|
$appConfigForm = new ApplicationConfigForm();
|
|
|
|
$appConfigForm->createElements($formData);
|
|
|
|
$appConfigForm->removeElement('global_module_path');
|
|
|
|
$appConfigForm->removeElement('global_config_resource');
|
|
|
|
$this->addElements($appConfigForm->getElements());
|
|
|
|
|
|
|
|
$loggingConfigForm = new LoggingConfigForm();
|
|
|
|
$this->addElements($loggingConfigForm->createElements($formData)->getElements());
|
2014-09-29 12:29:13 +02:00
|
|
|
}
|
|
|
|
}
|