34         string $a_parent_cmd = 
"",
    35         bool $a_has_write = 
false    39         $this->
ctrl = $DIC->ctrl();
    40         $this->
lng = $DIC->language();
    41         $this->obj_definition = $DIC[
"objDefinition"];
    43         $this->component_repository = $DIC[
"component.repository"];
    44         $ilCtrl = $DIC->ctrl();
    45         $lng = $DIC->language();
    49         $this->
setId(
"repmodtbl");
    67             "tpl.table_row_module.html",
    68             "Services/Repository/Administration"    75         $this->old_grp_id = 0;
    85         $this->pos_group_options = [0 => 
$lng->
txt(
"rep_new_item_group_unassigned")];
    86         $pos_group_map[0] = 
"9999";
    91                 $this->pos_group_options[$item[
"id"]] = $item[
"title"];
    92                 $pos_group_map[$item[
"id"]] = $item[
"pos"];
    99         foreach ($this->component_repository->getComponents() as $mod) {
   104             $rep_types = $objDefinition::getRepositoryObjectTypesForComponent(
   108             if (count($rep_types) > 0) {
   109                 foreach ($rep_types as $ridx => $rt) {
   111                     if ($rt[
"repository"]) {
   114                         unset($rep_types[$ridx]);
   119                 foreach ($rep_types as $rt) {
   120                     $obj_types[$rt[
"id"]] = [
   121                         "object" => $rt[
"class_name"],
   122                         "caption" => 
$lng->
txt(
"obj_" . $rt[
"id"]),
   123                         "subdir" => $mod->getName(),
   125                         "default_pos" => $rt[
"default_pos"]
   137         foreach ($obj_types as $obj_type => $item) {
   138             $org_pos = 
$ilSetting->get(
"obj_add_new_pos_" . $obj_type);
   139             if (!(
int) $org_pos) {
   141                 $org_pos = $item[
"default_pos"];
   143             if (strlen($org_pos) < 8) {
   145                 $org_pos = $pos_group_map[0] . str_pad($org_pos, 4, 
"0", STR_PAD_LEFT);
   148             $pos_grp_id = 
$ilSetting->get(
"obj_add_new_pos_grp_" . $obj_type, 
'0');
   151             if ($item[
"grp"] != 
"") {
   152                 $group = $objDefinition->getGroup($item[
"grp"]);
   153                 $group = $group[
"name"];
   158                 "object" => $item[
"object"],
   159                 "caption" => $item[
"caption"],
   160                 "subdir" => $item[
"subdir"],
   161                 "pos" => (
int) substr($org_pos, 4),
   162                 "pos_group" => $pos_grp_id,
   163                 "creation" => !
$ilSetting->get(
"obj_dis_creation_" . $obj_type, 
'0'),
   164                 "group_id" => $item[
"grp"],
   166                 "sort_key" => (
int) $org_pos
   175     protected function fillRow(array $a_set): void
   177         if ((
int) $a_set[
"pos_group"] !== $this->old_grp_id) {
   178             $this->tpl->setCurrentBlock(
"pos_grp_bl");
   179             $this->tpl->setVariable(
"TXT_POS_GRP", $this->pos_group_options[$a_set[
"pos_group"]]);
   180             $this->tpl->parseCurrentBlock();
   182             $this->tpl->setCurrentBlock(
"tbl_content");
   183             $this->tpl->parseCurrentBlock();
   185             $this->css_row = ($this->css_row !== 
"tblrow1")
   188             $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
   190             $this->old_grp_id = $a_set[
"pos_group"];
   194         if ($a_set[
"group_id"] != 
"") {
   195             $this->tpl->setCurrentBlock(
"group");
   196             $this->tpl->setVariable(
"VAL_GROUP", $a_set[
"group"]);
   197             $this->tpl->setVariable(
"VAL_GROUP_ID", $a_set[
"group_id"]);
   198             $this->tpl->parseCurrentBlock();
   201         $this->tpl->setCurrentBlock(
"rep_object");
   203         $this->tpl->setVariable(
"TXT_REP_OBJECT", $a_set[
"caption"]);
   204         $this->tpl->setVariable(
"TXT_REP_OBJECT_ID", $a_set[
"id"]);
   205         $this->tpl->setVariable(
   213             "obj_grp[" . $a_set[
"id"] . 
"]",
   214             $this->pos_group_options,
   218         $this->tpl->setVariable(
"GROUP_SEL", $sel);
   221         $this->tpl->setVariable(
"VAR_POS", 
"obj_pos[" . $a_set[
"id"] . 
"]");
   225         $this->tpl->setVariable(
"VAR_DISABLE_CREATION", 
"obj_enbl_creation[" . $a_set[
"id"] . 
"]");
   226         if ($a_set[
"creation"]) {
   227             $this->tpl->setVariable(
   228                 "CHECKED_DISABLE_CREATION",
   229                 ' checked="checked" '   233         $this->tpl->setVariable(
"TXT_MODULE_NAME", $a_set[
"subdir"]);
   243         $plugins = $this->component_repository->getPluginSlotById($slotId)->getActivePlugins();
   244         foreach ($plugins as 
$plugin) {
   245             $obj_types[$plugin->getId()] = [
   246                 "object" => $plugin->getName(),
   248                 "subdir" => 
$lng->
txt(
"cmps_plugin"),
   250                 "default_pos" => 2000
 
Readable part of repository interface to ilComponentDataDB. 
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item. 
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
static getNewItemGroups()
 
__construct(ilObjRepositorySettingsGUI $a_parent_obj, string $a_parent_cmd="", bool $a_has_write=false)
 
parses the objects.xml it handles the xml-description of all ilias objects 
 
setExternalSorting(bool $a_val)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
static lookupTxtById(string $plugin_id, string $lang_var)
 
getPluginComponents(array $obj_types, string $component, string $slotName, string $slotId)
 
setLimit(int $a_limit=0, int $a_default_limit=0)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
const NEW_ITEM_GROUP_TYPE_GROUP
 
ilComponentRepository $component_repository
 
ilObjectDefinition $obj_definition
 
setEnableHeader(bool $a_enableheader)
 
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)