ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilWikiHandlerGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilWikiHandlerGUI:
+ Collaboration diagram for ilWikiHandlerGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 

Protected Attributes

string $requested_lang
 
ILIAS Wiki InternalDomainService $domain
 
string $requested_page
 
int $requested_ref_id
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilAccessHandler $access
 
ilGlobalTemplateInterface $tpl
 
ilNavigationHistory $nav_history
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Handles user interface for wikis

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de ilWikiHandlerGUI: ilObjWikiGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilWikiHandlerGUI::__construct ( )

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

References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

37  {
38  global $DIC;
39 
40  $this->lng = $DIC->language();
41  $this->access = $DIC->access();
42  $this->tpl = $DIC["tpl"];
43  $this->nav_history = $DIC["ilNavigationHistory"];
44  $ilCtrl = $DIC->ctrl();
45 
46 
47  // initialisation stuff
48  $this->ctrl = $ilCtrl;
49  $this->domain = $DIC->wiki()->internal()->domain();
50  $request = $DIC
51  ->wiki()
52  ->internal()
53  ->gui()
54  ->request();
55  $this->requested_ref_id = $request->getRefId();
56  $this->requested_page = $request->getPage();
57  $this->requested_lang = $request->getTranslation();
58 
59  $DIC->globalScreen()->tool()->context()->claim()->repository();
60  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilWikiHandlerGUI::executeCommand ( )

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

References $access, $lang, $nav_history, $tpl, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), ILIAS\Repository\int(), and ILIAS\UICore\GlobalTemplate\printToStdout().

62  : void
63  {
64  $ilAccess = $this->access;
65  $tpl = $this->tpl;
66  $ilNavigationHistory = $this->nav_history;
67  $lang = ($this->requested_lang === "")
68  ? "-"
69  : $this->requested_lang;
70 
71  $next_class = $this->ctrl->getNextClass($this);
72  if ($next_class == "") {
73  $this->ctrl->saveParameterByClass(ilObjWikiGUI::class, "ref_id");
74  $this->ctrl->redirectByClass(ilObjWikiGUI::class, $this->ctrl->getCmd());
75  }
76 
77  // add entry to navigation history
78  if ($ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
79  $pm = $this->domain->page()->page($this->requested_ref_id);
80  $obj_id = ilObject::_lookupObjId($this->requested_ref_id);
81  $title = ilObject::_lookupTitle($obj_id);
82  $link = $pm->getPermaLinkByTitle(
83  $this->requested_page,
84  $lang
85  );
86 
87  $page_id = (int) $pm->getPageIdForTitle($this->requested_page, $lang);
88  if ($page_id > 0) {
89  $ptitle = $pm->getTitle($page_id, $lang);
90  $title .= ": " . $ptitle;
91 
92  $ilNavigationHistory->addItem(
93  $this->requested_ref_id,
94  $link,
95  "wiki",
96  $title,
97  $page_id,
98  $link
99  );
100  }
101  }
102 
103  switch ($next_class) {
104  case 'ilobjwikigui':
105  $mc_gui = new ilObjWikiGUI(
106  "",
107  $this->requested_ref_id,
108  true,
109  false
110  );
111  $this->ctrl->forwardCommand($mc_gui);
112  break;
113  }
114 
115  $tpl->printToStdout();
116  }
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
$lang
Definition: xapiexit.php:25
ilNavigationHistory $nav_history
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilWikiHandlerGUI::$access
protected

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

Referenced by executeCommand().

◆ $ctrl

ilCtrl ilWikiHandlerGUI::$ctrl
protected

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

◆ $domain

ILIAS Wiki InternalDomainService ilWikiHandlerGUI::$domain
protected

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

◆ $lng

ilLanguage ilWikiHandlerGUI::$lng
protected

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

◆ $nav_history

ilNavigationHistory ilWikiHandlerGUI::$nav_history
protected

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

Referenced by executeCommand().

◆ $requested_lang

string ilWikiHandlerGUI::$requested_lang
protected

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

◆ $requested_page

string ilWikiHandlerGUI::$requested_page
protected

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

◆ $requested_ref_id

int ilWikiHandlerGUI::$requested_ref_id
protected

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

◆ $tpl

ilGlobalTemplateInterface ilWikiHandlerGUI::$tpl
protected

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

Referenced by executeCommand().


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