Class ilTable2GUI. More...
Inheritance diagram for ilTable2GUI:
Collaboration diagram for ilTable2GUI:Public Member Functions | |
| __construct ($a_parent_obj, $a_parent_cmd="") | |
| Constructor. | |
| getParentObject () | |
| get parent object | |
| setNoEntriesText ($a_text) | |
| Set text for an empty table. | |
| getNoEntriesText () | |
| Get text for an empty table. | |
| setEnableTitle ($a_enabletitle) | |
| Set Enable Title. | |
| getEnableTitle () | |
| Get Enable Title. | |
| setEnableHeader ($a_enableheader) | |
| Set Enable Header. | |
| getEnableHeader () | |
| Get Enable Header. | |
| setTitle ($a_title, $a_icon=0, $a_icon_alt=0) | |
| set table title public | |
| setOrderField ($a_order_field) | |
| set order column | |
| getOrderField () | |
| setData ($a_data) | |
| set table data public | |
| getData () | |
| setPrefix ($a_prefix) | |
| set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) public | |
| setFormAction ($a_form_action) | |
| Set Form action parameter. | |
| getFormAction () | |
| Get Form action parameter. | |
| setFormName ($a_formname) | |
| Set Form name. | |
| getFormName () | |
| Get Form name. | |
| getSelectAllCheckbox () | |
| Get the name of the checkbox that should be toggled with a select all button. | |
| setSelectAllCheckbox ($a_select_all_checkbox) | |
| Set the name of the checkbox that should be toggled with a select all button. | |
| setRowTemplate ($a_template, $a_template_dir="") | |
| Set row template. | |
| setDefaultOrderField ($a_defaultorderfield) | |
| Set Default order field. | |
| getDefaultOrderField () | |
| Get Default order field. | |
| setDefaultOrderDirection ($a_defaultorderdirection) | |
| Set Default order direction. | |
| getDefaultOrderDirection () | |
| Get Default order direction. | |
| addCommandButton ($a_cmd, $a_text) | |
| Add Command button. | |
| setCloseCommand ($a_link) | |
| Add command for closing table. | |
| addMultiCommand ($a_cmd, $a_text) | |
| Add Command button. | |
| addHeaderCommand ($a_href, $a_text, $a_target="", $a_img="") | |
| Add Header Command (Link) (Image needed for now). | |
| addColumn ($a_text, $a_sort_field="", $a_width="") | |
| Add a column to the header. | |
| getNavParameter () | |
| setOrderLink ($sort_field, $order_dir) | |
| fillHeader () | |
| getHTML () | |
| render () | |
| render table public | |
| fillFooter () | |
| Fill footer row. | |
| getLinkbar () | |
| Get previous/next linkbar. | |
| fillActionRow () | |
| Fill Action Row. | |
Protected Member Functions | |
| fillRow ($a_set) | |
| Standard Version of Fill Row. | |
Protected Attributes | |
| $close_command = "" | |
Class ilTable2GUI.
Definition at line 34 of file class.ilTable2GUI.php.
| ilTable2GUI::__construct | ( | $ | a_parent_obj, | |
| $ | a_parent_cmd = "" | |||
| ) |
Constructor.
Reimplemented in ilCourseInfoFileTableGUI, ilEventFileTableGUI, ilAdvancedMDFieldTableGUI, ilAdvancedMDRecordExportFilesTableGUI, ilAdvancedMDRecordTableGUI, ilLDAPRoleAssignmentTableGUI, ilAddressbookTableGUI, and ilMDCopyrightTableGUI.
Definition at line 42 of file class.ilTable2GUI.php.
References ilTableGUI::setLimit().
Referenced by ilMediaCastTableGUI::ilMediaCastTableGUI(), ilNewsForContextTableGUI::ilNewsForContextTableGUI(), ilPDNewsTableGUI::ilPDNewsTableGUI(), and ilSCORM2004TrackingTableGUI::ilSCORM2004TrackingTableGUI().
{
global $ilUser;
parent::__construct(0, false);
$this->parent_obj = $a_parent_obj;
$this->parent_cmd = $a_parent_cmd;
$this->buttons = array();
$this->header_commands = array();
$this->multi = array();
$this->formname = "table";
$this->tpl = new ilTemplate("tpl.table2.html", true, true, "Services/Table");
$this->setLimit($ilUser->getPref("hits_per_page"));
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTable2GUI::addColumn | ( | $ | a_text, | |
| $ | a_sort_field = "", |
|||
| $ | a_width = "" | |||
| ) | [final] |
Add a column to the header.
| string | Text | |
| string | Sort field name (corresponds to data array field) | |
| string | Width string |
Definition at line 329 of file class.ilTable2GUI.php.
Referenced by ilMDCopyrightTableGUI::__construct(), ilLDAPRoleAssignmentTableGUI::__construct(), ilAdvancedMDRecordTableGUI::__construct(), ilAdvancedMDRecordExportFilesTableGUI::__construct(), ilAdvancedMDFieldTableGUI::__construct(), ilEventFileTableGUI::__construct(), ilCourseInfoFileTableGUI::__construct(), ilMediaCastTableGUI::ilMediaCastTableGUI(), ilNewsForContextTableGUI::ilNewsForContextTableGUI(), ilPDNewsTableGUI::ilPDNewsTableGUI(), and ilSCORM2004TrackingTableGUI::ilSCORM2004TrackingTableGUI().
{
$this->column[] = array(
"text" => $a_text,
"sort_field" => $a_sort_field,
"width" => $a_width);
$this->column_count = count($this->column);
}
Here is the caller graph for this function:| ilTable2GUI::addCommandButton | ( | $ | a_cmd, | |
| $ | a_text | |||
| ) |
Add Command button.
| string | Command | |
| string | Text |
Definition at line 283 of file class.ilTable2GUI.php.
{
$this->buttons[] = array("cmd" => $a_cmd, "text" => $a_text);
}
| ilTable2GUI::addHeaderCommand | ( | $ | a_href, | |
| $ | a_text, | |||
| $ | a_target = "", |
|||
| $ | a_img = "" | |||
| ) |
Add Header Command (Link) (Image needed for now).
| string | href | |
| string | text |
Definition at line 316 of file class.ilTable2GUI.php.
{
$this->header_commands[] = array("href" => $a_href, "text" => $a_text,
"target" => $a_target, "img" => $a_img);
}
| ilTable2GUI::addMultiCommand | ( | $ | a_cmd, | |
| $ | a_text | |||
| ) |
Add Command button.
| string | Command | |
| string | Text |
Definition at line 305 of file class.ilTable2GUI.php.
Referenced by ilSCORM2004TrackingTableGUI::ilSCORM2004TrackingTableGUI().
{
$this->multi[] = array("cmd" => $a_cmd, "text" => $a_text);
}
Here is the caller graph for this function:| ilTable2GUI::fillActionRow | ( | ) |
Fill Action Row.
Definition at line 724 of file class.ilTable2GUI.php.
References $lng, ilUtil::formSelect(), ilTableGUI::getColumnCount(), and ilUtil::getImagePath().
Referenced by getHTML().
{
global $lng;
// action row
$action_row = false;
$arrow = false;
// add buttons
if (count($this->buttons) > 0)
{
foreach ($this->buttons as $button)
{
$this->tpl->setCurrentBlock("plain_button");
$this->tpl->setVariable("PBTN_NAME", $button["cmd"]);
$this->tpl->setVariable("PBTN_VALUE", $button["text"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("plain_buttons");
$this->tpl->parseCurrentBlock();
$action_row = true;
}
// multi selection
if (count($this->multi) > 0)
{
$this->tpl->setCurrentBlock("tbl_cmd_select");
$sel = array();
foreach ($this->multi as $mc)
{
$sel[$mc["cmd"]] = $mc["text"];
}
$this->tpl->setVariable("SELECT_CMDS",
ilUtil::formSelect("", "selected_cmd", $sel, false, true));
$this->tpl->setVariable("TXT_EXECUTE", $lng->txt("execute"));
$this->tpl->parseCurrentBlock();
$arrow = true;
$action_row = true;
}
if ($arrow)
{
$this->tpl->setCurrentBlock("tbl_action_img_arrow");
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$this->tpl->setVariable("ALT_ARROW", $lng->txt("action"));
$this->tpl->parseCurrentBlock();
}
if ($action_row)
{
$this->tpl->setCurrentBlock("tbl_action_row");
$this->tpl->setVariable("COLUMN_COUNTS", $this->getColumnCount());
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTable2GUI::fillFooter | ( | ) |
Fill footer row.
Definition at line 570 of file class.ilTable2GUI.php.
References $ilCtrl, $lng, ilTableGUI::getColumnCount(), getFormName(), getLinkbar(), and getSelectAllCheckbox().
Referenced by getHTML().
{
global $lng, $ilCtrl;
$footer = false;
// select all checkbox
if ((strlen($this->getFormName())) && (strlen($this->getSelectAllCheckbox())))
{
$this->tpl->setCurrentBlock("select_all_checkbox");
$this->tpl->setVariable("SELECT_ALL_TXT_SELECT_ALL", $lng->txt("select_all"));
$this->tpl->setVariable("SELECT_ALL_CHECKBOX_NAME", $this->getSelectAllCheckbox());
$this->tpl->setVariable("SELECT_ALL_FORM_NAME", $this->getFormName());
$this->tpl->parseCurrentBlock();
$footer = true;
}
// table footer numinfo
if ($this->enabled["numinfo"] && $this->enabled["footer"])
{
$start = $this->offset + 1; // compute num info
$end = $this->offset + $this->limit;
if ($end > $this->max_count or $this->limit == 0)
{
$end = $this->max_count;
}
if ($this->lang_support)
{
$numinfo = "(".$this->lng->txt("dataset")." ".$start." - ".$end." ".strtolower($this->lng->txt("of"))." ".$this->max_count.")";
}
else
{
$numinfo = "(Dataset ".$start." - ".$end." of ".$this->max_count.")";
}
if ($this->max_count > 0)
{
//$numinfo = $this->lng->txt("no_datasets");
$this->tpl->setCurrentBlock("tbl_footer_numinfo");
$this->tpl->setVariable("NUMINFO", $numinfo);
$this->tpl->parseCurrentBlock();
}
$footer = true;
}
// table footer linkbar
if ($this->enabled["linkbar"] && $this->enabled["footer"] && $this->limit != 0
&& $this->max_count > 0)
{
$layout = array(
"link" => $this->footer_style,
"prev" => $this->footer_previous,
"next" => $this->footer_next,
);
$linkbar = $this->getLinkbar();
$this->tpl->setCurrentBlock("tbl_footer_linkbar");
$this->tpl->setVariable("LINKBAR", $linkbar);
$this->tpl->parseCurrentBlock();
$footer = true;
}
if ($footer)
{
$this->tpl->setCurrentBlock("tbl_footer");
$this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount());
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTable2GUI::fillHeader | ( | ) |
Definition at line 361 of file class.ilTable2GUI.php.
References ilUtil::getImagePath(), and setOrderLink().
Referenced by render().
{
foreach ($this->column as $column)
{
if (!$this->enabled["sort"] || $column["sort_field"] == "")
{
$this->tpl->setCurrentBlock("tbl_header_no_link");
if ($column["width"] != "")
{
$this->tpl->setVariable("TBL_COLUMN_WIDTH_NO_LINK"," width=\"".$column["width"]."\"");
}
$this->tpl->setVariable("TBL_HEADER_CELL_NO_LINK",
$column["text"]);
$this->tpl->parseCurrentBlock();
$this->tpl->touchBlock("tbl_header_th");
continue;
}
if (($column["sort_field"] == $this->order_field) && ($this->order_direction != ""))
{
$this->tpl->setCurrentBlock("tbl_order_image");
$this->tpl->setVariable("IMG_ORDER_DIR",ilUtil::getImagePath($this->order_direction."_order.gif"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("tbl_header_cell");
$this->tpl->setVariable("TBL_HEADER_CELL", $column["text"]);
// only set width if a value is given for that column
if ($column["width"] != "")
{
$this->tpl->setVariable("TBL_COLUMN_WIDTH"," width=\"".$column["width"]."\"");
}
$lng_sort_column = $this->lng->txt("sort_by_this_column");
$this->tpl->setVariable("TBL_ORDER_ALT",$lng_sort_column);
$order_dir = "asc";
if ($column["sort_field"] == $this->order_field)
{
$order_dir = $this->sort_order;
$lng_change_sort = $this->lng->txt("change_sort_direction");
$this->tpl->setVariable("TBL_ORDER_ALT",$lng_change_sort);
}
$this->setOrderLink($column["sort_field"], $order_dir);
$this->tpl->parseCurrentBlock();
$this->tpl->touchBlock("tbl_header_th");
}
$this->tpl->setCurrentBlock("tbl_header");
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTable2GUI::fillRow | ( | $ | a_set | ) | [protected] |
Standard Version of Fill Row.
Most likely to be overwritten by derived class.
| array | $a_set data array |
Reimplemented in ilCourseInfoFileTableGUI, ilEventFileTableGUI, ilMediaCastTableGUI, ilSCORM2004TrackingTableGUI, ilAdvancedMDFieldTableGUI, ilAdvancedMDRecordExportFilesTableGUI, ilAdvancedMDRecordTableGUI, ilLDAPRoleAssignmentTableGUI, ilAddressbookTableGUI, ilMDCopyrightTableGUI, ilNewsForContextTableGUI, and ilPDNewsTableGUI.
Definition at line 558 of file class.ilTable2GUI.php.
Referenced by getHTML().
{
foreach ($a_set as $key => $value)
{
$this->tpl->setVariable("VAL_".strtoupper($key), $value);
}
}
Here is the caller graph for this function:| ilTable2GUI::getData | ( | ) | [final] |
Reimplemented from ilTableGUI.
Definition at line 155 of file class.ilTable2GUI.php.
Referenced by getHTML().
{
return $this->row_data;
}
Here is the caller graph for this function:| ilTable2GUI::getDefaultOrderDirection | ( | ) |
Get Default order direction.
Definition at line 272 of file class.ilTable2GUI.php.
Referenced by getHTML().
{
return $this->defaultorderdirection;
}
Here is the caller graph for this function:| ilTable2GUI::getDefaultOrderField | ( | ) |
Get Default order field.
Definition at line 252 of file class.ilTable2GUI.php.
Referenced by getHTML().
{
return $this->defaultorderfield;
}
Here is the caller graph for this function:| ilTable2GUI::getEnableHeader | ( | ) |
Get Enable Header.
Definition at line 125 of file class.ilTable2GUI.php.
{
return $this->enabled["header"];
}
| ilTable2GUI::getEnableTitle | ( | ) |
Get Enable Title.
Definition at line 105 of file class.ilTable2GUI.php.
{
return $this->enabled["title"];
}
| ilTable2GUI::getFormAction | ( | ) | [final] |
Get Form action parameter.
Definition at line 180 of file class.ilTable2GUI.php.
Referenced by getHTML().
{
return $this->form_action;
}
Here is the caller graph for this function:| ilTable2GUI::getFormName | ( | ) |
Get Form name.
Reimplemented from ilTableGUI.
Definition at line 200 of file class.ilTable2GUI.php.
Referenced by fillFooter(), and getHTML().
{
return $this->formname;
}
Here is the caller graph for this function:| ilTable2GUI::getHTML | ( | ) | [final] |
Definition at line 417 of file class.ilTable2GUI.php.
References $_GET, ilTableGUI::$data, $lng, fillActionRow(), fillFooter(), fillRow(), getData(), getDefaultOrderDirection(), getDefaultOrderField(), getFormAction(), getFormName(), ilTableGUI::getLimit(), getNavParameter(), getNoEntriesText(), ilTableGUI::getOffset(), ilTableGUI::getOrderDirection(), getOrderField(), render(), ilTableGUI::setFooter(), ilTableGUI::setMaxCount(), ilTableGUI::setOffset(), ilTableGUI::setOrderDirection(), setOrderField(), and ilUtil::sortArray().
{
global $lng;
$this->nav_value = ($_POST[$this->getNavParameter()] != "")
? $_POST[$this->getNavParameter()]
: $_GET[$this->getNavParameter()];
$nav = explode(":", $this->nav_value);
// $nav[0] is order by
$this->setOrderField(($nav[0] != "") ? $nav[0] : $this->getDefaultOrderField());
$this->setOrderDirection(($nav[1] != "") ? $nav[1] : $this->getDefaultOrderDirection());
$this->setOffset($nav[2]);
$this->setMaxCount(count($this->row_data));
$this->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
// sort
$data = $this->getData();
$data = ilUtil::sortArray($data, $this->getOrderField(),
$this->getOrderDirection());
// slice
$data = array_slice($data, $this->getOffset(), $this->getLimit());
// fill rows
if(count($data) > 0)
{
$this->tpl->addBlockFile("TBL_CONTENT", "tbl_content", $this->row_template,
$this->row_template_dir);
foreach($data as $set)
{
$this->tpl->setCurrentBlock("tbl_content");
$this->css_row = ($this->css_row != "tblrow1")
? "tblrow1"
: "tblrow2";
$this->tpl->setVariable("CSS_ROW", $this->css_row);
$this->fillRow($set);
$this->tpl->setCurrentBlock("tbl_content");
$this->tpl->parseCurrentBlock();
}
}
else if (trim($this->getNoEntriesText()) != '')
{
$this->css_row = ($this->css_row != "tblrow1")
? "tblrow1"
: "tblrow2";
$this->tpl->setVariable('TBL_NO_ENTRY_CSS_ROW', $this->css_row);
$this->tpl->setVariable('TBL_NO_ENTRY_COLUMN_COUNT', $this->column_count);
$this->tpl->setVariable('TBL_NO_ENTRY_TEXT', trim($this->getNoEntriesText()));
}
// set form action
if ($this->form_action != "")
{
$this->tpl->setCurrentBlock("tbl_form_header");
$this->tpl->setVariable("FORMACTION", $this->getFormAction());
$this->tpl->setVariable("FORMNAME", $this->getFormName());
$this->tpl->parseCurrentBlock();
$this->tpl->touchBlock("tbl_form_footer");
}
$this->fillFooter();
$this->fillActionRow();
return $this->render();
}
Here is the call graph for this function:| ilTable2GUI::getLinkbar | ( | ) |
Get previous/next linkbar.
Definition at line 647 of file class.ilTable2GUI.php.
References $ilCtrl, $lng, ilTableGUI::getLimit(), getNavParameter(), ilTableGUI::getOffset(), ilTableGUI::getOrderDirection(), and getOrderField().
Referenced by fillFooter().
{
global $ilCtrl, $lng;
$link = $ilCtrl->getLinkTargetByClass(get_class($this->parent_obj), $this->parent_cmd).
"&".$this->getNavParameter()."=".
$this->getOrderField().":".$this->getOrderDirection().":";
$LinkBar = "";
$layout_prev = $lng->txt("previous");
$layout_next = $lng->txt("next");
// if more entries then entries per page -> show link bar
if ($this->max_count > $this->getLimit())
{
// previous link
if ($this->getOffset() >= 1)
{
$prevoffset = $this->getOffset() - $this->getLimit();
$LinkBar .= "<a class=\"small\" href=\"".$link.$prevoffset."\">".$layout_prev." </a>";
}
// calculate number of pages
$pages = intval($this->max_count / $this->getLimit());
// add a page if a rest remains
if (($this->max_count % $this->getLimit()))
$pages++;
// links to other pages
$offset_arr = array();
for ($i = 1 ;$i <= $pages ; $i++)
{
$newoffset = $this->getLimit() * ($i-1);
$nav_value = $this->getOrderField().":".$this->getOrderDirection().":".$newoffset;
$offset_arr[$nav_value] = $i;
if ($newoffset == $this->getOffset())
{
// $LinkBar .= "[".$i."] ";
}
else
{
// $LinkBar .= '<a '.$layout_link.' href="'.
// $link.$newoffset.'">['.$i.']</a> ';
}
}
// show next link (if not last page)
if (! ( ($this->getOffset() / $this->getLimit())==($pages-1) ) && ($pages!=1) )
{
if ($LinkBar != "")
$LinkBar .= "<span class=\"small\" > | </span>";
$newoffset = $this->getOffset() + $this->getLimit();
$LinkBar .= "<a class=\"small\" href=\"".$link.$newoffset."\"> ".$layout_next."</a>";
}
if (count($offset_arr))
{
$LinkBar .= " ".ilUtil::formSelect($this->nav_value,
$this->getNavParameter(), $offset_arr, false, true, 0, "ilEditSelect").
' <input class="ilEditSubmit" type="submit" name="cmd['.$this->parent_cmd.']" value="'.
$lng->txt("select_page").'"> ';
}
return $LinkBar;
}
else
{
return false;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTable2GUI::getNavParameter | ( | ) | [final] |
Definition at line 338 of file class.ilTable2GUI.php.
Referenced by getHTML(), getLinkbar(), and setOrderLink().
{
return $this->prefix."_table_nav";
}
Here is the caller graph for this function:| ilTable2GUI::getNoEntriesText | ( | ) |
Get text for an empty table.
Definition at line 85 of file class.ilTable2GUI.php.
Referenced by getHTML().
{
return $this->noentriestext;
}
Here is the caller graph for this function:| ilTable2GUI::getOrderField | ( | ) |
Definition at line 145 of file class.ilTable2GUI.php.
Referenced by getHTML(), and getLinkbar().
{
return $this->order_field;
}
Here is the caller graph for this function:| ilTable2GUI::getParentObject | ( | ) |
get parent object
public
Definition at line 65 of file class.ilTable2GUI.php.
Referenced by ilMDCopyrightTableGUI::fillRow(), and ilLDAPRoleAssignmentTableGUI::fillRow().
{
return $this->parent_obj;
}
Here is the caller graph for this function:| ilTable2GUI::getSelectAllCheckbox | ( | ) |
Get the name of the checkbox that should be toggled with a select all button.
Reimplemented from ilTableGUI.
Definition at line 210 of file class.ilTable2GUI.php.
Referenced by fillFooter().
{
return $this->select_all_checkbox;
}
Here is the caller graph for this function:| ilTable2GUI::render | ( | ) |
render table public
Reimplemented from ilTableGUI.
Definition at line 493 of file class.ilTable2GUI.php.
References $command, $lng, fillHeader(), ilUtil::getImagePath(), and ilTableGUI::getStyle().
Referenced by getHTML().
{
global $lng;
$this->tpl->setVariable("CSS_TABLE",$this->getStyle("table"));
// table title and icon
if ($this->enabled["title"])
{
if ($this->enabled["icon"])
{
$this->tpl->setCurrentBlock("tbl_header_title_icon");
$this->tpl->setVariable("TBL_TITLE_IMG",ilUtil::getImagePath($this->icon));
$this->tpl->setVariable("TBL_TITLE_IMG_ALT",$this->icon_alt);
$this->tpl->parseCurrentBlock();
}
foreach($this->header_commands as $command)
{
$this->tpl->setCurrentBlock("tbl_header_img_link");
if ($command["target"] != "")
{
$this->tpl->setVariable("TARGET_IMG_LINK",
'target="'.$command["target"].'"');
}
$this->tpl->setVariable("ALT_IMG_LINK", $command["txt"]);
$this->tpl->setVariable("HREF_IMG_LINK", $command["href"]);
$this->tpl->setVariable("SRC_IMG_LINK",
$command["img"]);
$this->tpl->parseCurrentBlock();
}
// close command
if ($this->close_command != "")
{
$this->tpl->setCurrentBlock("tbl_header_img_link");
$this->tpl->setVariable("ALT_IMG_LINK",$lng->txt("close"));
$this->tpl->setVariable("HREF_IMG_LINK",$this->close_command);
$this->tpl->setVariable("SRC_IMG_LINK",ilUtil::getImagePath("icon_close2.gif"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("tbl_header_title");
$this->tpl->setVariable("COLUMN_COUNT",$this->column_count);
$this->tpl->setVariable("TBL_TITLE",$this->title);
$this->tpl->parseCurrentBlock();
}
// table header
if ($this->enabled["header"])
{
$this->fillHeader();
}
$this->tpl->touchBlock("tbl_table_end");
return $this->tpl->get();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTable2GUI::setCloseCommand | ( | $ | a_link | ) |
Add command for closing table.
| string | $a_link closing link |
Definition at line 294 of file class.ilTable2GUI.php.
Referenced by ilNewsForContextTableGUI::ilNewsForContextTableGUI().
{
$this->close_command = $a_link;
}
Here is the caller graph for this function:| ilTable2GUI::setData | ( | $ | a_data | ) | [final] |
set table data public
| array | table data |
Reimplemented from ilTableGUI.
Definition at line 150 of file class.ilTable2GUI.php.
Referenced by ilLDAPRoleAssignmentTableGUI::parse(), ilAdvancedMDFieldTableGUI::parseDefinitions(), ilAdvancedMDRecordExportFilesTableGUI::parseFiles(), ilAdvancedMDRecordTableGUI::parseRecords(), and ilMDCopyrightTableGUI::parseSelections().
{
$this->row_data = $a_data;
}
Here is the caller graph for this function:| ilTable2GUI::setDefaultOrderDirection | ( | $ | a_defaultorderdirection | ) |
Set Default order direction.
| string | $a_defaultorderdirection Default order direction |
Definition at line 262 of file class.ilTable2GUI.php.
Referenced by ilMDCopyrightTableGUI::__construct(), ilLDAPRoleAssignmentTableGUI::__construct(), ilAdvancedMDRecordTableGUI::__construct(), ilAdvancedMDRecordExportFilesTableGUI::__construct(), ilEventFileTableGUI::__construct(), ilCourseInfoFileTableGUI::__construct(), ilMediaCastTableGUI::ilMediaCastTableGUI(), and ilPDNewsTableGUI::ilPDNewsTableGUI().
{
$this->defaultorderdirection = $a_defaultorderdirection;
}
Here is the caller graph for this function:| ilTable2GUI::setDefaultOrderField | ( | $ | a_defaultorderfield | ) |
Set Default order field.
| string | $a_defaultorderfield Default order field |
Definition at line 242 of file class.ilTable2GUI.php.
Referenced by ilMDCopyrightTableGUI::__construct(), ilLDAPRoleAssignmentTableGUI::__construct(), ilAdvancedMDRecordTableGUI::__construct(), ilAdvancedMDRecordExportFilesTableGUI::__construct(), ilAdvancedMDFieldTableGUI::__construct(), ilEventFileTableGUI::__construct(), ilCourseInfoFileTableGUI::__construct(), ilMediaCastTableGUI::ilMediaCastTableGUI(), ilPDNewsTableGUI::ilPDNewsTableGUI(), and ilSCORM2004TrackingTableGUI::ilSCORM2004TrackingTableGUI().
{
$this->defaultorderfield = $a_defaultorderfield;
}
Here is the caller graph for this function:| ilTable2GUI::setEnableHeader | ( | $ | a_enableheader | ) |
Set Enable Header.
| boolean | $a_enableheader Enable Header |
Definition at line 115 of file class.ilTable2GUI.php.
Referenced by ilPDNewsTableGUI::ilPDNewsTableGUI().
{
$this->enabled["header"] = $a_enableheader;
}
Here is the caller graph for this function:| ilTable2GUI::setEnableTitle | ( | $ | a_enabletitle | ) |
Set Enable Title.
| boolean | $a_enabletitle Enable Title |
Definition at line 95 of file class.ilTable2GUI.php.
Referenced by ilPDNewsTableGUI::ilPDNewsTableGUI().
{
$this->enabled["title"] = $a_enabletitle;
}
Here is the caller graph for this function:| ilTable2GUI::setFormAction | ( | $ | a_form_action | ) | [final] |
Set Form action parameter.
| string | $a_form_action Form action |
Definition at line 170 of file class.ilTable2GUI.php.
Referenced by ilMDCopyrightTableGUI::__construct(), ilAddressbookTableGUI::__construct(), ilLDAPRoleAssignmentTableGUI::__construct(), ilAdvancedMDRecordTableGUI::__construct(), ilAdvancedMDRecordExportFilesTableGUI::__construct(), ilAdvancedMDFieldTableGUI::__construct(), ilEventFileTableGUI::__construct(), ilCourseInfoFileTableGUI::__construct(), ilMediaCastTableGUI::ilMediaCastTableGUI(), ilNewsForContextTableGUI::ilNewsForContextTableGUI(), ilPDNewsTableGUI::ilPDNewsTableGUI(), and ilSCORM2004TrackingTableGUI::ilSCORM2004TrackingTableGUI().
{
$this->form_action = $a_form_action;
}
Here is the caller graph for this function:| ilTable2GUI::setFormName | ( | $ | a_formname | ) |
Set Form name.
| string | $a_formname Form name |
Reimplemented from ilTableGUI.
Definition at line 190 of file class.ilTable2GUI.php.
{
$this->formname = $a_formname;
}
| ilTable2GUI::setNoEntriesText | ( | $ | a_text | ) |
Set text for an empty table.
| string | $a_text Text |
Definition at line 75 of file class.ilTable2GUI.php.
{
$this->noentriestext = $a_text;
}
| ilTable2GUI::setOrderField | ( | $ | a_order_field | ) |
set order column
| string | (array) field name for ordering |
Definition at line 140 of file class.ilTable2GUI.php.
Referenced by getHTML().
{
$this->order_field = $a_order_field;
}
Here is the caller graph for this function:| ilTable2GUI::setOrderLink | ( | $ | sort_field, | |
| $ | order_dir | |||
| ) |
Reimplemented from ilTableGUI.
Definition at line 343 of file class.ilTable2GUI.php.
References $_GET, $ilCtrl, and getNavParameter().
Referenced by fillHeader().
{
global $ilCtrl;
$old = $_GET[$this->getNavParameter()];
// set order link
$ilCtrl->setParameter($this->parent_obj,
$this->getNavParameter(),
$sort_field.":".$order_dir.":".$this->offset);
$this->tpl->setVariable("TBL_ORDER_LINK",
$ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
// set old value of nav variable
$ilCtrl->setParameter($this->parent_obj,
$this->getNavParameter(), $old);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilTable2GUI::setPrefix | ( | $ | a_prefix | ) | [final] |
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) public
| string | prefix |
Reimplemented from ilTableGUI.
Definition at line 160 of file class.ilTable2GUI.php.
{
$this->prefix = $a_prefix;
}
| ilTable2GUI::setRowTemplate | ( | $ | a_template, | |
| $ | a_template_dir = "" | |||
| ) | [final] |
Set row template.
| string | $a_template Template file name. | |
| string | $a_template_dir Service/Module directory. |
Definition at line 231 of file class.ilTable2GUI.php.
Referenced by ilMDCopyrightTableGUI::__construct(), ilLDAPRoleAssignmentTableGUI::__construct(), ilAdvancedMDRecordTableGUI::__construct(), ilAdvancedMDRecordExportFilesTableGUI::__construct(), ilAdvancedMDFieldTableGUI::__construct(), ilEventFileTableGUI::__construct(), ilCourseInfoFileTableGUI::__construct(), ilMediaCastTableGUI::ilMediaCastTableGUI(), ilNewsForContextTableGUI::ilNewsForContextTableGUI(), ilPDNewsTableGUI::ilPDNewsTableGUI(), and ilSCORM2004TrackingTableGUI::ilSCORM2004TrackingTableGUI().
{
$this->row_template = $a_template;
$this->row_template_dir = $a_template_dir;
}
Here is the caller graph for this function:| ilTable2GUI::setSelectAllCheckbox | ( | $ | a_select_all_checkbox | ) |
Set the name of the checkbox that should be toggled with a select all button.
| string | $a_select_all_checkbox name of the checkbox |
Reimplemented from ilTableGUI.
Definition at line 220 of file class.ilTable2GUI.php.
Referenced by ilSCORM2004TrackingTableGUI::ilSCORM2004TrackingTableGUI().
{
$this->select_all_checkbox = $a_select_all_checkbox;
}
Here is the caller graph for this function:| ilTable2GUI::setTitle | ( | $ | a_title, | |
| $ | a_icon = 0, |
|||
| $ | a_icon_alt = 0 | |||
| ) | [final] |
set table title public
| string | table title | |
| string | file name of title icon | |
| string | alternative text for title icon |
Reimplemented from ilTableGUI.
Definition at line 130 of file class.ilTable2GUI.php.
{
parent::setTitle($a_title, $a_icon, $a_icon_alt);
}
ilTable2GUI::$close_command = "" [protected] |
Definition at line 36 of file class.ilTable2GUI.php.
1.7.1