ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Container\Skills\ContProfileTableBuilder Class Reference
+ Inheritance diagram for ILIAS\Container\Skills\ContProfileTableBuilder:
+ Collaboration diagram for ILIAS\Container\Skills\ContProfileTableBuilder:

Public Member Functions

 __construct (protected SkillInternalManagerService $manager_service, protected SkillProfileService $profile_service, protected \ilSkillManagementSettings $skmg_settings, protected int $cont_ref_id, protected int $cont_member_role_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)
 transform raw data array to table row data array More...
 
 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 28 of file ContProfileTableBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Container\Skills\ContProfileTableBuilder::__construct ( protected SkillInternalManagerService  $manager_service,
protected SkillProfileService  $profile_service,
protected \ilSkillManagementSettings  $skmg_settings,
protected int  $cont_ref_id,
protected int  $cont_member_role_id,
object  $parent_gui,
string  $parent_cmd 
)

Definition at line 30 of file ContProfileTableBuilder.php.

38 {
39 parent::__construct($parent_gui, $parent_cmd);
40 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ activeAction()

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

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 80 of file ContProfileTableBuilder.php.

80 : bool
81 {
82 switch ($action) {
83 case "confirmDeleteSingleLocalProfile":
84 case "editProfile":
85 return ($data_row["profile_ref_id"] > 0);
86 case "confirmRemoveSingleGlobalProfile":
87 return ($data_row["profile_ref_id"] === 0);
88 }
89 return true;
90 }

◆ build()

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

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 92 of file ContProfileTableBuilder.php.

92 : TableAdapterGUI
93 {
94 global $DIC;
95 $lng = $DIC->language();
96
98 ->textColumn("title", $lng->txt("cont_skill_profile"))
99 ->textColumn("context", $lng->txt("context"));
100
101 $DIC->ctrl()->setParameterByClass("ilskillprofilegui", "local_context", true);
102
103 // Add single actions for different profile types
104 $table = $table
106 "editProfile",
107 $lng->txt("edit"),
108 ["ilSkillProfileGUI"],
109 "showLevelsWithLocalContext",
110 "sprof_id"
111 )
112 ->singleAction(
113 "confirmDeleteSingleLocalProfile",
114 $lng->txt("delete")
115 )
116 ->singleAction(
117 "confirmRemoveSingleGlobalProfile",
118 $lng->txt("remove")
119 );
120
121 return $table;
122 }
textColumn(string $key, string $title, bool $sortable=false)
singleRedirectAction(string $action, string $title, array $class_path, string $cmd="", string $id_param="")
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

◆ getId()

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

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 42 of file ContProfileTableBuilder.php.

42 : string
43 {
44 return "cont_profile";
45 }

◆ getRetrieval()

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

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 53 of file ContProfileTableBuilder.php.

53 : RetrievalInterface
54 {
55 return $this->manager_service->contProfileRetrieval(
56 $this->profile_service,
57 $this->skmg_settings,
58 $this->cont_member_role_id
59 );
60 }

◆ getTitle()

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

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 47 of file ContProfileTableBuilder.php.

47 : string
48 {
49 global $DIC;
50 return $DIC->language()->txt("cont_skill_ass_profiles");
51 }

References $DIC.

◆ transformRow()

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

transform raw data array to table row data array

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 62 of file ContProfileTableBuilder.php.

62 : array
63 {
64 global $DIC;
65 $lng = $DIC->language();
66
67 if ($this->profile_service->lookupProfileRefId($data_row["profile_id"]) > 0) {
68 $context = $lng->txt("skmg_context_local");
69 } else {
70 $context = $lng->txt("skmg_context_global");
71 }
72
73 return [
74 "id" => $data_row["profile_id"],
75 "title" => $data_row["title"],
76 "context" => $context
77 ];
78 }
$context
Definition: webdav.php:31

References $context, $DIC, and $lng.


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