2014-09-01 10:16:56 -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-01 10:16:56 -04:00
|
|
|
|
2014-11-14 04:57:14 -05:00
|
|
|
namespace Icinga\Forms\Config;
|
2014-09-01 10:16:56 -04:00
|
|
|
|
2014-11-14 04:57:14 -05:00
|
|
|
use Icinga\Forms\Config\General\ApplicationConfigForm;
|
2017-05-31 12:11:37 -04:00
|
|
|
use Icinga\Forms\Config\General\DefaultAuthenticationDomainConfigForm;
|
2015-09-30 18:02:02 -04:00
|
|
|
use Icinga\Forms\Config\General\LoggingConfigForm;
|
2015-11-26 09:52:45 -05:00
|
|
|
use Icinga\Forms\Config\General\ThemingConfigForm;
|
2015-09-30 18:02:02 -04:00
|
|
|
use Icinga\Forms\ConfigForm;
|
2014-09-01 10:16:56 -04:00
|
|
|
|
|
|
|
|
/**
|
2015-11-26 09:52:45 -05:00
|
|
|
* Configuration form for application-wide options
|
2014-09-01 10:16:56 -04:00
|
|
|
*/
|
|
|
|
|
class GeneralConfigForm extends ConfigForm
|
|
|
|
|
{
|
|
|
|
|
/**
|
2015-11-26 09:52:45 -05:00
|
|
|
* {@inheritdoc}
|
2014-09-01 10:16:56 -04:00
|
|
|
*/
|
|
|
|
|
public function init()
|
|
|
|
|
{
|
|
|
|
|
$this->setName('form_config_general');
|
2015-01-19 05:26:23 -05:00
|
|
|
$this->setSubmitLabel($this->translate('Save Changes'));
|
2014-09-01 10:16:56 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2015-11-26 09:52:45 -05:00
|
|
|
* {@inheritdoc}
|
2014-09-01 10:16:56 -04:00
|
|
|
*/
|
|
|
|
|
public function createElements(array $formData)
|
|
|
|
|
{
|
|
|
|
|
$appConfigForm = new ApplicationConfigForm();
|
|
|
|
|
$loggingConfigForm = new LoggingConfigForm();
|
2015-11-26 09:52:45 -05:00
|
|
|
$themingConfigForm = new ThemingConfigForm();
|
2017-05-31 12:11:37 -04:00
|
|
|
$domainConfigForm = new DefaultAuthenticationDomainConfigForm();
|
2015-11-26 09:52:45 -05:00
|
|
|
$this->addSubForm($appConfigForm->create($formData));
|
|
|
|
|
$this->addSubForm($loggingConfigForm->create($formData));
|
|
|
|
|
$this->addSubForm($themingConfigForm->create($formData));
|
2017-05-31 12:11:37 -04:00
|
|
|
$this->addSubForm($domainConfigForm->create($formData));
|
2014-09-01 10:16:56 -04:00
|
|
|
}
|
|
|
|
|
}
|