ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 
4 include_once("Services/Block/classes/class.ilBlockGUI.php");
5 
15 {
16  static $block_type = "wikiside";
17  static $st_data;
18 
22  function __construct()
23  {
24  global $ilCtrl, $lng;
25 
26  parent::__construct();
27 
28  $lng->loadLanguageModule("wiki");
29  $this->setEnableNumInfo(false);
30 
31  $this->setTitle($lng->txt("wiki_quick_navigation"));
32  $this->allow_moving = false;
33  }
34 
40  static function getBlockType()
41  {
42  return self::$block_type;
43  }
44 
50  static function isRepositoryObject()
51  {
52  return false;
53  }
54 
58  static function getScreenMode()
59  {
60  return IL_SCREEN_SIDE;
61  }
62 
66  function executeCommand()
67  {
68  global $ilCtrl;
69 
70  $next_class = $ilCtrl->getNextClass();
71  $cmd = $ilCtrl->getCmd("getHTML");
72 
73  switch ($next_class)
74  {
75  default:
76  return $this->$cmd();
77  }
78  }
79 
85  function setPageObject($a_pageob)
86  {
87  $this->pageob = $a_pageob;
88  }
89 
95  function getPageObject()
96  {
97  return $this->pageob;
98  }
99 
103  function getHTML()
104  {
105  global $ilCtrl, $lng, $ilUser;
106 
107  return parent::getHTML();
108  }
109 
113  function fillDataSection()
114  {
115  global $ilCtrl, $lng, $ilAccess;
116 
117  $tpl = new ilTemplate("tpl.wiki_side_block_content.html", true, true, "Modules/Wiki");
118 
119  $wp = $this->getPageObject();
120 
121  // start page
122  $actions[] = array(
123  "txt" => $lng->txt("wiki_start_page"),
124  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "gotoStartPage")
125  );
126 
127  // all pages
128  $actions[] = array(
129  "txt" => $lng->txt("wiki_all_pages"),
130  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "allPages")
131  );
132 
133  // new pages
134  $actions[] = array(
135  "txt" => $lng->txt("wiki_new_pages"),
136  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "newPages")
137  );
138 
139  // popular pages
140  $actions[] = array(
141  "txt" => $lng->txt("wiki_popular_pages"),
142  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "popularPages")
143  );
144 
145  // orphaned pages
146  $actions[] = array(
147  "txt" => $lng->txt("wiki_orphaned_pages"),
148  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "orphanedPages")
149  );
150 
151  // recent changes
152  $actions[] = array(
153  "txt" => $lng->txt("wiki_recent_changes"),
154  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "recentChanges")
155  );
156 
157  foreach ($actions as $a)
158  {
159  $tpl->setCurrentBlock("action");
160  $tpl->setVariable("HREF", $a["href"]);
161  $tpl->setVariable("TXT", $a["txt"]);
162  $tpl->parseCurrentBlock();
163 
164  $tpl->touchBlock("item");
165  }
166 
167  $this->setDataSection($tpl->get());
168  }
169 }
170 
171 ?>
executeCommand()
execute command
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
$cmd
Definition: sahs_server.php:35
static isRepositoryObject()
Is this a repository object.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
static getBlockType()
Get block type.
setTitle($a_title)
Set Title.
setPageObject($a_pageob)
Set Page Object.
fillDataSection()
Fill data section.
getHTML()
Get bloch HTML code.
special template class to simplify handling of ITX/PEAR
static getScreenMode()
Get Screen Mode for current command.
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
BlockGUI class for wiki sideblock.
global $lng
Definition: privfeed.php:17
This class represents a block method of a block.
getPageObject()
Get Page Object.
const IL_SCREEN_SIDE