diff options
Diffstat (limited to 'application/controllers/ConfigController.php')
-rw-r--r-- | application/controllers/ConfigController.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php new file mode 100644 index 0000000..f627e36 --- /dev/null +++ b/application/controllers/ConfigController.php @@ -0,0 +1,30 @@ +<?php + +namespace Icinga\Module\Graphite\Controllers; + +use Icinga\Module\Graphite\Forms\Config\AdvancedForm; +use Icinga\Module\Graphite\Forms\Config\BackendForm; +use Icinga\Web\Controller; + +class ConfigController extends Controller +{ + public function init() + { + $this->assertPermission('config/modules'); + parent::init(); + } + + public function backendAction() + { + $this->view->form = $form = new BackendForm(); + $form->setIniConfig($this->Config())->handleRequest(); + $this->view->tabs = $this->Module()->getConfigTabs()->activate('backend'); + } + + public function advancedAction() + { + $this->view->form = $form = new AdvancedForm(); + $form->setIniConfig($this->Config())->handleRequest(); + $this->view->tabs = $this->Module()->getConfigTabs()->activate('advanced'); + } +} |