ILIAS  release_8 Revision v8.24
class.ilWikiPageTemplatesTableGUI.php
Go to the documentation of this file.
1<?php
2
25{
27
28 public function __construct(
29 object $a_parent_obj,
30 string $a_parent_cmd,
31 int $a_wiki_id
32 ) {
33 global $DIC;
34
35 $this->ctrl = $DIC->ctrl();
36 $this->lng = $DIC->language();
37 $this->access = $DIC->access();
38 $ilCtrl = $DIC->ctrl();
39 $lng = $DIC->language();
40
41 parent::__construct($a_parent_obj, $a_parent_cmd);
42 $templates = new ilWikiPageTemplate($a_wiki_id);
43 $this->setData($templates->getAllInfo());
44 $this->setTitle($lng->txt(""));
45
46 $this->addColumn($this->lng->txt(""), "", "1");
47 $this->addColumn($this->lng->txt("title"), "title");
48 $this->addColumn($this->lng->txt("wiki_templ_new_pages"), "");
49 $this->addColumn($this->lng->txt("wiki_templ_add_to_page"), "");
50
51 $this->setDefaultOrderDirection("asc");
52 $this->setDefaultOrderField("title");
53
54 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
55 $this->setRowTemplate("tpl.wiki_page_templates_row.html", "Modules/Wiki");
56
57 $this->addMultiCommand("remove", $lng->txt("wiki_remove_template_status"));
58 $this->addCommandButton("saveTemplateSettings", $lng->txt("save"));
59 }
60
61 protected function fillRow(array $a_set): void
62 {
63 $this->tpl->setVariable("ID", $a_set["wpage_id"]);
64 $this->tpl->setVariable("TITLE", $a_set["title"]);
65 if ($a_set["new_pages"]) {
66 $this->tpl->setVariable("NEW_PAGES_CHECKED", 'checked="checked"');
67 }
68 if ($a_set["add_to_page"]) {
69 $this->tpl->setVariable("ADD_TO_PAGE_CHECKED", 'checked="checked"');
70 }
71 }
72}
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
addMultiCommand(string $a_cmd, string $a_text)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(object $a_parent_obj, string $a_parent_cmd, int $a_wiki_id)
fillRow(array $a_set)
Standard Version of Fill Row.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc