forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUIServices.php
57 lines (50 loc) · 1.4 KB
/
UIServices.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/* Copyright (c) 2016 Richard Klees <[email protected]> Extended GPL, see docs/LICENSE */
namespace ILIAS\DI;
/******************************************************************************
*
* This file is part of ILIAS, a powerful learning management system.
*
* ILIAS is licensed with the GPL-3.0, you should have received a copy
* of said license along with the source code.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*****************************************************************************/
/**
* Provides fluid interface to RBAC services.
*/
class UIServices
{
protected Container $container;
public function __construct(Container $container)
{
$this->container = $container;
}
/**
* Get the factory that crafts UI components.
*/
public function factory(): \ILIAS\UI\Factory
{
return $this->container["ui.factory"];
}
/**
* Get a renderer for UI components.
*/
public function renderer(): \ILIAS\UI\Renderer
{
return $this->container["ui.renderer"];
}
/**
* Get the ILIAS main template.
*
* @return \ilGlobalTemplateInterface
*/
public function mainTemplate(): \ilGlobalTemplateInterface
{
return $this->container["tpl"];
}
}