19declare(strict_types=1);
62 $this->class_loader = include
"Services/GlobalScreen/artifacts/global_screen_providers.php";
63 $this->component_repository =
$dic[
"component.repository"];
64 $this->component_factory =
$dic[
"component.factory"];
69 if (!is_array($this->plugin_provider_collections)) {
70 $this->plugin_provider_collections = [];
71 foreach ($this->component_repository->getPlugins() as
$plugin) {
75 $pl = $this->component_factory->getPlugin(
$plugin->getId());
76 $this->plugin_provider_collections[] = $pl->getGlobalScreenProviderCollection();
89 $this->all_providers[get_class($item)] = $item;
101 $this->
appendCore($providers, StaticMainMenuProvider::class);
105 foreach ($this->plugin_provider_collections as $collection) {
106 $provider = $collection->getMainBarProvider();
124 $this->
appendCore($providers, StaticMetaBarProvider::class);
128 foreach ($this->plugin_provider_collections as $collection) {
129 $provider = $collection->getMetaBarProvider();
147 $this->
appendCore($providers, DynamicToolProvider::class);
151 foreach ($this->plugin_provider_collections as $collection) {
152 $provider = $collection->getToolProvider();
170 $this->
appendCore($providers, ModificationProvider::class);
174 foreach ($this->plugin_provider_collections as $collection) {
175 $provider = $collection->getModificationProvider();
191 $this->
appendCore($providers, NotificationProvider::class);
195 foreach ($this->plugin_provider_collections as $collection) {
196 $provider = $collection->getNotificationProvider();
214 $this->
appendCore($providers, ToastProvider::class);
218 foreach ($this->plugin_provider_collections as $collection) {
219 $provider = $collection->getToastProvider();
234 private function appendCore(array &$array_of_providers,
string $interface): void
236 foreach ($this->class_loader[$interface] ?? [] as $class_name) {
239 $array_of_providers[] =
new $class_name($this->dic);
240 }
catch (Throwable
$e) {
260 throw new LogicException(
"the GlobalScreen-Provider $class_name is not available");
263 return $this->all_providers[$class_name];
272 return class_exists($class_name);
273 }
catch (Throwable
$e) {
283 return isset($this->all_providers[$class_name]);
Customizing of pimple-DIC for ILIAS.
Class ilGSProviderFactory.
registerInternal(array $providers)
getToastsProvider()
@inheritDoc
isRegistered(string $class_name)
@inheritDoc
array $plugin_provider_collections
getProviderByClassName(string $class_name)
@inheritDoc
getMainBarItemInformation()
@inheritDoc
getModificationProvider()
@inheritDoc
getMetaBarProvider()
@inheritDoc
isInstanceCreationPossible(string $class_name)
@inheritDoc
getMainBarProvider()
@inheritDoc
getToolProvider()
@inheritDoc
ilComponentFactory $component_factory
ItemInformation $main_menu_item_information
__construct(Container $dic)
@inheritDoc
getNotificationsProvider()
@inheritDoc
appendCore(array &$array_of_providers, string $interface)
ilComponentRepository $component_repository
Class PluginProviderCollection.
Interface ProviderFactory.
Interface ModificationProvider.
Interface StaticMainMenuProvider.
Interface NotificationProvider.
Readable part of repository interface to ilComponentDataDB.