ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilWikiHandlerGUI Class Reference

Handles user interface for wikis. More...

+ Collaboration diagram for ilWikiHandlerGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 execute command More...
 

Protected Attributes

 $ctrl
 
 $lng
 
 $access
 
 $tpl
 
 $nav_history
 

Detailed Description

Handles user interface for wikis.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilWikiHandlerGUI: ilObjWikiGUI

Definition at line 35 of file class.ilWikiHandlerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilWikiHandlerGUI::__construct ( )

Definition at line 62 of file class.ilWikiHandlerGUI.php.

References $DIC, and $ilCtrl.

63  {
64  global $DIC;
65 
66  $this->lng = $DIC->language();
67  $this->access = $DIC->access();
68  $this->tpl = $DIC["tpl"];
69  $this->nav_history = $DIC["ilNavigationHistory"];
70  $ilCtrl = $DIC->ctrl();
71 
72  // initialisation stuff
73  $this->ctrl = $ilCtrl;
74  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ executeCommand()

ilWikiHandlerGUI::executeCommand ( )

execute command

Definition at line 79 of file class.ilWikiHandlerGUI.php.

References $_GET, $access, $lng, $nav_history, $title, $tpl, ilLink\_getStaticLink(), ilObject\_lookupObjId(), ilObjWiki\_lookupStartPage(), ilObject\_lookupTitle(), ilWikiPage\exists(), ilWikiPage\getPageIdForTitle(), ilWikiPage\lookupTitle(), and ilWikiUtil\makeUrlTitle().

80  {
81  $lng = $this->lng;
82  $ilAccess = $this->access;
83  $tpl = $this->tpl;
84  $ilNavigationHistory = $this->nav_history;
85 
86  $cmd = $this->ctrl->getCmd();
87  $next_class = $this->ctrl->getNextClass($this);
88  if ($next_class == "") {
89  $this->ctrl->setCmdClass("ilobjwikigui");
90  $next_class = $this->ctrl->getNextClass($this);
91  }
92 
93  // add entry to navigation history
94  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
95  $obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
96  $title = ilObject::_lookupTitle($obj_id);
97 
98  if ($_GET["page"] != "") {
99  $page = $_GET["page"];
100  } else {
101  include_once("./Modules/Wiki/classes/class.ilObjWiki.php");
102  $page = ilObjWiki::_lookupStartPage($obj_id);
103  }
104 
105  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
106  if (ilWikiPage::exists($obj_id, $page)) {
107  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
108 
109  $add = "_" . rawurlencode($page);
110 
111  $page_id = ilWikiPage::getPageIdForTitle($obj_id, $page);
112  $ptitle = ilWikiPage::lookupTitle($page_id);
113 
114  $title.= ": " . $ptitle;
115 
116  $append = ($_GET["page"] != "")
117  ? "_" . ilWikiUtil::makeUrlTitle($page)
118  : "";
119  include_once('./Services/Link/classes/class.ilLink.php');
120  $goto = ilLink::_getStaticLink(
121  $_GET["ref_id"],
122  "wiki",
123  true,
124  $append
125  );
126  //var_dump($goto);
127  $ilNavigationHistory->addItem(
128  $_GET["ref_id"],
129  "./goto.php?target=wiki_" . $_GET["ref_id"] . $add,
130  "wiki",
131  $title,
132  $page_id,
133  $goto
134  );
135  }
136  }
137 
138  switch ($next_class) {
139  case 'ilobjwikigui':
140  require_once "./Modules/Wiki/classes/class.ilObjWikiGUI.php";
141  $mc_gui = new ilObjWikiGUI("", (int) $_GET["ref_id"], true, false);
142  $this->ctrl->forwardCommand($mc_gui);
143  break;
144  }
145 
146  $tpl->show();
147  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
$_GET["client_id"]
static _lookupStartPage($a_wiki_id)
Lookup start page.
static _lookupTitle($a_id)
lookup object title
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static _lookupObjId($a_id)
static exists($a_wiki_id, $a_title)
Checks whether a page with given title exists.
Class ilObjWikiGUI.
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilWikiHandlerGUI::$access
protected

Definition at line 50 of file class.ilWikiHandlerGUI.php.

Referenced by executeCommand().

◆ $ctrl

ilWikiHandlerGUI::$ctrl
protected

Definition at line 40 of file class.ilWikiHandlerGUI.php.

◆ $lng

ilWikiHandlerGUI::$lng
protected

Definition at line 45 of file class.ilWikiHandlerGUI.php.

Referenced by executeCommand().

◆ $nav_history

ilWikiHandlerGUI::$nav_history
protected

Definition at line 60 of file class.ilWikiHandlerGUI.php.

Referenced by executeCommand().

◆ $tpl

ilWikiHandlerGUI::$tpl
protected

Definition at line 55 of file class.ilWikiHandlerGUI.php.

Referenced by executeCommand().


The documentation for this class was generated from the following file: