5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
25 public function __construct($a_parent_obj, $a_parent_cmd, $a_lmme)
29 $this->ctrl = $DIC->ctrl();
30 $this->lng = $DIC->language();
31 $this->access = $DIC->access();
33 $lng = $DIC->language();
34 $ilAccess = $DIC->access();
35 $lng = $DIC->language();
37 parent::__construct($a_parent_obj, $a_parent_cmd);
39 $this->lmme = $a_lmme;
40 $entries = $this->lmme->getMenuEntries();
47 $this->
addColumn($this->lng->txt(
"link"));
48 $this->
addColumn($this->lng->txt(
"active"));
49 $this->
addColumn($this->lng->txt(
"actions"));
52 $this->
setRowTemplate(
"tpl.lm_menu_entry_row.html",
"Modules/LearningModule");
66 $ilCtrl->setParameter($this->parent_obj,
"menu_entry", $entry[
"id"]);
68 $this->tpl->setCurrentBlock(
"cmd");
69 $this->tpl->setVariable(
"HREF_CMD",
$ilCtrl->getLinkTarget($this->parent_obj,
"editMenuEntry"));
70 $this->tpl->setVariable(
"CMD", $this->lng->txt(
"edit"));
71 $this->tpl->parseCurrentBlock();
73 $this->tpl->setCurrentBlock(
"cmd");
74 $this->tpl->setVariable(
"HREF_CMD",
$ilCtrl->getLinkTarget($this->parent_obj,
"deleteMenuEntry"));
75 $this->tpl->setVariable(
"CMD", $this->lng->txt(
"delete"));
76 $this->tpl->parseCurrentBlock();
78 $ilCtrl->setParameter($this,
"menu_entry",
"");
80 $this->tpl->setVariable(
"LINK_ID", $entry[
"id"]);
82 if ($entry[
"type"] ==
"intern") {
83 $entry[
"link"] = ILIAS_HTTP_PATH .
"/goto.php?target=" . $entry[
"link"];
87 if (!strstr($entry[
"link"],
'://') && !strstr($entry[
"link"],
'mailto:')) {
88 $entry[
"link"] =
"http://" . $entry[
"link"];
91 $this->tpl->setVariable(
"HREF_LINK", $entry[
"link"]);
92 $this->tpl->setVariable(
"LINK", $entry[
"title"]);
95 $this->tpl->setVariable(
"ACTIVE_CHECK",
"checked=\"checked\"");
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
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.
static yn2tf($a_yn)
convert "y"/"n" to true/false