ILIAS  release_8 Revision v8.24
Services.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
22namespace ILIAS\GlobalScreen;
23
34
40{
42
43 private static ?Services $instance = null;
44
47
48 public string $resource_version = '';
49
55 public function __construct(
57 ?UIServices $ui = null,
58 string $resource_version = ''
59 ) {
60 global $DIC;
61 $this->provider_factory = $provider_factory;
62 $this->resource_version = urlencode($resource_version);
63 $this->toast_services = new ToastServices($ui ?? $DIC->ui());
64 }
65
70 public function mainBar(): MainMenuItemFactory
71 {
72 return $this->get(MainMenuItemFactory::class);
73 }
74
78 public function metaBar(): MetaBarItemFactory
79 {
80 return $this->get(MetaBarItemFactory::class);
81 }
82
87 public function tool(): ToolServices
88 {
89 return $this->get(ToolServices::class);
90 }
91
95 public function layout(): LayoutServices
96 {
97 return $this->getWithArgument(LayoutServices::class, $this->resource_version);
98 }
99
104 {
105 return $this->get(NotificationServices::class);
106 }
107
108 public function toasts(): ToastServices
109 {
111 }
112
116 public function collector(): CollectorFactory
117 {
118 return $this->getWithArgument(CollectorFactory::class, $this->provider_factory);
119 }
120
126 {
127 return $this->getWithArgument(IdentificationFactory::class, $this->provider_factory);
128 }
129}
Provides fluid interface to RBAC services.
Definition: UIServices.php:24
Class IdentificationFactory All elements in the GlobalScreen service must be identifiable for the sup...
Class MainMenuItemFactory This factory provides you all available types for MainMenu GlobalScreen Ite...
Class MetaBarItemFactory This factory provides you all available types for MainMenu GlobalScreen Item...
ToastServices $toast_services
Definition: Services.php:46
__construct(ProviderFactory $provider_factory, ?UIServices $ui=null, string $resource_version='')
Services constructor.
Definition: Services.php:55
static Services $instance
Definition: Services.php:43
ProviderFactory $provider_factory
Definition: Services.php:45
global $DIC
Definition: feed.php:28
@noinspection PhpIncompatibleReturnTypeInspection
trait SingletonTrait
Class SingletonTrait.
getWithArgument(string $class_name, $argument)