ILIAS  release_7 Revision v7.30-3-g800a261c036
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$

@ilCtrl_Calls 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.

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
73 // initialisation stuff
74 $this->ctrl = $ilCtrl;
75
76 $DIC->globalScreen()->tool()->context()->claim()->repository();
77 }
global $DIC
Definition: goto.php:24

References $DIC.

Member Function Documentation

◆ executeCommand()

ilWikiHandlerGUI::executeCommand ( )

execute command

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

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

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

+ 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: