5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
27 $this->obj_def = $objDefinition;
29 include_once
'Modules/ItemGroup/classes/class.ilItemGroupItems.php';
30 $this->item_group_items =
new ilItemGroupItems($a_parent_obj->object->getRefId());
31 $this->items = $this->item_group_items->
getItems();
33 parent::__construct($a_parent_obj, $a_parent_cmd);
37 $this->
setTitle($lng->txt(
"itgr_assigned_materials"));
40 $this->
addColumn($this->lng->txt(
"itgr_item"));
41 $this->
addColumn($this->lng->txt(
"itgr_assignment"));
44 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
45 $this->
setRowTemplate(
"tpl.item_group_items_row.html",
"Modules/ItemGroup");
59 $items = $this->item_group_items->getAssignableItems();
61 foreach($items as $item)
63 $item[
"sorthash"] = (int)(!in_array($item[
'ref_id'], $this->items)).$item[
"title"];
78 $this->tpl->setVariable(
"ITEM_REF_ID", $a_set[
"child"]);
79 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
83 if (in_array($a_set[
"child"], $this->items))
85 $this->tpl->setVariable(
"IMG_ASSIGNED",
ilUtil::img(
87 $this->tpl->setVariable(
"CHECKED",
"checked='checked'");
91 $this->tpl->setVariable(
"IMG_ASSIGNED",
ilUtil::img(
getMaterials()
Get materials.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
fillRow($a_set)
Fill table row.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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.
setLimit($a_limit=0, $a_default_limit=0)