ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GUIService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Wiki\Wiki;
22
26
31{
34
35 public function __construct(
38 ) {
39 $this->gui_service = $gui_service;
40 $this->domain_service = $domain_service;
41 }
42
43 protected function getObjWikiGUI(): \ilObjWikiGUI
44 {
45 $ref_id = $this->gui_service->request()->getRefId();
46 $this->domain_service->wiki()->checkRefId($ref_id);
47 return new \ilObjWikiGUI(
48 "",
49 $this->gui_service->request()->getRefId(),
50 true,
51 false
52 );
53 }
54
55 public function translation(int $wiki_ref_id = 0): Translations
56 {
57 if ($wiki_ref_id === 0) {
58 $wiki_ref_id = $this->gui_service->request()->getRefId();
59 }
60 return $this->domain_service->wiki()->translation($wiki_ref_id);
61 }
62
63
64}
Class handles translation mode for an object.
InternalDomainService $domain_service
Definition: GUIService.php:33
translation(int $wiki_ref_id=0)
Definition: GUIService.php:55
InternalGUIService $gui_service
Definition: GUIService.php:32
__construct(InternalDomainService $domain_service, InternalGUIService $gui_service)
Definition: GUIService.php:35
$ref_id
Definition: ltiauth.php:66