ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\Skill\Table\TreeTable Class Reference
+ Collaboration diagram for ILIAS\Skill\Table\TreeTable:

Public Member Functions

 __construct (int $ref_id)
 
 getComponent ()
 

Protected Member Functions

 getColumns ()
 
 getActions ()
 

Protected Attributes

ilCtrl $ctrl
 
ilLanguage $lng
 
UI Factory $ui_fac
 
ServerRequestInterface $request
 
Data Factory $df
 
Service SkillInternalManagerService $skill_manager
 
Access SkillManagementAccess $skill_management_access_manager
 
Tree SkillTreeManager $skill_tree_manager
 
Tree SkillTreeFactory $skill_tree_factory
 

Detailed Description

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

Definition at line 34 of file class.TreeTable.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Skill\Table\TreeTable::__construct ( int  $ref_id)

Definition at line 46 of file class.TreeTable.php.

References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by ILIAS\Skill\Table\TreeTable\getActions().

47  {
48  global $DIC;
49 
50  $this->ctrl = $DIC->ctrl();
51  $this->lng = $DIC->language();
52  $this->ui_fac = $DIC->ui()->factory();
53  $this->request = $DIC->http()->request();
54  $this->df = new Data\Factory();
55  $this->skill_manager = $DIC->skills()->internal()->manager();
56  $this->skill_management_access_manager = $this->skill_manager->getManagementAccessManager($ref_id);
57  $this->skill_tree_manager = $this->skill_manager->getTreeManager();
58  $this->skill_tree_factory = $DIC->skills()->internal()->factory()->tree();
59  }
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ getActions()

ILIAS\Skill\Table\TreeTable::getActions ( )
protected

Definition at line 85 of file class.TreeTable.php.

References ILIAS\UI\Implementation\Component\Table\$range, ILIAS\Skill\Table\TreeTable\$skill_manager, ILIAS\Skill\Table\TreeTable\$skill_tree_factory, ILIAS\Skill\Table\TreeTable\$skill_tree_manager, ILIAS\Skill\Table\TreeTable\__construct(), ILIAS\Repository\ctrl(), ilObject\getRefId(), and ILIAS\Repository\lng().

Referenced by ILIAS\Skill\Table\TreeTable\getComponent().

85  : array
86  {
87  $query_params_namespace = ["skl_tree_table"];
88 
89  $uri_edit = $this->df->uri(
90  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTargetByClass("ilobjskilltreegui", "editSkills")
91  );
92  $url_builder_edit = new UI\URLBuilder($uri_edit);
93  list($url_builder_edit, $action_parameter_token_edit, $row_id_token_edit) =
94  $url_builder_edit->acquireParameters(
95  $query_params_namespace,
96  "action",
97  "tree_ids"
98  );
99 
100  $uri_delete = $this->df->uri(
101  ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTargetByClass("ilobjskilltreegui", "delete")
102  );
103  $url_builder_delete = new UI\URLBuilder($uri_delete);
104  list($url_builder_delete, $action_parameter_token_delete, $row_id_token_delete) =
105  $url_builder_delete->acquireParameters(
106  $query_params_namespace,
107  "action",
108  "tree_ids"
109  );
110 
111  $actions = [
112  "edit" => $this->ui_fac->table()->action()->single(
113  $this->lng->txt("edit"),
114  $url_builder_edit->withParameter($action_parameter_token_edit, "editTree"),
115  $row_id_token_edit
116  )
117  ];
118  if ($this->skill_management_access_manager->hasCreateTreePermission()) {
119  $actions["delete"] = $this->ui_fac->table()->action()->multi(
120  $this->lng->txt("delete"),
121  $url_builder_delete->withParameter($action_parameter_token_delete, "deleteTrees"),
122  $row_id_token_delete
123  );
124  }
125 
126  return $actions;
127  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getColumns()

ILIAS\Skill\Table\TreeTable::getColumns ( )
protected

Definition at line 76 of file class.TreeTable.php.

References ILIAS\Repository\lng().

Referenced by ILIAS\Skill\Table\TreeTable\getComponent().

76  : array
77  {
78  $columns = [
79  "title" => $this->ui_fac->table()->column()->text($this->lng->txt("title"))
80  ];
81 
82  return $columns;
83  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getComponent()

ILIAS\Skill\Table\TreeTable::getComponent ( )

Definition at line 61 of file class.TreeTable.php.

References ILIAS\Skill\Table\TreeTable\getActions(), ILIAS\Skill\Table\TreeTable\getColumns(), and ILIAS\Repository\lng().

61  : UI\Component\Table\Data
62  {
63  $columns = $this->getColumns();
64  $actions = $this->getActions();
65  $data_retrieval = $this->getDataRetrieval();
66 
67  $table = $this->ui_fac->table()
68  ->data($this->lng->txt("skmg_skill_trees"), $columns, $data_retrieval)
69  ->withId(self::class)
70  ->withActions($actions)
71  ->withRequest($this->request);
72 
73  return $table;
74  }
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ILIAS\Skill\Table\TreeTable::$ctrl
protected

Definition at line 36 of file class.TreeTable.php.

◆ $df

Data Factory ILIAS\Skill\Table\TreeTable::$df
protected

Definition at line 40 of file class.TreeTable.php.

◆ $lng

ilLanguage ILIAS\Skill\Table\TreeTable::$lng
protected

Definition at line 37 of file class.TreeTable.php.

◆ $request

ServerRequestInterface ILIAS\Skill\Table\TreeTable::$request
protected

Definition at line 39 of file class.TreeTable.php.

◆ $skill_management_access_manager

Access SkillManagementAccess ILIAS\Skill\Table\TreeTable::$skill_management_access_manager
protected

Definition at line 42 of file class.TreeTable.php.

◆ $skill_manager

Service SkillInternalManagerService ILIAS\Skill\Table\TreeTable::$skill_manager
protected

Definition at line 41 of file class.TreeTable.php.

Referenced by ILIAS\Skill\Table\TreeTable\getActions().

◆ $skill_tree_factory

Tree SkillTreeFactory ILIAS\Skill\Table\TreeTable::$skill_tree_factory
protected

Definition at line 44 of file class.TreeTable.php.

Referenced by ILIAS\Skill\Table\TreeTable\getActions().

◆ $skill_tree_manager

Tree SkillTreeManager ILIAS\Skill\Table\TreeTable::$skill_tree_manager
protected

Definition at line 43 of file class.TreeTable.php.

Referenced by ILIAS\Skill\Table\TreeTable\getActions().

◆ $ui_fac

UI Factory ILIAS\Skill\Table\TreeTable::$ui_fac
protected

Definition at line 38 of file class.TreeTable.php.


The documentation for this class was generated from the following file: