ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  public static $block_type = "wikiside";
17  public static $st_data;
18 
22  public function __construct()
23  {
24  global $DIC;
25 
26  $this->ctrl = $DIC->ctrl();
27  $this->lng = $DIC->language();
28  $this->user = $DIC->user();
29  $this->access = $DIC->access();
30  $lng = $DIC->language();
31 
32  parent::__construct();
33 
34  $lng->loadLanguageModule("wiki");
35  $this->setEnableNumInfo(false);
36 
37  $this->setTitle($lng->txt("wiki_quick_navigation"));
38  $this->allow_moving = false;
39  }
40 
46  public static function getBlockType()
47  {
48  return self::$block_type;
49  }
50 
56  public static function isRepositoryObject()
57  {
58  return false;
59  }
60 
64  public static function getScreenMode()
65  {
66  return IL_SCREEN_SIDE;
67  }
68 
72  public function executeCommand()
73  {
75 
76  $next_class = $ilCtrl->getNextClass();
77  $cmd = $ilCtrl->getCmd("getHTML");
78 
79  switch ($next_class) {
80  default:
81  return $this->$cmd();
82  }
83  }
84 
90  public function setPageObject($a_pageob)
91  {
92  $this->pageob = $a_pageob;
93  }
94 
100  public function getPageObject()
101  {
102  return $this->pageob;
103  }
104 
108  public function getHTML()
109  {
111  $lng = $this->lng;
113 
114  return parent::getHTML();
115  }
116 
120  public function fillDataSection()
121  {
123  $lng = $this->lng;
124  $ilAccess = $this->access;
125 
126  $tpl = new ilTemplate("tpl.wiki_side_block_content.html", true, true, "Modules/Wiki");
127 
128  $wp = $this->getPageObject();
129 
130  // start page
131  $actions[] = array(
132  "txt" => $lng->txt("wiki_start_page"),
133  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "gotoStartPage")
134  );
135 
136  // all pages
137  $actions[] = array(
138  "txt" => $lng->txt("wiki_all_pages"),
139  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "allPages")
140  );
141 
142  // new pages
143  $actions[] = array(
144  "txt" => $lng->txt("wiki_new_pages"),
145  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "newPages")
146  );
147 
148  // popular pages
149  $actions[] = array(
150  "txt" => $lng->txt("wiki_popular_pages"),
151  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "popularPages")
152  );
153 
154  // orphaned pages
155  $actions[] = array(
156  "txt" => $lng->txt("wiki_orphaned_pages"),
157  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "orphanedPages")
158  );
159 
160  // recent changes
161  $actions[] = array(
162  "txt" => $lng->txt("wiki_recent_changes"),
163  "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "recentChanges")
164  );
165 
166  foreach ($actions as $a) {
167  $tpl->setCurrentBlock("action");
168  $tpl->setVariable("HREF", $a["href"]);
169  $tpl->setVariable("TXT", $a["txt"]);
170  $tpl->parseCurrentBlock();
171 
172  $tpl->touchBlock("item");
173  }
174 
175  $this->setDataSection($tpl->get());
176  }
177 }
executeCommand()
execute command
global $DIC
Definition: saml.php:7
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
static isRepositoryObject()
Is this a repository object.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
user()
Definition: user.php:4
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.
This class represents a block method of a block.
getPageObject()
Get Page Object.
const IL_SCREEN_SIDE