4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"Services/Component/classes/class.ilComponent.php");
25 $this->mode = $a_mode;
31 $this->
addColumn($lng->txt(
"cmps_module"));
32 $this->
addColumn($lng->txt(
"cmps_rep_object"));
36 $this->
addColumn($lng->txt(
"cmps_service"));
38 $this->
addColumn($lng->txt(
"cmps_plugin_slot"));
42 "Services/Component");
52 $this->
setTitle($lng->txt(
"cmps_modules"));
56 $this->
setTitle($lng->txt(
"cmps_services"));
67 include_once(
"./Services/Component/classes/class.ilModule.php");
73 include_once(
"./Services/Component/classes/class.ilService.php");
90 foreach ($plugin_slots as $slot)
92 $this->tpl->setCurrentBlock(
"slot");
93 $this->tpl->setVariable(
"SLOT_NAME", $slot[
"name"]);
94 $this->tpl->setVariable(
"SLOT_ID", $slot[
"id"]);
95 $this->tpl->setVariable(
"TXT_DIR", $lng->txt(
"cmps_dir"));
96 $this->tpl->setVariable(
"SLOT_DIR", $slot[
"dir_pres"]);
97 $this->tpl->setVariable(
"TXT_LANG_PREFIX", $lng->txt(
"cmps_lang_prefix"));
98 $this->tpl->setVariable(
"LANG_PREFIX", $slot[
"lang_prefix"]);
100 $ilCtrl->setParameter($this->parent_obj,
"ctype", $this->mode);
101 $ilCtrl->setParameter($this->parent_obj,
"cname", $a_set[
"subdir"]);
102 $ilCtrl->setParameter($this->parent_obj,
"slot_id", $slot[
"id"]);
103 $this->tpl->setVariable(
"HREF_SHOW_SLOT",
104 $ilCtrl->getLinkTarget($this->parent_obj,
"showPluginSlotInfo"));
105 $this->tpl->setVariable(
"TXT_SHOW_SLOT", $lng->txt(
"cmps_show_details"));
106 $this->tpl->parseCurrentBlock();
114 $objDefinition->getRepositoryObjectTypesForComponent(
IL_COMP_MODULE, $a_set[
"subdir"]);
116 foreach ($rep_types as $rt)
119 if(!$rt[
"repository"])
125 if ($rt[
"grp"] !=
"")
127 $this->tpl->setCurrentBlock(
"group");
128 $this->tpl->setVariable(
"TXT_GROUP", $lng->txt(
"cmps_group"));
129 $gi = $objDefinition->getGroup($rt[
"grp"]);
130 $this->tpl->setVariable(
"VAL_GROUP", $gi[
"name"]);
131 $this->tpl->setVariable(
"VAL_GROUP_ID", $rt[
"grp"]);
132 $this->tpl->parseCurrentBlock();
135 $this->tpl->setCurrentBlock(
"rep_object");
136 $this->tpl->setVariable(
"TXT_REP_OBJECT",
138 $this->tpl->setVariable(
"TXT_REP_OBJECT_ID",
140 $this->tpl->setVariable(
"IMG_REP_OBJECT",
144 $this->tpl->setVariable(
"TXT_ADD_NEW_POS",
145 $lng->txt(
"cmps_add_new_rank"));
146 $this->tpl->setVariable(
"VAR_POS",
147 "obj_pos[".$rt[
"id"].
"]");
148 $pos = ($ilSetting->get(
"obj_add_new_pos_".$rt[
"id"]) > 0)
149 ? $ilSetting->get(
"obj_add_new_pos_".$rt[
"id"])
150 : $rt[
"default_pos"];
151 $this->tpl->setVariable(
"VAL_POS",
155 $this->tpl->setVariable(
"TXT_DISABLE_CREATION",
156 $lng->txt(
"cmps_disable_creation"));
157 $this->tpl->setVariable(
"VAR_DISABLE_CREATION",
158 "obj_dis_creation[".$rt[
"id"].
"]");
159 if ($ilSetting->get(
"obj_dis_creation_".$rt[
"id"]))
161 $this->tpl->setVariable(
"CHECKED_DISABLE_CREATION",
162 ' checked="checked" ');
165 $this->tpl->parseCurrentBlock();
167 $this->tpl->setCurrentBlock(
"rep_object_td");
168 if (count($rep_types) == 0)
170 $this->tpl->setVariable(
"DUMMY",
" ");
172 $this->tpl->parseCurrentBlock();
175 $this->tpl->setVariable(
"TXT_MODULE_NAME", $a_set[
"subdir"]);