ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilWorkflowEngineSettingsGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
14{
16 protected $parent_gui;
17
24 {
25 $this->parent_gui = $parent_gui;
26 }
27
33 public function handle($command)
34 {
35 global $DIC;
37 $ilSetting = $DIC['ilSetting'];
38
39 require_once './Services/WorkflowEngine/classes/administration/class.ilWorkflowEngineSettingsForm.php';
40 $form = new ilWorkflowEngineSettingsForm();
41 $form_instance = $form->getForm($this->parent_gui->ilCtrl->getLinkTarget($this->parent_gui, 'settings.save'));
42 $cb_input = $form_instance->getItemByPostVar('activate');
43
44 if ($command == 'view') {
45 $cb_input->setChecked((bool) $ilSetting->get('wfe_activation', 0));
46 return $form_instance->getHTML();
47 }
48
49 if ($command == 'save') {
50 if (isset($_POST['cmd']['cancel'])) {
52 html_entity_decode($this->parent_gui->ilCtrl->getLinkTarget($this->parent_gui, 'definitions.view'))
53 );
54 }
55 if ($form_instance->checkInput()) {
56 $form_instance->setValuesByPost();
57 $ilSetting->set('wfe_activation', (int) $cb_input->getChecked());
58
59 ilUtil::sendSuccess($this->parent_gui->lng->txt('settings_saved'), true);
61 html_entity_decode($this->parent_gui->ilCtrl->getLinkTarget($this->parent_gui, 'settings.view'))
62 );
63 }
64 }
65 }
66}
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
static redirect($a_script)
@noinspection PhpIncludeInspection
Class ilWorkflowEngineSettingsGUI.
__construct(ilObjWorkflowEngineGUI $parent_gui)
ilWorkflowEngineSettingsGUI constructor.
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46