ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilWikiPageTemplatesTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 protected $access;
21
25 public function __construct($a_parent_obj, $a_parent_cmd, $a_wiki_id)
26 {
27 global $DIC;
28
29 $this->ctrl = $DIC->ctrl();
30 $this->lng = $DIC->language();
31 $this->access = $DIC->access();
32 $ilCtrl = $DIC->ctrl();
33 $lng = $DIC->language();
34 $ilAccess = $DIC->access();
35 $lng = $DIC->language();
36
37 parent::__construct($a_parent_obj, $a_parent_cmd);
38 include_once("./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
39 $templates = new ilWikiPageTemplate($a_wiki_id);
40 $this->setData($templates->getAllInfo());
41 $this->setTitle($lng->txt(""));
42
43 $this->addColumn($this->lng->txt(""), "", "1");
44 $this->addColumn($this->lng->txt("title"), "title");
45 $this->addColumn($this->lng->txt("wiki_templ_new_pages"), "");
46 $this->addColumn($this->lng->txt("wiki_templ_add_to_page"), "");
47
48 $this->setDefaultOrderDirection("asc");
49 $this->setDefaultOrderField("title");
50
51 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
52 $this->setRowTemplate("tpl.wiki_page_templates_row.html", "Modules/Wiki");
53
54 $this->addMultiCommand("remove", $lng->txt("wiki_remove_template_status"));
55 $this->addCommandButton("saveTemplateSettings", $lng->txt("save"));
56 }
57
61 protected function fillRow($a_set)
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}
An exception for terminatinating execution or to throw for unit testing.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
TableGUI class for wiki page templates.
__construct($a_parent_obj, $a_parent_cmd, $a_wiki_id)
Constructor.
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46