ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.InternalGUIService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Blog;
22 
27 
29 {
31 
34  protected static array $instance = [];
35 
36  public function __construct(
38  InternalDataService $data_service,
39  InternalDomainService $domain_service
40  ) {
41  $this->data_service = $data_service;
42  $this->domain_service = $domain_service;
43  $this->initGUIServices($DIC);
44  }
45 
46  public function navigation(): Navigation\GUIService
47  {
48  return new Navigation\GUIService(
49  $this->domain_service,
50  $this
51  );
52  }
53 
54  public function presentation(): Presentation\GUIService
55  {
56  return new Presentation\GUIService(
57  $this->domain_service,
58  $this
59  );
60  }
61 
63  {
64  return new StandardGUIRequest(
65  $this->http(),
66  $this->domain_service->refinery()
67  );
68  }
69 
70  public function contributor(): Contributor\GUIService
71  {
72  return new Contributor\GUIService(
73  $this->data_service,
74  $this->domain_service,
75  $this
76  );
77  }
78 
79  public function exercise(): Exercise\GUIService
80  {
81  return new Exercise\GUIService(
82  $this->data_service,
83  $this->domain_service,
84  $this
85  );
86  }
87 
88  public function permanentLink(
89  int $ref_id = 0,
90  int $wsp_id = 0
91  ): PermanentLinkManager {
92  return new PermanentLinkManager(
93  $this->domain_service->staticUrl(),
94  $this,
95  $ref_id,
96  $wsp_id
97  );
98  }
99 
100  public function settings(): Settings\GUIService
101  {
102  return self::$instance["settings"] ??
103  self::$instance["settings"] = new Settings\GUIService(
104  $this->data_service,
105  $this->domain_service,
106  $this
107  );
108  }
109 
110  public function readingTime(): GUIService
111  {
112  return self::$instance["reading_time"] ??
113  self::$instance["reading_time"] = new ReadingTime\GUIService(
114  $this->data_service,
115  $this->domain_service,
116  $this
117  );
118  }
119 }
initGUIServices(\ILIAS\DI\Container $DIC)
permanentLink(int $ref_id=0, int $wsp_id=0)
$ref_id
Definition: ltiauth.php:65
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
__construct(Container $DIC, InternalDataService $data_service, InternalDomainService $domain_service)