ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilWikiSideBlockGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("Services/Block/classes/class.ilBlockGUI.php");
5
17{
18 static $block_type = "wikiside";
19 static $st_data;
20
24 function __construct()
25 {
26 global $ilCtrl, $lng;
27
28 parent::ilBlockGUI();
29
30 $lng->loadLanguageModule("wiki");
31 $this->setEnableNumInfo(false);
32
33 $this->setTitle($lng->txt("wiki_quick_navigation"));
34 $this->allow_moving = false;
35 }
36
42 static function getBlockType()
43 {
44 return self::$block_type;
45 }
46
52 static function isRepositoryObject()
53 {
54 return false;
55 }
56
60 static function getScreenMode()
61 {
62 return IL_SCREEN_SIDE;
63 }
64
68 function &executeCommand()
69 {
70 global $ilCtrl;
71
72 $next_class = $ilCtrl->getNextClass();
73 $cmd = $ilCtrl->getCmd("getHTML");
74
75 switch ($next_class)
76 {
77 default:
78 return $this->$cmd();
79 }
80 }
81
87 function setPageObject($a_pageob)
88 {
89 $this->pageob = $a_pageob;
90 }
91
97 function getPageObject()
98 {
99 return $this->pageob;
100 }
101
105 function getHTML()
106 {
107 global $ilCtrl, $lng, $ilUser;
108
109 return parent::getHTML();
110 }
111
116 {
117 global $ilCtrl, $lng, $ilAccess;
118
119 $tpl = new ilTemplate("tpl.wiki_side_block_content.html", true, true, "Modules/Wiki");
120
121 $wp = $this->getPageObject();
122
123 // start page
124 $actions[] = array(
125 "txt" => $lng->txt("wiki_start_page"),
126 "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "gotoStartPage")
127 );
128
129 // all pages
130 $actions[] = array(
131 "txt" => $lng->txt("wiki_all_pages"),
132 "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "allPages")
133 );
134
135 // new pages
136 $actions[] = array(
137 "txt" => $lng->txt("wiki_new_pages"),
138 "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "newPages")
139 );
140
141 // popular pages
142 $actions[] = array(
143 "txt" => $lng->txt("wiki_popular_pages"),
144 "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "popularPages")
145 );
146
147 // orphaned pages
148 $actions[] = array(
149 "txt" => $lng->txt("wiki_orphaned_pages"),
150 "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "orphanedPages")
151 );
152
153 // recent changes
154 $actions[] = array(
155 "txt" => $lng->txt("wiki_recent_changes"),
156 "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "recentChanges")
157 );
158
159 foreach ($actions as $a)
160 {
161 $tpl->setCurrentBlock("action");
162 $tpl->setVariable("HREF", $a["href"]);
163 $tpl->setVariable("TXT", $a["txt"]);
164 $tpl->parseCurrentBlock();
165
166 $tpl->touchBlock("item");
167 }
168
169 $this->setDataSection($tpl->get());
170 }
171}
172
173?>
global $tpl
Definition: ilias.php:8
const IL_SCREEN_SIDE
This class represents a block method of a block.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setTitle($a_title)
Set Title.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
special template class to simplify handling of ITX/PEAR
BlockGUI class for wiki sideblock.
fillDataSection()
Fill data section.
getHTML()
Get bloch HTML code.
static isRepositoryObject()
Is this a repository object.
setPageObject($a_pageob)
Set Page Object.
& executeCommand()
execute command
getPageObject()
Get Page Object.
static getScreenMode()
Get Screen Mode for current command.
static getBlockType()
Get block type.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35
global $ilUser
Definition: imgupload.php:15