2014-09-29 06:29:13 -04:00
|
|
|
<?php
|
2026-03-26 12:46:27 -04:00
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2014-09-29 06:29:13 -04:00
|
|
|
|
2014-11-14 05:01:16 -05:00
|
|
|
namespace Icinga\Module\Setup\Forms;
|
2014-09-29 06:29:13 -04:00
|
|
|
|
2015-07-01 10:02:40 -04:00
|
|
|
use Icinga\Forms\Config\General\ApplicationConfigForm;
|
2014-11-14 04:57:14 -05:00
|
|
|
use Icinga\Forms\Config\General\LoggingConfigForm;
|
2015-07-01 10:02:40 -04:00
|
|
|
use Icinga\Web\Form;
|
2014-09-29 06:29:13 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Wizard page to define the application and logging configuration
|
|
|
|
|
*/
|
|
|
|
|
class GeneralConfigPage extends Form
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Initialize this page
|
|
|
|
|
*/
|
|
|
|
|
public function init()
|
|
|
|
|
{
|
2014-10-06 07:52:32 -04:00
|
|
|
$this->setName('setup_general_config');
|
2015-03-02 12:36:04 -05: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 06:29:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @see Form::createElements()
|
|
|
|
|
*/
|
|
|
|
|
public function createElements(array $formData)
|
|
|
|
|
{
|
2015-07-01 10:02:40 -04: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 06:29:13 -04:00
|
|
|
}
|
|
|
|
|
}
|