ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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';
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 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $DIC
Definition: saml.php:7
Class ilWorkflowEngineSettingsGUI.
if(isset($_POST['submit'])) $form
global $ilSetting
Definition: privfeed.php:17
__construct(ilObjWorkflowEngineGUI $parent_gui)
ilWorkflowEngineSettingsGUI constructor.
static redirect($a_script)
$_POST["username"]