ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilSCComponentTaskFactory.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 include_once './Services/SystemCheck/classes/class.ilSCTask.php';
6 
13 {
14 
20  public static function getComponentTaskByForGroup($a_group_id, $a_task_id = null)
21  {
22  include_once './Services/SystemCheck/classes/class.ilSCGroup.php';
23  $component_id = ilSCGroup::lookupComponent($a_group_id);
24 
25  $task = null;
26  if($a_task_id)
27  {
28  $task = new ilSCTask($a_task_id);
29  }
30 
31  // this switch should not be used
32  // find class by naming convention and component service
33  switch($component_id)
34  {
35  case 'tree':
36  include_once './Services/Tree/classes/class.ilSCTreeTasksGUI.php';
37  include_once './Services/SystemCheck/classes/class.ilSCTask.php';
38  return new ilSCTreeTasksGUI($task);
39  }
40  }
41 
42 
43 
44 
50  public static function getComponentTask($a_task_id)
51  {
52  include_once './Services/SystemCheck/classes/class.ilSCTasks.php';
53  $group_id = ilSCTasks::lookupGroupId($a_task_id);
54 
55  return self::getComponentTaskByForGroup($group_id, $a_task_id);
56  }
57 }
58 ?>
Defines a system check task.
Factory for component tasks.
static lookupComponent($a_id)
lookup component by id type $ilDB
Handles tree tasks.
static lookupGroupId($a_task_id)
Lookup group id by task id type $ilDB.
static getComponentTaskByForGroup($a_group_id, $a_task_id=null)
get task gui for group