ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
GUIService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Wiki\Content;
22 
26 
31 {
35 
36  public function __construct(
37  InternalDomainService $domain_service,
38  InternalGUIService $gui_service
39  ) {
40  $this->gui_service = $gui_service;
41  $this->domain_service = $domain_service;
42  $this->request = $this->gui_service->request();
43  }
44 
45  protected function navigation(): NavigationManager
46  {
47  return $this->domain_service->content()->navigation(
48  $this->domain_service->wiki()->object($this->request->getRefId()),
49  $this->request->getWikiPageId(),
50  $this->request->getPage(),
51  $this->request->getTranslation()
52  );
53  }
54 
55  public function getCurrentPageGUI(): \ilWikiPageGUI
56  {
57  $nav = $this->navigation();
58  return $this->gui_service->page()->getWikiPageGUI(
59  $this->request->getRefId(),
60  $nav->getCurrentPageId(),
61  0,
62  $nav->getCurrentPageLanguage()
63  );
64  }
65 }
__construct(InternalDomainService $domain_service, InternalGUIService $gui_service)
Definition: GUIService.php:36
InternalDomainService $domain_service
Definition: GUIService.php:34
Class ilWikiPage GUI class.
InternalGUIService $gui_service
Definition: GUIService.php:33