ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
GUIService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Wiki\Wiki;
22 
26 
31 {
34 
35  public function __construct(
36  InternalDomainService $domain_service,
37  InternalGUIService $gui_service
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 }
__construct(InternalDomainService $domain_service, InternalGUIService $gui_service)
Definition: GUIService.php:35
InternalGUIService $gui_service
Definition: GUIService.php:32
Class handles translation mode for an object.
translation(int $wiki_ref_id=0)
Definition: GUIService.php:55
$ref_id
Definition: ltiauth.php:65
InternalDomainService $domain_service
Definition: GUIService.php:33
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...