ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 {
46 $cb_input->setChecked((bool)$ilSetting->get('wfe_activation', 0));
47 return $form_instance->getHTML();
48 }
49
50 if($command == 'save')
51 {
52 if(isset($_POST['cmd']['cancel']))
53 {
55 html_entity_decode($this->parent_gui->ilCtrl->getLinkTarget($this->parent_gui, 'definitions.view'))
56 );
57 }
58 if($form_instance->checkInput())
59 {
60 $form_instance->setValuesByPost();
61 $ilSetting->set('wfe_activation', (int)$cb_input->getChecked());
62
63 ilUtil::sendSuccess($this->parent_gui->lng->txt('settings_saved'), true);
65 html_entity_decode($this->parent_gui->ilCtrl->getLinkTarget($this->parent_gui, 'settings.view'))
66 );
67 }
68 }
69 }
70}
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
@noinspection PhpIncludeInspection
Class ilWorkflowEngineSettingsGUI.
__construct(ilObjWorkflowEngineGUI $parent_gui)
ilWorkflowEngineSettingsGUI constructor.
global $ilSetting
Definition: privfeed.php:17
global $DIC