4 require_once(
"Services/Table/classes/class.ilTableGUI.php");
75 public function __construct($a_parent_obj, $a_parent_cmd =
"", $a_template_context =
"")
80 $this->unique_id = md5(uniqid());
81 $this->parent_obj = $a_parent_obj;
82 $this->parent_cmd = $a_parent_cmd;
83 $this->buttons = array();
84 $this->header_commands = array();
85 $this->multi = array();
86 $this->hidden_inputs = array();
88 $this->tpl =
new ilTemplate(
"tpl.table2.html",
true,
true,
"Services/Table");
90 $lng->loadLanguageModule(
'tbl');
92 if(!$a_template_context)
94 $a_template_context = $this->
getId();
99 if(isset(
$_GET[$this->prefix.
"_xpt"]))
101 $this->export_mode = (int)
$_GET[$this->prefix.
"_xpt"];
105 if(isset(
$_GET[$this->prefix.
"_tpl"]))
123 $this->open_form_tag = $a_val;
143 $this->close_form_tag = $a_val;
163 if ($this->limit_determined)
169 if (isset(
$_GET[$this->prefix.
"_trows"]))
185 if (is_object($ilUser))
187 $limit = $ilUser->getPref(
"hits_per_page");
197 $this->limit_determined =
true;
215 if ($this->columns_determined)
226 @unserialize($old_sel);
229 if(!is_array($sel_fields))
232 $sel_fields = array();
235 $this->selected_columns = array();
239 $this->selected_column[$k] =
false;
241 $new_column = ($sel_fields[$k] === NULL);
248 $this->selected_column[$k] =
true;
251 else if ($stored && !$new_column)
253 $this->selected_column[$k] = $sel_fields[$k];
263 $this->selected_column[$k] =
true;
268 if ($old_sel != serialize($this->selected_column) && $set)
270 $this->
storeProperty(
"selfields", serialize($this->selected_column));
273 $this->columns_determined =
true;
284 return $this->selected_column[$a_col];
296 foreach ($this->selected_column as $k => $v)
313 $next_class = $ilCtrl->getNextClass($this);
314 $cmd = $ilCtrl->getCmd();
318 case 'ilformpropertydispatchgui':
319 include_once
'./Services/Form/classes/class.ilFormPropertyDispatchGUI.php';
323 $form_prop_dispatch->setItem($item);
324 return $ilCtrl->forwardCommand($form_prop_dispatch);
336 if (!$this->nav_determined && !$a_in_determination)
363 return $this->parent_obj;
373 return $this->parent_cmd;
383 $this->top_anchor = $a_val;
403 $this->noentriestext = $a_text;
413 return $this->noentriestext;
423 $this->datatable = $a_val;
433 return $this->datatable;
443 $this->enabled[
"title"] = $a_enabletitle;
453 return $this->enabled[
"title"];
463 $this->enabled[
"header"] = $a_enableheader;
473 return $this->enabled[
"header"];
483 $this->num_info = $a_val;
493 return $this->num_info;
499 final public function setTitle($a_title, $a_icon = 0, $a_icon_alt = 0)
511 $this->description = $a_val;
521 return $this->description;
531 $this->order_field = $a_order_field;
536 return $this->order_field;
543 $this->enabled[
"header"] && $this->enabled[
"sort"] &&
544 $this->columns_determined && is_array($this->column) &&
545 is_array($a_data) &&
sizeof($a_data))
548 $check = array_keys(array_shift($check));
549 foreach($this->column as $col)
551 if($col[
"sort_field"] && !in_array($col[
"sort_field"], $check))
553 $invalid[] = $col[
"sort_field"];
558 trigger_error(
"The following columns are defined as sortable but".
559 " cannot be found in the given data: ".implode(
", ", $invalid).
560 ". Sorting will not work properly.", E_USER_WARNING);
564 $this->row_data = $a_data;
569 return $this->row_data;
574 if (is_array($this->row_data))
576 if (count($this->row_data) > 0)
586 $this->prefix = $a_prefix;
600 $a_input_item->setParent($this);
603 $this->filters[] = $a_input_item;
607 $this->optional_filters[] = $a_input_item;
611 if($this->restore_filter_values &&
612 array_key_exists($a_input_item->getFieldId(), $this->restore_filter_values))
614 $this->setFilterValue($a_input_item, $this->restore_filter_values[$a_input_item->getFieldId()]);
633 $caption = $lng->txt($id);
636 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
640 case self::FILTER_SELECT:
641 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
645 case self::FILTER_DATE:
646 include_once(
"./Services/Form/classes/class.ilDateTimeInputGUI.php");
651 case self::FILTER_TEXT:
652 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
654 $item->setMaxLength(64);
659 case self::FILTER_LANGUAGE:
660 $lng->loadLanguageModule(
"meta");
661 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
663 $options = array(
"" => $lng->txt(
"trac_all"));
664 foreach ($lng->getInstalledLanguages() as $lang_key)
666 $options[$lang_key] = $lng->txt(
"meta_l_".$lang_key);
668 $item->setOptions($options);
671 case self::FILTER_NUMBER_RANGE:
672 include_once(
"./Services/Form/classes/class.ilCombinationInputGUI.php");
673 include_once(
"./Services/Form/classes/class.ilNumberInputGUI.php");
676 $item->addCombinationItem(
"from", $combi_item, $lng->txt(
"from"));
678 $item->addCombinationItem(
"to", $combi_item, $lng->txt(
"to"));
680 $item->setMaxLength(7);
684 case self::FILTER_DATE_RANGE:
685 include_once(
"./Services/Form/classes/class.ilCombinationInputGUI.php");
686 include_once(
"./Services/Form/classes/class.ilDateTimeInputGUI.php");
689 $item->addCombinationItem(
"from", $combi_item, $lng->txt(
"from"));
691 $item->addCombinationItem(
"to", $combi_item, $lng->txt(
"to"));
696 case self::FILTER_DATETIME_RANGE:
697 include_once(
"./Services/Form/classes/class.ilCombinationInputGUI.php");
698 include_once(
"./Services/Form/classes/class.ilDateTimeInputGUI.php");
701 $combi_item->setShowTime(
true);
702 $item->addCombinationItem(
"from", $combi_item, $lng->txt(
"from"));
704 $combi_item->setShowTime(
true);
705 $item->addCombinationItem(
"to", $combi_item, $lng->txt(
"to"));
710 case self::FILTER_DURATION_RANGE:
711 $lng->loadLanguageModule(
"form");
712 include_once(
"./Services/Form/classes/class.ilCombinationInputGUI.php");
713 include_once(
"./Services/Form/classes/class.ilDurationInputGUI.php");
716 $combi_item->setShowMonths(
false);
717 $combi_item->setShowDays(
true);
718 $combi_item->setShowSeconds(
true);
719 $item->addCombinationItem(
"from", $combi_item, $lng->txt(
"from"));
721 $combi_item->setShowMonths(
false);
722 $combi_item->setShowDays(
true);
723 $combi_item->setShowSeconds(
true);
724 $item->addCombinationItem(
"to", $combi_item, $lng->txt(
"to"));
733 $item->readFromSession();
753 if ($item->getPostVar() == $a_post_var)
760 if ($item->getPostVar() == $a_post_var)
775 $this->filter_cols = $a_val;
795 $this->disable_filter_hiding = $a_val;
816 return $this->selected_filter[$a_col];
828 foreach ($this->selected_filter as $k => $v)
846 if ($this->filters_determined)
856 @unserialize($old_sel);
859 if(!is_array($sel_filters))
862 $sel_filters = array();
865 $this->selected_filter = array();
869 $k = $item->getPostVar();
871 $this->selected_filter[$k] =
false;
878 $this->selected_filter[$k] =
true;
882 $item->setValue(NULL);
883 $item->writeToSession();
888 $this->selected_filter[$k] = $sel_filters[$k];
892 if ($old_sel != serialize($this->selected_filter) && $set)
894 $this->
storeProperty(
"selfilters", serialize($this->selected_filter));
897 $this->filters_determined =
true;
905 $this->custom_prev_next =
true;
906 $this->custom_prev = $a_prev_link;
907 $this->custom_next = $a_next_link;
917 $this->form_action = $a_form_action;
927 return $this->form_action;
937 $this->formname = $a_formname;
947 return $this->formname;
981 $this->display_as_block = $a_val;
991 return $this->display_as_block;
1011 $this->select_all_checkbox = $a_select_all_checkbox;
1021 $this->ext_sort = $a_val;
1041 $this->filter_cmd = $a_val;
1061 $this->reset_cmd = $a_val;
1081 $this->ext_seg = $a_val;
1102 $this->row_template = $a_template;
1103 $this->row_template_dir = $a_template_dir;
1113 $this->defaultorderfield = $a_defaultorderfield;
1123 return $this->defaultorderfield;
1133 $this->defaultorderdirection = $a_defaultorderdirection;
1143 return $this->defaultorderdirection;
1153 $this->buttons = array();
1164 $this->buttons[] = array(
"cmd" => $a_cmd,
"text" => $a_text,
'onclick' => $a_onclick,
1180 echo
"ilTabl2GUI->addSelectionButton() has been deprecated with 4.2. Please try to move the drop-down to ilToolbarGUI.";
1195 $this->mi_sel_buttons[] = array(
"sel_var" => $a_sel_var,
"options" => $a_options,
"selected" => $a_default_selection,
"cmd" => $a_cmd,
"text" => $a_text);
1208 $this->close_command = $a_link;
1219 $this->multi[] = array(
"cmd" => $a_cmd,
"text" => $a_text);
1230 $this->hidden_inputs[] = array(
"name" => $a_name,
"value" => $a_value);
1241 $this->header_commands[] = array(
"href" => $a_href,
"text" => $a_text,
1242 "target" => $a_target,
"img" => $a_img);
1252 $this->top_commands = $a_val;
1272 final public function addColumn($a_text, $a_sort_field =
"", $a_width =
"",
1273 $a_is_checkbox_action_column =
false, $a_class =
"", $a_tooltip =
"")
1275 $this->column[] = array(
1277 "sort_field" => $a_sort_field,
1278 "width" => $a_width,
1279 "is_checkbox_action_column" => $a_is_checkbox_action_column,
1280 "class" => $a_class,
1281 "tooltip" => $a_tooltip
1283 $this->column_count = count($this->column);
1289 return $this->prefix.
"_table_nav";
1297 if (is_object($ilUser) && $ilUser->getPref(
"screen_reader_optimization"))
1299 $hash =
"#".$this->getTopAnchor();
1305 $ilCtrl->setParameter($this->parent_obj,
1307 $sort_field.
":".$order_dir.
":".$this->offset);
1308 $this->tpl->setVariable(
"TBL_ORDER_LINK",
1309 $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd).$hash);
1312 $ilCtrl->setParameter($this->parent_obj,
1320 $allcolumnswithwidth =
true;
1321 foreach ((array) $this->column as $idx => $column)
1323 if (!strlen($column[
"width"]))
1325 $allcolumnswithwidth =
false;
1327 else if($column[
"width"] ==
"1")
1330 $this->column[$idx][
"width"] =
"1%";
1333 if ($allcolumnswithwidth)
1335 foreach ((array) $this->column as $column)
1337 $this->tpl->setCurrentBlock(
"tbl_colgroup_column");
1338 $this->tpl->setVariable(
"COLGROUP_COLUMN_WIDTH", $column[
"width"]);
1339 $this->tpl->parseCurrentBlock();
1343 foreach ((array) $this->column as $column)
1348 if ($column[
"tooltip"] !=
"")
1350 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
1353 if (!$this->enabled[
"sort"] || $column[
"sort_field"] ==
"" || $column[
"is_checkbox_action_column"])
1355 $this->tpl->setCurrentBlock(
"tbl_header_no_link");
1356 if ($column[
"width"] !=
"")
1358 $this->tpl->setVariable(
"TBL_COLUMN_WIDTH_NO_LINK",
" width=\"".$column[
"width"].
"\"");
1360 if (!$column[
"is_checkbox_action_column"])
1362 $this->tpl->setVariable(
"TBL_HEADER_CELL_NO_LINK",
1367 $this->tpl->setVariable(
"TBL_HEADER_CELL_NO_LINK",
1370 $this->tpl->setVariable(
"HEAD_CELL_NL_ID",
"thc_".$this->
getId().
"_".$ccnt);
1372 if ($column[
"class"] !=
"")
1374 $this->tpl->setVariable(
"TBL_HEADER_CLASS",
" " . $column[
"class"]);
1376 $this->tpl->parseCurrentBlock();
1377 $this->tpl->touchBlock(
"tbl_header_th");
1380 if (($column[
"sort_field"] == $this->order_field) && ($this->order_direction !=
""))
1382 $this->tpl->setCurrentBlock(
"tbl_order_image");
1383 $this->tpl->setVariable(
"IMG_ORDER_DIR",
ilUtil::getImagePath($this->order_direction.
"_order.png"));
1384 $this->tpl->setVariable(
"IMG_ORDER_ALT", $this->lng->txt(
"change_sort_direction"));
1385 $this->tpl->parseCurrentBlock();
1388 $this->tpl->setCurrentBlock(
"tbl_header_cell");
1389 $this->tpl->setVariable(
"TBL_HEADER_CELL", $column[
"text"]);
1390 $this->tpl->setVariable(
"HEAD_CELL_ID",
"thc_".$this->
getId().
"_".$ccnt);
1393 if ($column[
"width"] !=
"")
1395 $this->tpl->setVariable(
"TBL_COLUMN_WIDTH",
" width=\"".$column[
"width"].
"\"");
1398 $lng_sort_column = $this->lng->txt(
"sort_by_this_column");
1399 $this->tpl->setVariable(
"TBL_ORDER_ALT",$lng_sort_column);
1403 if ($column[
"sort_field"] == $this->order_field)
1405 $order_dir = $this->sort_order;
1407 $lng_change_sort = $this->lng->txt(
"change_sort_direction");
1408 $this->tpl->setVariable(
"TBL_ORDER_ALT",$lng_change_sort);
1411 if ($column[
"class"] !=
"")
1413 $this->tpl->setVariable(
"TBL_HEADER_CLASS",
" " . $column[
"class"]);
1415 $this->
setOrderLink($column[
"sort_field"], $order_dir);
1416 $this->tpl->parseCurrentBlock();
1417 $this->tpl->touchBlock(
"tbl_header_th");
1420 $this->tpl->setCurrentBlock(
"tbl_header");
1421 $this->tpl->parseCurrentBlock();
1439 if ($this->nav_determined)
1464 if ($this->nav_value ==
"" && $this->
getId() !=
"" && $ilUser->getId() != ANONYMOUS_USER_ID)
1472 $nav = explode(
":", $this->nav_value);
1478 if (!$a_omit_offset)
1495 if (!$a_omit_offset)
1497 $this->nav_determined =
true;
1533 if (is_object($ilCtrl) && $this->
getId() ==
"")
1544 if (is_object($ilUser) && $ilUser->getPref(
"screen_reader_optimization"))
1546 $hash =
"#".$this->getTopAnchor();
1549 $this->tpl->setCurrentBlock(
"tbl_form_header");
1550 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction().$hash);
1551 $this->tpl->setVariable(
"FORMNAME", $this->
getFormName());
1552 $this->tpl->parseCurrentBlock();
1557 $this->tpl->touchBlock(
"tbl_form_footer");
1561 if(!$this->enabled[
'content'])
1573 $this->
setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1600 $this->tpl->addBlockFile(
"TBL_CONTENT",
"tbl_content", $this->row_template,
1601 $this->row_template_dir);
1603 foreach($data as $set)
1605 $this->tpl->setCurrentBlock(
"tbl_content");
1606 $this->css_row = ($this->css_row !=
"tblrow1")
1609 $this->tpl->setVariable(
"CSS_ROW", $this->css_row);
1612 $this->tpl->setCurrentBlock(
"tbl_content");
1613 $this->tpl->parseCurrentBlock();
1621 : $lng->txt(
"no_items");
1623 $this->css_row = ($this->css_row !=
"tblrow1")
1627 $this->tpl->setCurrentBlock(
"tbl_no_entries");
1628 $this->tpl->setVariable(
'TBL_NO_ENTRY_CSS_ROW', $this->css_row);
1629 $this->tpl->setVariable(
'TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
1630 $this->tpl->setVariable(
'TBL_NO_ENTRY_TEXT', trim($no_items_text));
1631 $this->tpl->parseCurrentBlock();
1667 $this->tpl->setVariable(
"CSS_TABLE",$this->
getStyle(
"table"));
1668 $this->tpl->setVariable(
"DATA_TABLE", (
int) $this->
getIsDataTable());
1669 if ($this->
getId() !=
"")
1671 $this->tpl->setVariable(
"ID",
'id="'.$this->
getId().
'"');
1677 $this->tpl->setCurrentBlock(
"tbl_header_description");
1678 $this->tpl->setVariable(
"TBL_DESCRIPTION", $this->
getDescription());
1679 $this->tpl->parseCurrentBlock();
1689 $this->tpl->touchBlock(
"outer_start_1");
1690 $this->tpl->touchBlock(
"outer_end_1");
1694 $this->tpl->touchBlock(
"outer_start_2");
1695 $this->tpl->touchBlock(
"outer_end_2");
1699 if ($this->enabled[
"title"] && ($this->title !=
""
1700 || $this->icon !=
"" || count($this->header_commands) > 0 ||
1701 $this->headerHTML !=
"" || $this->close_command !=
""))
1703 if ($this->enabled[
"icon"])
1705 $this->tpl->setCurrentBlock(
"tbl_header_title_icon");
1707 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT",$this->icon_alt);
1708 $this->tpl->parseCurrentBlock();
1713 foreach($this->header_commands as $command)
1715 if ($command[
"img"] !=
"")
1717 $this->tpl->setCurrentBlock(
"tbl_header_img_link");
1718 if ($command[
"target"] !=
"")
1720 $this->tpl->setVariable(
"TARGET_IMG_LINK",
1721 'target="'.$command[
"target"].
'"');
1723 $this->tpl->setVariable(
"ALT_IMG_LINK", $command[
"text"]);
1724 $this->tpl->setVariable(
"HREF_IMG_LINK", $command[
"href"]);
1725 $this->tpl->setVariable(
"SRC_IMG_LINK",
1727 $this->tpl->parseCurrentBlock();
1731 $this->tpl->setCurrentBlock(
"head_cmd");
1732 $this->tpl->setVariable(
"TXT_HEAD_CMD", $command[
"text"]);
1733 $this->tpl->setVariable(
"HREF_HEAD_CMD", $command[
"href"]);
1734 $this->tpl->parseCurrentBlock();
1739 if (isset ($this->headerHTML)) {
1740 $this->tpl->setCurrentBlock(
"tbl_header_html");
1741 $this->tpl->setVariable (
"HEADER_HTML", $this->headerHTML);
1742 $this->tpl->parseCurrentBlock();
1746 if ($this->close_command !=
"")
1748 $this->tpl->setCurrentBlock(
"tbl_header_img_link");
1749 $this->tpl->setVariable(
"ALT_IMG_LINK",$lng->txt(
"close"));
1750 $this->tpl->setVariable(
"HREF_IMG_LINK",$this->close_command);
1752 $this->tpl->parseCurrentBlock();
1755 $this->tpl->setCurrentBlock(
"tbl_header_title");
1756 $this->tpl->setVariable(
"TBL_TITLE",$this->title);
1757 $this->tpl->setVariable(
"TOP_ANCHOR",$this->
getTopAnchor());
1760 $this->tpl->setVariable(
"BLK_CLASS",
"Block");
1762 $this->tpl->parseCurrentBlock();
1766 if ($this->enabled[
"header"])
1771 $this->tpl->touchBlock(
"tbl_table_end");
1773 return $this->tpl->get();
1786 $tpl->addJavascript(
"./Services/Table/js/ServiceTable.js");
1788 if (count($filter) == 0 && count($opt_filter) == 0)
1793 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1799 if (count($filter) > 0)
1801 foreach ($filter as $item)
1805 $this->tpl->setCurrentBlock(
"filter_row");
1806 $this->tpl->parseCurrentBlock();
1809 $this->tpl->setCurrentBlock(
"filter_item");
1810 $this->tpl->setVariable(
"OPTION_NAME",
1812 $this->tpl->setVariable(
"F_INPUT_ID",
1813 $item->getFieldId());
1814 $this->tpl->setVariable(
"INPUT_HTML",
1815 $item->getTableFilterHTML());
1816 $this->tpl->parseCurrentBlock();
1822 if (count($opt_filter) > 0)
1826 foreach ($opt_filter as $item)
1832 $this->tpl->setCurrentBlock(
"filter_row");
1833 $this->tpl->parseCurrentBlock();
1836 $this->tpl->setCurrentBlock(
"filter_item");
1837 $this->tpl->setVariable(
"OPTION_NAME",
1839 $this->tpl->setVariable(
"F_INPUT_ID",
1840 $item->getFieldId());
1841 $this->tpl->setVariable(
"INPUT_HTML",
1842 $item->getTableFilterHTML());
1843 $this->tpl->parseCurrentBlock();
1850 foreach ($opt_filter as $item)
1852 $k = $item->getPostVar();
1853 $items[$k] = array(
"txt" => $item->getTitle(),
1857 include_once(
"./Services/UIComponent/CheckboxListOverlay/classes/class.ilCheckboxListOverlayGUI.php");
1859 $cb_over->setLinkTitle($lng->txt(
"optional_filters"));
1860 $cb_over->setItems($items);
1863 $cb_over->setFieldVar(
"tblff".$this->
getId());
1864 $cb_over->setHiddenVar(
"tblfsf".$this->
getId());
1866 $cb_over->setSelectionHeaderClass(
"ilTableMenuItem");
1867 $this->tpl->setCurrentBlock(
"filter_select");
1870 $this->tpl->setVariable(
"HIDDEN_CMD_APPLY", $this->filter_cmd);
1872 $this->tpl->setVariable(
"FILTER_SELECTOR", $cb_over->getHTML());
1873 $this->tpl->parseCurrentBlock();
1877 if($ccnt > 0 || count($opt_filter) > 0)
1879 $this->tpl->setVariable(
"TXT_FILTER", $lng->txt(
"filter"));
1887 $this->tpl->touchBlock(
"filter_empty_cell");
1890 $this->tpl->setCurrentBlock(
"filter_row");
1891 $this->tpl->parseCurrentBlock();
1893 $this->tpl->setCurrentBlock(
"filter_buttons");
1894 $this->tpl->setVariable(
"CMD_APPLY", $this->filter_cmd);
1895 $this->tpl->setVariable(
"TXT_APPLY", $lng->txt(
"apply_filter"));
1896 $this->tpl->setVariable(
"CMD_RESET", $this->reset_cmd);
1897 $this->tpl->setVariable(
"TXT_RESET", $lng->txt(
"reset_filter"));
1899 else if(count($opt_filter) > 0)
1901 $this->tpl->setCurrentBlock(
"optional_filter_hint");
1902 $this->tpl->setVariable(
'TXT_OPT_HINT', $lng->txt(
'optional_filter_hint'));
1903 $this->tpl->parseCurrentBlock();
1906 $this->tpl->setCurrentBlock(
"filter_section");
1907 $this->tpl->setVariable(
"FIL_ID", $this->
getId());
1908 $this->tpl->parseCurrentBlock();
1915 $this->tpl->setCurrentBlock(
"filter_hidden");
1916 $this->tpl->setVariable(
"FI_ID", $this->
getId());
1917 $this->tpl->parseCurrentBlock();
1933 foreach ($filter as $item)
1935 if ($item->checkInput())
1937 $item->setValueByArray(
$_POST);
1938 $item->writeToSession();
1941 foreach ($opt_filter as $item)
1943 if ($item->checkInput())
1945 $item->setValueByArray(
$_POST);
1946 $item->writeToSession();
1966 foreach ($filter as $item)
1968 if ($item->checkInput())
1970 $item->setValueByArray(
$_POST);
1971 $item->clearFromSession();
1974 foreach ($opt_filter as $item)
1976 if ($item->checkInput())
1978 $item->setValueByArray(
$_POST);
1979 $item->clearFromSession();
1996 foreach ($a_set as $key => $value)
1998 $this->tpl->setVariable(
"VAL_".strtoupper($key), $value);
2014 $this->tpl->setCurrentBlock(
"select_all_checkbox");
2015 $this->tpl->setVariable(
"SELECT_ALL_TXT_SELECT_ALL", $lng->txt(
"select_all"));
2017 $this->tpl->setVariable(
"SELECT_ALL_FORM_NAME", $this->
getFormName());
2018 $this->tpl->setVariable(
"CHECKBOXNAME",
"chb_select_all_" . $this->unique_id);
2019 $this->tpl->parseCurrentBlock();
2023 if ($this->enabled[
"numinfo"] && $this->enabled[
"footer"])
2025 $start = $this->offset + 1;
2032 if ($end > $this->max_count or $this->limit == 0)
2037 if ($this->max_count > 0)
2039 if ($this->lang_support)
2041 $numinfo =
"(".$start.
" - ".$end.
" ".strtolower($this->lng->txt(
"of")).
" ".$this->max_count.
")";
2045 $numinfo =
"(".$start.
" - ".$end.
" of ".$this->max_count.
")";
2048 if ($this->max_count > 0)
2052 $this->tpl->setCurrentBlock(
"tbl_footer_numinfo");
2053 $this->tpl->setVariable(
"NUMINFO", $numinfo);
2054 $this->tpl->parseCurrentBlock();
2061 if ($this->enabled[
"linkbar"] && $this->enabled[
"footer"] && $this->limit != 0
2062 && $this->max_count > 0)
2065 "link" => $this->footer_style,
2066 "prev" => $this->footer_previous,
2067 "next" => $this->footer_next,
2072 $this->tpl->setCurrentBlock(
"tbl_footer_linkbar");
2073 $this->tpl->setVariable(
"LINKBAR", $linkbar);
2074 $this->tpl->parseCurrentBlock();
2086 $items[$k] = array(
"txt" => $c[
"txt"],
2089 include_once(
"./Services/UIComponent/CheckboxListOverlay/classes/class.ilCheckboxListOverlayGUI.php");
2091 $cb_over->setLinkTitle($lng->txt(
"columns"));
2092 $cb_over->setItems($items);
2096 $cb_over->setFieldVar(
"tblfs".$this->
getId());
2097 $cb_over->setHiddenVar(
"tblfsh".$this->
getId());
2098 $cb_over->setSelectionHeaderClass(
"ilTableMenuItem");
2099 $column_selector = $cb_over->getHTML();
2121 $create_id =
"template_create_overlay_".$this->getId();
2122 $delete_id =
"template_delete_overlay_".$this->getId();
2123 $list_id =
"template_stg_".$this->getId();
2125 include_once(
"./Services/Table/classes/class.ilTableTemplatesStorage.php");
2127 $templates = $storage->getNames($this->
getContext(), $ilUser->getId());
2129 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
2132 if(
sizeof($templates))
2135 $overlay->setTrigger($list_id.
"_delete");
2136 $overlay->setAnchor(
"ilAdvSelListAnchorElement_".$list_id);
2137 $overlay->setAutoHide(
false);
2140 $lng->loadLanguageModule(
"form");
2141 $this->tpl->setCurrentBlock(
"template_editor_delete_item");
2142 $this->tpl->setVariable(
"TEMPLATE_DELETE_OPTION_VALUE",
"");
2143 $this->tpl->setVariable(
"TEMPLATE_DELETE_OPTION",
"- ".$lng->txt(
"form_please_select").
" -");
2144 $this->tpl->parseCurrentBlock();
2145 foreach($templates as $name)
2147 $this->tpl->setVariable(
"TEMPLATE_DELETE_OPTION_VALUE", $name);
2148 $this->tpl->setVariable(
"TEMPLATE_DELETE_OPTION", $name);
2149 $this->tpl->parseCurrentBlock();
2152 $this->tpl->setCurrentBlock(
"template_editor_delete");
2153 $this->tpl->setVariable(
"TEMPLATE_DELETE_ID", $delete_id);
2154 $this->tpl->setVariable(
"TXT_TEMPLATE_DELETE", $lng->txt(
"tbl_template_delete"));
2155 $this->tpl->setVariable(
"TXT_TEMPLATE_DELETE_SUBMIT", $lng->txt(
"delete"));
2156 $this->tpl->setVariable(
"TEMPLATE_DELETE_CMD", $this->parent_cmd);
2157 $this->tpl->parseCurrentBlock();
2163 $overlay->setTrigger($list_id.
"_create");
2164 $overlay->setAnchor(
"ilAdvSelListAnchorElement_".$list_id);
2165 $overlay->setAutoHide(
false);
2168 $this->tpl->setCurrentBlock(
"template_editor");
2169 $this->tpl->setVariable(
"TEMPLATE_CREATE_ID", $create_id);
2170 $this->tpl->setVariable(
"TXT_TEMPLATE_CREATE", $lng->txt(
"tbl_template_create"));
2171 $this->tpl->setVariable(
"TXT_TEMPLATE_CREATE_SUBMIT", $lng->txt(
"save"));
2172 $this->tpl->setVariable(
"TEMPLATE_CREATE_CMD", $this->parent_cmd);
2173 $this->tpl->parseCurrentBlock();
2176 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2178 $alist->setId($list_id);
2179 $alist->addItem($lng->txt(
"tbl_template_create"),
"create",
"#");
2180 if(
sizeof($templates))
2182 $alist->addItem($lng->txt(
"tbl_template_delete"),
"delete",
"#");
2183 foreach($templates as $name)
2185 $ilCtrl->setParameter($this->parent_obj, $this->prefix.
"_tpl", urlencode($name));
2186 $alist->addItem($name, $name, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
2187 $ilCtrl->setParameter($this->parent_obj, $this->prefix.
"_tpl",
"");
2190 $alist->setListTitle($lng->txt(
"tbl_templates"));
2191 $this->tpl->setVariable(
"TEMPLATE_SELECTOR",
" ".$alist->getHTML());
2196 $this->tpl->setCurrentBlock(
"tbl_footer");
2197 $this->tpl->setVariable(
"COLUMN_COUNT", $this->
getColumnCount());
2200 $this->tpl->setVariable(
"BLK_CLASS",
"Block");
2202 $this->tpl->parseCurrentBlock();
2205 if ($numinfo !=
"" || $linkbar !=
"" || $column_selector !=
"" ||
2206 count($this->filters) > 0 || count($this->optional_filters) > 0)
2208 if (is_object($ilUser) && (count($this->filters) || count($this->optional_filters)))
2210 $this->tpl->setCurrentBlock(
"filter_activation");
2211 $this->tpl->setVariable(
"TXT_ACTIVATE_FILTER", $lng->txt(
"show_filter"));
2212 $this->tpl->setVariable(
"FILA_ID", $this->
getId());
2213 if ($this->
getId() !=
"")
2215 $this->tpl->setVariable(
"SAVE_URLA",
"./ilias.php?baseClass=ilTablePropertiesStorage&table_id=".
2216 $this->
getId().
"&cmd=showFilter&user_id=".$ilUser->getId());
2218 $this->tpl->parseCurrentBlock();
2223 $this->tpl->setCurrentBlock(
"filter_deactivation");
2224 $this->tpl->setVariable(
"TXT_HIDE", $lng->txt(
"hide_filter"));
2225 if ($this->
getId() !=
"")
2227 $this->tpl->setVariable(
"SAVE_URL",
"./ilias.php?baseClass=ilTablePropertiesStorage&table_id=".
2228 $this->
getId().
"&cmd=hideFilter&user_id=".$ilUser->getId());
2229 $this->tpl->setVariable(
"FILD_ID", $this->
getId());
2231 $this->tpl->parseCurrentBlock();
2238 $this->tpl->setCurrentBlock(
"top_numinfo");
2239 $this->tpl->setVariable(
"NUMINFO", $numinfo);
2240 $this->tpl->parseCurrentBlock();
2245 $this->tpl->setCurrentBlock(
"top_linkbar");
2246 $this->tpl->setVariable(
"LINKBAR", $linkbar);
2247 $this->tpl->parseCurrentBlock();
2251 $this->tpl->setVariable(
"COLUMN_SELECTOR", $column_selector);
2256 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2258 $alist->setId(
"sellst_rows");
2259 $hpp = ($ilUser->getPref(
"hits_per_page") != 9999)
2260 ? $ilUser->getPref(
"hits_per_page")
2261 : $lng->txt(
"unlimited");
2263 $options = array(0 => $lng->txt(
"default").
" (".$hpp.
")",5 => 5, 10 => 10, 15 => 15, 20 => 20,
2264 30 => 30, 40 => 40, 50 => 50,
2265 100 => 100, 200 => 200, 400 => 400, 800 => 800);
2266 foreach ($options as $k => $v)
2268 $ilCtrl->setParameter($this->parent_obj, $this->prefix.
"_trows", $k);
2269 $alist->addItem($v, $k, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
2270 $ilCtrl->setParameter($this->parent_obj, $this->prefix.
"_trows",
"");
2273 $this->tpl->setVariable(
"ROW_SELECTOR", $alist->getHTML());
2277 if(
sizeof($this->export_formats) && $this->
dataExists())
2279 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2281 $alist->setId(
"sellst_xpt");
2282 foreach($this->export_formats as $format => $caption_lng_id)
2284 $ilCtrl->setParameter($this->parent_obj, $this->prefix.
"_xpt", $format);
2285 $url = $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd);
2286 $ilCtrl->setParameter($this->parent_obj, $this->prefix.
"_xpt",
"");
2287 $alist->addItem($lng->txt($caption_lng_id), $format, $url);
2289 $alist->setListTitle($lng->txt(
"export"));
2290 $this->tpl->setVariable(
"EXPORT_SELECTOR",
" ".$alist->getHTML());
2293 $this->tpl->setCurrentBlock(
"top_navigation");
2294 $this->tpl->setVariable(
"COLUMN_COUNT", $this->
getColumnCount());
2297 $this->tpl->setVariable(
"BLK_CLASS",
"Block");
2299 $this->tpl->parseCurrentBlock();
2316 if (is_object($ilUser) && $ilUser->getPref(
"screen_reader_optimization"))
2318 $hash =
"#".$this->getTopAnchor();
2321 $link = $ilCtrl->getLinkTargetByClass(get_class($this->parent_obj), $this->parent_cmd).
2322 "&".$this->getNavParameter().
"=".
2326 $layout_prev = $lng->txt(
"previous");
2327 $layout_next = $lng->txt(
"next");
2330 if ($this->max_count > $this->
getLimit() || $this->custom_prev_next)
2332 $sep =
"<span> | </span>";
2335 $pages = intval($this->max_count / $this->
getLimit());
2338 if (($this->max_count % $this->
getLimit()))
2342 $offset_arr = array();
2343 for ($i = 1 ;$i <= $pages ; $i++)
2345 $newoffset = $this->
getLimit() * ($i-1);
2348 $offset_arr[$nav_value] = $i;
2351 $sep =
"<span> </span>";
2354 if ($this->custom_prev_next && $this->custom_prev !=
"")
2358 $LinkBar .=
"<a href=\"".$this->custom_prev.$hash.
"\">".$layout_prev.
"</a>";
2360 else if ($this->
getOffset() >= 1 && !$this->custom_prev_next)
2365 $LinkBar .=
"<a href=\"".$link.$prevoffset.$hash.
"\">".$layout_prev.
"</a>";
2371 $LinkBar .=
'<span class="ilTableFootLight">'.$layout_prev.
"</span>";
2377 $LinkBar .=
'<input type="hidden" name="'.$this->getNavParameter().
2381 $sep =
"<span> | </span>";
2384 if ($this->custom_prev_next && $this->custom_next !=
"")
2388 $LinkBar .=
"<a href=\"".$this->custom_next.$hash.
"\">".$layout_next.
"</a>";
2390 else if (! ( ($this->
getOffset() / $this->
getLimit())==($pages-1) ) && ($pages!=1) &&
2391 !$this->custom_prev_next)
2396 $LinkBar .=
"<a href=\"".$link.$newoffset.$hash.
"\">".$layout_next.
"</a>";
2402 $LinkBar .=
'<span class="ilTableFootLight">'.$layout_next.
"</span>";
2405 $sep =
"<span> </span>";
2407 if (count($offset_arr) && !$this->
getDisplayAsBlock() && !$this->custom_prev_next)
2412 '<label for="tab_page_sel_'.$a_num.
'">'.$lng->txt(
"page").
'</label> '.
2414 $this->
getNavParameter().$a_num, $offset_arr,
false,
true, 0,
"small",
2415 array(
"id" =>
"tab_page_sel_".$a_num,
2416 "onchange" =>
"ilTablePageSelection(this, 'cmd[".$this->parent_cmd.
"]')"));
2431 $hidden_row =
false;
2432 if(count($this->hidden_inputs))
2434 foreach ($this->hidden_inputs as $hidden_input)
2436 $this->tpl->setCurrentBlock(
"tbl_hidden_field");
2437 $this->tpl->setVariable(
"FIELD_NAME", $hidden_input[
"name"]);
2438 $this->tpl->setVariable(
"FIELD_VALUE", $hidden_input[
"value"]);
2439 $this->tpl->parseCurrentBlock();
2442 $this->tpl->setCurrentBlock(
"tbl_hidden_row");
2443 $this->tpl->parseCurrentBlock();
2455 $action_row =
false;
2459 if (count($this->sel_buttons) > 0)
2461 foreach ($this->sel_buttons as $button)
2463 $this->tpl->setCurrentBlock(
"sel_button");
2464 $this->tpl->setVariable(
"SBUTTON_SELECT",
2466 $button[
"options"],
false,
true));
2467 $this->tpl->setVariable(
"SBTN_NAME", $button[
"cmd"]);
2468 $this->tpl->setVariable(
"SBTN_VALUE", $button[
"text"]);
2469 $this->tpl->parseCurrentBlock();
2473 $this->tpl->setCurrentBlock(
"sel_top_button");
2474 $this->tpl->setVariable(
"SBUTTON_SELECT",
2476 $button[
"options"],
false,
true));
2477 $this->tpl->setVariable(
"SBTN_NAME", $button[
"cmd"]);
2478 $this->tpl->setVariable(
"SBTN_VALUE", $button[
"text"]);
2479 $this->tpl->parseCurrentBlock();
2485 $this->sel_buttons[] = array(
"options" => $a_options,
"cmd" => $a_cmd,
"text" => $a_text);
2488 if (count($this->buttons) > 0)
2490 foreach ($this->buttons as $button)
2492 if (strlen($button[
'onclick']))
2494 $this->tpl->setCurrentBlock(
'cmdonclick');
2495 $this->tpl->setVariable(
'CMD_ONCLICK', $button[
'onclick']);
2496 $this->tpl->parseCurrentBlock();
2498 $this->tpl->setCurrentBlock(
"plain_button");
2499 if ($button[
"id"] !=
"")
2501 $this->tpl->setVariable(
"PBID",
' id="'.$button[
"id"].
'" ');
2503 $this->tpl->setVariable(
"PBTN_NAME", $button[
"cmd"]);
2504 $this->tpl->setVariable(
"PBTN_VALUE", $button[
"text"]);
2505 $this->tpl->parseCurrentBlock();
2509 if (strlen($button[
'onclick']))
2511 $this->tpl->setCurrentBlock(
'top_cmdonclick');
2512 $this->tpl->setVariable(
'CMD_ONCLICK', $button[
'onclick']);
2513 $this->tpl->parseCurrentBlock();
2515 $this->tpl->setCurrentBlock(
"plain_top_button");
2516 $this->tpl->setVariable(
"PBTN_NAME", $button[
"cmd"]);
2517 $this->tpl->setVariable(
"PBTN_VALUE", $button[
"text"]);
2518 $this->tpl->parseCurrentBlock();
2527 if(count($this->mi_sel_buttons))
2529 foreach ($this->mi_sel_buttons as $button)
2531 $this->tpl->setCurrentBlock(
"mi_sel_button");
2532 $this->tpl->setVariable(
"MI_BUTTON_SELECT",
2534 $button[
"options"],
false,
true));
2535 $this->tpl->setVariable(
"MI_BTN_NAME", $button[
"cmd"]);
2536 $this->tpl->setVariable(
"MI_BTN_VALUE", $button[
"text"]);
2537 $this->tpl->parseCurrentBlock();
2541 $this->tpl->setCurrentBlock(
"mi_top_sel_button");
2542 $this->tpl->setVariable(
"MI_BUTTON_SELECT",
2544 $button[
"options"],
false,
true));
2545 $this->tpl->setVariable(
"MI_BTN_NAME", $button[
"cmd"]);
2546 $this->tpl->setVariable(
"MI_BTN_VALUE", $button[
"text"]);
2547 $this->tpl->parseCurrentBlock();
2556 if (count($this->multi) > 1 && $this->
dataExists())
2558 if($this->enable_command_for_all && $this->max_count <= self::getAllCommandLimit())
2560 $this->tpl->setCurrentBlock(
"tbl_cmd_select_all");
2561 $this->tpl->setVariable(
"TXT_SELECT_CMD_ALL", $lng->txt(
"all_objects"));
2562 $this->tpl->parseCurrentBlock();
2565 $this->tpl->setCurrentBlock(
"tbl_cmd_select");
2567 foreach ($this->multi as $mc)
2569 $sel[$mc[
"cmd"]] = $mc[
"text"];
2571 $this->tpl->setVariable(
"SELECT_CMDS",
2573 $this->tpl->setVariable(
"TXT_EXECUTE", $lng->txt(
"execute"));
2574 $this->tpl->parseCurrentBlock();
2580 if($this->enable_command_for_all && $this->max_count <= self::getAllCommandLimit())
2582 $this->tpl->setCurrentBlock(
"tbl_top_cmd_select_all");
2583 $this->tpl->setVariable(
"TXT_SELECT_CMD_ALL", $lng->txt(
"all_objects"));
2584 $this->tpl->parseCurrentBlock();
2587 $this->tpl->setCurrentBlock(
"tbl_top_cmd_select");
2589 foreach ($this->multi as $mc)
2591 $sel[$mc[
"cmd"]] = $mc[
"text"];
2593 $this->tpl->setVariable(
"SELECT_CMDS",
2595 $this->tpl->setVariable(
"TXT_EXECUTE", $lng->txt(
"execute"));
2596 $this->tpl->parseCurrentBlock();
2599 elseif(count($this->multi) == 1 && $this->
dataExists())
2601 $this->tpl->setCurrentBlock(
"tbl_single_cmd");
2603 foreach ($this->multi as $mc)
2608 $this->tpl->setVariable(
"TXT_SINGLE_CMD",$txt);
2609 $this->tpl->setVariable(
"SINGLE_CMD",
$cmd);
2610 $this->tpl->parseCurrentBlock();
2616 $this->tpl->setCurrentBlock(
"tbl_top_single_cmd");
2618 foreach ($this->multi as $mc)
2623 $this->tpl->setVariable(
"TXT_SINGLE_CMD",$txt);
2624 $this->tpl->setVariable(
"SINGLE_CMD",
$cmd);
2625 $this->tpl->parseCurrentBlock();
2631 $this->tpl->setCurrentBlock(
"tbl_action_img_arrow");
2633 $this->tpl->setVariable(
"ALT_ARROW", $lng->txt(
"action"));
2634 $this->tpl->parseCurrentBlock();
2638 $this->tpl->setCurrentBlock(
"tbl_top_action_img_arrow");
2640 $this->tpl->setVariable(
"ALT_ARROW", $lng->txt(
"action"));
2641 $this->tpl->parseCurrentBlock();
2647 $this->tpl->setCurrentBlock(
"tbl_action_row");
2648 $this->tpl->parseCurrentBlock();
2651 $this->tpl->setCurrentBlock(
"tbl_top_action_row");
2652 $this->tpl->parseCurrentBlock();
2664 $this->headerHTML = $html;
2677 if(is_object($ilUser) && $this->
getId() !=
"" && $ilUser->getId() != ANONYMOUS_USER_ID)
2679 include_once(
"./Services/Table/classes/class.ilTablePropertiesStorage.php");
2682 $tab_prop->storeProperty($this->
getId(), $ilUser->getId(), $type, $value);
2696 if(is_object($ilUser) && $this->
getId() !=
"" && $ilUser->getId() != ANONYMOUS_USER_ID)
2698 include_once(
"./Services/Table/classes/class.ilTablePropertiesStorage.php");
2701 return $tab_prop->getProperty($this->
getId(), $ilUser->getId(), $type);
2733 foreach($this->filters as $item)
2738 if($this->optional_filters &&
$result[
"selfilters"])
2740 foreach($this->optional_filters as $item)
2742 if(in_array($item->getFieldId(),
$result[
"selfilters"]))
2760 if(method_exists($a_item,
"getChecked"))
2762 return $a_item->getChecked();
2764 else if(method_exists($a_item,
"getValue"))
2766 return $a_item->getValue();
2768 else if(method_exists($a_item,
"getDate"))
2782 if(method_exists($a_item,
"setChecked"))
2784 $a_item->setChecked($a_value);
2786 else if(method_exists($a_item,
"setValue"))
2788 $a_item->setValue($a_value);
2790 else if(method_exists($a_item,
"setDate"))
2806 $this->context = $id;
2827 $this->show_rows_selector = (bool)$a_value;
2847 $this->show_templates = (bool)$a_value;
2872 if(trim($a_name) && $this->
getContext() !=
"" && is_object($ilUser) && $ilUser->getId() != ANONYMOUS_USER_ID)
2874 include_once(
"./Services/Table/classes/class.ilTableTemplatesStorage.php");
2877 $data = $storage->load($this->
getContext(), $ilUser->getId(), $a_name);
2880 foreach(
$data as $property => $value)
2886 $data[
"filter_values"] = unserialize(
$data[
"filter_values"]);
2887 if(
$data[
"filter_values"])
2889 $this->restore_filter_values =
$data[
"filter_values"];
2909 if(trim($a_name) && $this->
getContext() !=
"" && is_object($ilUser) && $ilUser->getId() != ANONYMOUS_USER_ID)
2911 include_once(
"./Services/Table/classes/class.ilTableTemplatesStorage.php");
2915 $state[
"filter_values"] = serialize($state[
"filter_values"]);
2916 $state[
"selfields"] = serialize($state[
"selfields"]);
2917 $state[
"selfilters"] = serialize($state[
"selfilters"]);
2919 $storage->store($this->
getContext(), $ilUser->getId(), $a_name, $state);
2937 if(trim($a_name) && $this->
getContext() !=
"" && is_object($ilUser) && $ilUser->getId() != ANONYMOUS_USER_ID)
2939 include_once(
"./Services/Table/classes/class.ilTableTemplatesStorage.php");
2941 $storage->delete($this->
getContext(), $ilUser->getId(), $a_name);
2978 $this->export_formats = array();
2981 $valid = array(self::EXPORT_EXCEL =>
"tbl_export_excel",
2982 self::EXPORT_CSV =>
"tbl_export_csv");
2984 foreach($formats as $format)
2986 if(array_key_exists($format,
$valid))
2988 $this->export_formats[$format] =
$valid[$format];
2999 $this->print_mode = (bool)$a_value;
3043 case self::EXPORT_EXCEL:
3044 include_once
"./Services/Excel/classes/class.ilExcelUtils.php";
3045 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
3047 $workbook = $adapter->getWorkbook();
3048 $worksheet = $workbook->addWorksheet();
3054 foreach($this->row_data as $set)
3064 case self::EXPORT_CSV:
3065 include_once
"./Services/Utilities/classes/class.ilCSVWriter.php";
3067 $csv->setSeparator(
";");
3072 foreach($this->row_data as $set)
3081 header(
"Content-type: text/comma-separated-values");
3082 header(
"Content-Disposition: attachment; filename=\"".
$filename.
"\"");
3083 header(
"Expires: 0");
3084 header(
"Cache-Control: must-revalidate, post-check=0,pre-check=0");
3085 header(
"Pragma: public");
3086 echo $csv->getCSVString();
3091 file_put_contents(
$filename, $csv->getCSVString());
3125 foreach ($this->column as $column)
3127 $title = strip_tags($column[
"text"]);
3130 $worksheet->write($a_row, $col,
$title);
3148 foreach ($a_set as $key => $value)
3150 if(is_array($value))
3152 $value = implode(
', ', $value);
3154 $a_worksheet->write($a_row, $col, strip_tags($value));
3178 foreach ($this->column as $column)
3180 $title = strip_tags($column[
"text"]);
3183 $a_csv->addColumn(
$title);
3198 foreach ($a_set as $key => $value)
3200 if(is_array($value))
3202 $value = implode(
', ', $value);
3204 $a_csv->addColumn(strip_tags($value));
3216 $this->enable_command_for_all = (bool)$a_value;
3226 global $ilClientIniFile;
3228 $limit = $ilClientIniFile->readVariable(
"system",
"TABLE_ACTION_ALL_LIMIT");