ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\Container\Skills\ContSkillTableBuilder Class Reference
+ Inheritance diagram for ILIAS\Container\Skills\ContSkillTableBuilder:
+ Collaboration diagram for ILIAS\Container\Skills\ContSkillTableBuilder:

Public Member Functions

 __construct (protected SkillInternalManagerService $manager_service, protected ContainerSkillManager $cont_skill_manager, protected int $container_obj_id, protected int $container_ref_id, object $parent_gui, string $parent_cmd)
 
- Public Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 __construct (protected object $parent_gui, protected string $parent_cmd, bool $numeric_ids=true)
 
 getTable ()
 

Protected Member Functions

 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 transformRow (array $data_row)
 
 activeAction (string $action, array $data_row)
 
 build (TableAdapterGUI $table)
 
- Protected Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 getNamespace ()
 
 getOrderingCommand ()
 
 activeAction (string $action, array $data_row)
 
 transformRow (array $data_row)
 transform raw data array to table row data array More...
 
 build (TableAdapterGUI $table)
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Repository\Table\CommonTableBuilder
TableAdapterGUI $table
 

Detailed Description

Definition at line 27 of file ContSkillTableBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Container\Skills\ContSkillTableBuilder::__construct ( protected SkillInternalManagerService  $manager_service,
protected ContainerSkillManager  $cont_skill_manager,
protected int  $container_obj_id,
protected int  $container_ref_id,
object  $parent_gui,
string  $parent_cmd 
)

Definition at line 29 of file ContSkillTableBuilder.php.

References ILIAS\GlobalScreen\Provider\__construct().

36  {
37  parent::__construct($parent_gui, $parent_cmd, false);
38  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ activeAction()

ILIAS\Container\Skills\ContSkillTableBuilder::activeAction ( string  $action,
array  $data_row 
)
protected

Definition at line 73 of file ContSkillTableBuilder.php.

73  : bool
74  {
75  switch ($action) {
76  case "confirmRemoveSelectedSkill":
77  // Only allow removal for skills without profile
78  return !isset($data_row["profile_title"]);
79  }
80  return true;
81  }

◆ build()

ILIAS\Container\Skills\ContSkillTableBuilder::build ( TableAdapterGUI  $table)
protected

Definition at line 83 of file ContSkillTableBuilder.php.

References $DIC, $lng, ILIAS\Repository\Table\CommonTableBuilder\$table, ILIAS\Repository\Table\TableAdapterGUI\singleAction(), and ILIAS\Repository\Table\TableAdapterGUI\textColumn().

83  : TableAdapterGUI
84  {
85  global $DIC;
86  $lng = $DIC->language();
87 
88  $table = $table
89  ->textColumn("title", $lng->txt("cont_skill"))
90  ->textColumn("path", $lng->txt("cont_path"))
91  ->textColumn("profile_title", $lng->txt("cont_skill_profile"));
92 
93  // Add multi command for removing skills
95  "confirmRemoveSelectedSkill",
96  $lng->txt("remove")
97  );
98 
99  return $table;
100  }
textColumn(string $key, string $title, bool $sortable=false)
global $DIC
Definition: shib_login.php:26
global $lng
Definition: privfeed.php:31
singleAction(string $action, string $title, bool $async=false)
+ Here is the call graph for this function:

◆ getId()

ILIAS\Container\Skills\ContSkillTableBuilder::getId ( )
protected

Definition at line 40 of file ContSkillTableBuilder.php.

40  : string
41  {
42  return "cont_skill";
43  }

◆ getRetrieval()

ILIAS\Container\Skills\ContSkillTableBuilder::getRetrieval ( )
protected

Definition at line 51 of file ContSkillTableBuilder.php.

52  {
53  return $this->manager_service->contSkillRetrieval(
54  $this->cont_skill_manager
55  );
56  }

◆ getTitle()

ILIAS\Container\Skills\ContSkillTableBuilder::getTitle ( )
protected

Definition at line 45 of file ContSkillTableBuilder.php.

References $DIC.

45  : string
46  {
47  global $DIC;
48  return $DIC->language()->txt("cont_cont_skills");
49  }
global $DIC
Definition: shib_login.php:26

◆ transformRow()

ILIAS\Container\Skills\ContSkillTableBuilder::transformRow ( array  $data_row)
protected

Definition at line 58 of file ContSkillTableBuilder.php.

References $path.

58  : array
59  {
60  $path = $this->parent_gui->getPathString($data_row["base_skill_id"], $data_row["tref_id"]);
61 
62  return [
63  "id" => $data_row["base_skill_id"] . ":" . $data_row["tref_id"],
64  "title" => $data_row["title"],
65  "path" => $path,
66  "profile_title" => $data_row["profile_title"] ?? "",
67  "base_skill_id" => $data_row["base_skill_id"],
68  "tref_id" => $data_row["tref_id"],
69  "has_profile" => isset($data_row["profile_title"])
70  ];
71  }
$path
Definition: ltiservices.php:29

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