ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilImportantPagesTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Table/classes/class.ilTable2GUI.php");
5
15{
19 protected $access;
20
21
25 public function __construct($a_parent_obj, $a_parent_cmd)
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 $data = array("page_id" => 0) +
39 ilObjWiki::_lookupImportantPagesList($a_parent_obj->object->getId());
40 $this->setData($data);
41 $this->setTitle($lng->txt(""));
42 $this->setLimit(9999);
43
44 $this->addColumn("", "", "1", true);
45 $this->addColumn($this->lng->txt("wiki_ordering"), "order");
46 $this->addColumn($this->lng->txt("wiki_indentation"));
47 $this->addColumn($this->lng->txt("wiki_page"));
48 $this->addColumn($this->lng->txt("wiki_purpose"));
49
50 $this->setEnableHeader(true);
51 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
52 $this->setRowTemplate("tpl.imp_pages_row.html", "Modules/Wiki");
53 //$this->disable("footer");
54 $this->setEnableTitle(true);
55
56 $this->addMultiCommand("confirmRemoveImportantPages", $lng->txt("remove"));
57 $this->addMultiCommand("setAsStartPage", $lng->txt("wiki_set_as_start_page"));
58 $this->addCommandButton("saveOrderingAndIndent", $lng->txt("wiki_save_ordering_and_indent"));
59 }
60
64 protected function fillRow($a_set)
65 {
67
68 if ($a_set["page_id"] > 0) {
69 $this->tpl->setCurrentBlock("cb");
70 $this->tpl->setVariable("PAGE_ID", $a_set["page_id"]);
71 $this->tpl->parseCurrentBlock();
72
73 $this->tpl->setCurrentBlock("ord");
74 $this->tpl->setVariable("PAGE_ID_ORD", $a_set["page_id"]);
75 $this->tpl->setVariable("VAL_ORD", $a_set["ord"]);
76 $this->tpl->parseCurrentBlock();
77
78 $this->tpl->setVariable(
79 "PAGE_TITLE",
80 ilWikiPage::lookupTitle($a_set["page_id"])
81 );
82 $this->tpl->setVariable(
83 "SEL_INDENT",
85 $a_set["indent"],
86 "indent[" . $a_set["page_id"] . "]",
87 array(0 => "0", 1 => "1", 2 => "2"),
88 false,
89 true
90 )
91 );
92 } else {
93 $this->tpl->setVariable(
94 "PAGE_TITLE",
95 ($this->getParentObject()->object->getStartPage())
96 );
97
98 $this->tpl->setVariable(
99 "PURPOSE",
100 $lng->txt("wiki_start_page")
101 );
102 }
103 }
104}
An exception for terminatinating execution or to throw for unit testing.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
static _lookupImportantPagesList($a_wiki_id)
Get important pages list.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
addMultiCommand($a_cmd, $a_text)
Add Command button.
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.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7