4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"Services/Repository/classes/class.ilObjRepositorySettings.php");
24 public function __construct($a_parent_obj, $a_parent_cmd =
"", $a_has_write =
false)
28 $this->ctrl = $DIC->ctrl();
29 $this->lng = $DIC->language();
31 $lng = $DIC->language();
33 $this->has_write = (bool) $a_has_write;
35 parent::__construct($a_parent_obj, $a_parent_cmd);
37 $this->
setId(
"repnwitgrptbl");
41 if ($this->has_write) {
46 $this->
addColumn(
$lng->txt(
"rep_new_item_group_nr_subitems"),
"");
48 if ($this->has_write) {
52 if ($this->has_write) {
59 $this->
setRowTemplate(
"tpl.table_row_new_item_group.html",
"Services/Repository");
79 $lng->txt(
"rep_new_item_group_unassigned_subitems"),
80 is_array($subitems[0]) ?
sizeof($subitems[0]) : 0
88 "pos" => $item[
"pos"],
89 "title" => $item[
"title"],
90 "type" => $item[
"type"],
91 "subitems" => is_array($subitems[$item[
"id"]]) ?
sizeof($subitems[$item[
"id"]]) : 0
105 if ($this->has_write) {
106 $this->tpl->setVariable(
"VAR_MULTI",
"grp_id[]");
107 $this->tpl->setVariable(
"VAL_MULTI", $a_set[
"id"]);
110 $this->tpl->setVariable(
"VAR_POS",
"grp_order[" . $a_set[
"id"] .
"]");
111 $this->tpl->setVariable(
"VAL_POS", $a_set[
"pos"]);
112 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
115 $this->tpl->setVariable(
"VAL_ITEMS", $a_set[
"subitems"]);
117 if ($this->has_write) {
118 $ilCtrl->setParameter($this->parent_obj,
"grp_id", $a_set[
"id"]);
119 $url =
$ilCtrl->getLinkTarget($this->parent_obj,
"editNewItemGroup");
120 $ilCtrl->setParameter($this->parent_obj,
"grp_id",
"");
122 $this->tpl->setVariable(
"URL_EDIT",
$url);
123 $this->tpl->setVariable(
"TXT_EDIT",
$lng->txt(
"edit"));
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
getGroups()
Get pages for list.
setExternalSorting($a_val)
Set external sorting.
TableGUI class for new item groups.
static getNewItemGroups()
static getNewItemGroupSubItems()
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__construct($a_parent_obj, $a_parent_cmd="", $a_has_write=false)
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setEnableHeader($a_enableheader)
Set Enable Header.
const NEW_ITEM_GROUP_TYPE_GROUP
setLimit($a_limit=0, $a_default_limit=0)