3 declare(strict_types=1);
33 string $a_parent_cmd =
"",
34 bool $a_has_write =
false 37 $this->main_tpl = $DIC->ui()->mainTemplate();
39 $this->
ctrl = $DIC->ctrl();
40 $this->
lng = $DIC->language();
41 $ilCtrl = $DIC->ctrl();
42 $lng = $DIC->language();
44 $this->has_write = $a_has_write;
48 $this->
setId(
"repnwitgrptbl");
52 if ($this->has_write) {
59 if ($this->has_write) {
63 if ($this->has_write) {
70 $this->
setRowTemplate(
"tpl.table_row_new_item_group.html",
"Services/Repository/Administration");
85 if ($subitems[0] ??
false) {
86 $this->main_tpl->setOnScreenMessage(
'info', sprintf(
87 $lng->
txt(
"rep_new_item_group_unassigned_subitems"),
88 is_array($subitems[0]) ? count($subitems[0]) : 0
96 "pos" => $item[
"pos"],
97 "title" => $item[
"title"],
98 "type" => $item[
"type"],
99 "subitems" => is_array($subitems[$item[
"id"]] ?? null) ? count($subitems[$item[
"id"]]) : 0
108 protected function fillRow(array $a_set): void
113 if ($this->has_write) {
114 $this->tpl->setVariable(
"VAR_MULTI",
"grp_ids[]");
115 $this->tpl->setVariable(
"VAL_MULTI", $a_set[
"id"]);
118 $this->tpl->setVariable(
"VAR_POS",
"grp_order[" . $a_set[
"id"] .
"]");
119 $this->tpl->setVariable(
"VAL_POS", $a_set[
"pos"]);
120 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
123 $this->tpl->setVariable(
"VAL_ITEMS", $a_set[
"subitems"]);
125 if ($this->has_write) {
126 $ilCtrl->
setParameter($this->parent_obj,
"grp_id", $a_set[
"id"]);
127 $url = $ilCtrl->getLinkTarget($this->parent_obj,
"editNewItemGroup");
128 $ilCtrl->setParameter($this->parent_obj,
"grp_id",
"");
130 $this->tpl->setVariable(
"URL_EDIT",
$url);
131 $this->tpl->setVariable(
"TXT_EDIT",
$lng->
txt(
"edit"));
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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()
static getNewItemGroupSubItems()
setExternalSorting(bool $a_val)
__construct(ilObjRepositorySettingsGUI $a_parent_obj, string $a_parent_cmd="", bool $a_has_write=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
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)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
const NEW_ITEM_GROUP_TYPE_GROUP
addMultiCommand(string $a_cmd, string $a_text)
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)
ilGlobalTemplateInterface $main_tpl