ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
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\Wiki;
22 
25 
30 {
33 
34  public function __construct(
35  InternalDomainService $domain_service,
36  InternalGUIService $gui_service
37  ) {
38  $this->gui_service = $gui_service;
39  $this->domain_service = $domain_service;
40  }
41 
42  protected function getObjWikiGUI(): \ilObjWikiGUI
43  {
44  $ref_id = $this->gui_service->request()->getRefId();
45  $this->domain_service->wiki()->checkRefId($ref_id);
46  return new \ilObjWikiGUI(
47  "",
48  $this->gui_service->request()->getRefId(),
49  true,
50  false
51  );
52  }
53 
54  public function translation(int $wiki_ref_id = 0): \ilObjectTranslation
55  {
56  if ($wiki_ref_id === 0) {
57  $wiki_ref_id = $this->gui_service->request()->getRefId();
58  }
59  return $this->domain_service->wiki()->translation(
60  $this->domain_service->wiki()->getObjId(
61  $wiki_ref_id
62  )
63  );
64  }
65 
66 
67 }
__construct(InternalDomainService $domain_service, InternalGUIService $gui_service)
Definition: GUIService.php:34
InternalGUIService $gui_service
Definition: GUIService.php:31
translation(int $wiki_ref_id=0)
Definition: GUIService.php:54
$ref_id
Definition: ltiauth.php:65
InternalDomainService $domain_service
Definition: GUIService.php:32