4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
23 public function __construct($a_parent_obj, $a_parent_cmd =
"", $a_has_write =
false)
27 $this->ctrl = $DIC->ctrl();
28 $this->lng = $DIC->language();
30 $lng = $DIC->language();
32 $this->
setId(
"bdgtmpl");
33 $this->has_write = (bool) $a_has_write;
35 parent::__construct($a_parent_obj, $a_parent_cmd);
41 if ($this->has_write) {
48 if ($this->has_write) {
66 include_once
"Services/Badge/classes/class.ilBadgeImageTemplate.php";
69 "id" => $template->getId(),
70 "title" => $template->getTitle(),
71 "path" => $template->getImagePath(),
72 "file" => $template->getImage()
84 if ($this->has_write) {
85 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
88 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
89 $this->tpl->setVariable(
"VAL_IMG", $a_set[
"path"]);
90 $this->tpl->setVariable(
"TXT_IMG", $a_set[
"file"]);
92 if ($this->has_write) {
97 $this->tpl->setVariable(
"TXT_EDIT",
$lng->txt(
"edit"));
98 $this->tpl->setVariable(
"URL_EDIT",
$url);
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
__construct($a_parent_obj, $a_parent_cmd="", $a_has_write=false)
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
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.
TableGUI class for badge template listing.
setLimit($a_limit=0, $a_default_limit=0)