ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilSCComponentTaskGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 
11 abstract class ilSCComponentTaskGUI
12 {
13  protected $ctrl;
14  protected $lng;
15 
16  protected $task = null;
17 
18 
22  public function __construct(ilSCTask $task = null)
23  {
24  $this->task = $task;
25 
26  $this->ctrl = $GLOBALS['ilCtrl'];
27  $this->lng = $GLOBALS['lng'];
28  }
29 
39  abstract public function getActions();
40 
44  abstract public function getTitle();
45 
49  abstract public function getDescription();
50 
51 
55  abstract public function getGroupTitle();
56 
60  abstract public function getGroupDescription();
61 
66  protected function getLang()
67  {
68  return $this->lng;
69  }
70 
75  protected function getCtrl()
76  {
77  return $this->ctrl;
78  }
79 
83  public function getTask()
84  {
85  return $this->task;
86  }
87 
91  public function executeCommand()
92  {
93  $next_class = $this->getCtrl()->getNextClass($this);
94  $cmd = $this->getCtrl()->getCmd();
95 
96  switch ($next_class) {
97  default:
98  $this->$cmd();
99  break;
100  }
101  }
102 
106  protected function showSimpleConfirmation($a_text, $a_btn_text, $a_cmd)
107  {
108  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
109  $confirm = new ilConfirmationGUI();
110  $confirm->setFormAction($this->getCtrl()->getFormAction($this));
111  $confirm->setConfirm($a_btn_text, $a_cmd);
112  $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
113  $confirm->setHeaderText($a_text);
114 
115  $GLOBALS['tpl']->setContent($confirm->getHTML());
116  }
117 
121  protected function cancel()
122  {
123  $this->getCtrl()->returnToParent($this);
124  }
125 }
Defines a system check task.
getDescription()
get description of task
Abstract class for component tasks.
getGroupDescription()
Get description of group.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
showSimpleConfirmation($a_text, $a_btn_text, $a_cmd)
Show simple confirmation.
getGroupTitle()
Get title of group.
__construct(ilSCTask $task=null)
cancel()
Cancel and return to task list.
getActions()
Get actions for task table gui array( &#39;txt&#39; => $lng->txt(&#39;sysc_action_repair&#39;) &#39;command&#39; => &#39;repairTa...
getTitle()
Get title of task.
Confirmation screen class.