ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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  {
98  default:
99  $this->$cmd();
100  break;
101  }
102 
103  }
104 
108  protected function showSimpleConfirmation($a_text, $a_btn_text,$a_cmd)
109  {
110  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
111  $confirm = new ilConfirmationGUI();
112  $confirm->setFormAction($this->getCtrl()->getFormAction($this));
113  $confirm->setConfirm($a_btn_text, $a_cmd);
114  $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
115  $confirm->setHeaderText($a_text);
116 
117  $GLOBALS['tpl']->setContent($confirm->getHTML());
118  }
119 
123  protected function cancel()
124  {
125  $this->getCtrl()->returnToParent($this);
126  }
127 
128 
129 }
130 
131 ?>
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.
$cmd
Definition: sahs_server.php:35
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.