ILIAS  release_8 Revision v8.24
CollectorFactory.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
23
33use Throwable;
34
40{
42
43 protected static array $instances = [];
45
51 {
52 $this->provider_factory = $provider_factory;
53 }
54
60 {
61 if (!$this->has(MainMenuMainCollector::class)) {
62 $providers = $this->provider_factory->getMainBarProvider();
63 $information = $this->provider_factory->getMainBarItemInformation();
64
65 return $this->getWithMultipleArguments(
66 MainMenuMainCollector::class,
67 [
68 $providers,
70 $information
71 ]
72 );
73 }
74
75 return $this->get(MainMenuMainCollector::class);
76 }
77
78 public function metaBar(): MetaBarMainCollector
79 {
80 return $this->getWithArgument(MetaBarMainCollector::class, $this->provider_factory->getMetaBarProvider());
81 }
82
83 public function tool(): MainToolCollector
84 {
85 if (!$this->has(MainToolCollector::class)) {
86 $providers = $this->provider_factory->getToolProvider();
87 $information = $this->provider_factory->getMainBarItemInformation();
88
89 return $this->getWithMultipleArguments(MainToolCollector::class, [$providers, $information]);
90 }
91
92 return $this->get(MainToolCollector::class);
93 }
94
95 public function layout(): MainLayoutCollector
96 {
97 return $this->getWithMultipleArguments(MainLayoutCollector::class, [$this->provider_factory->getModificationProvider()]);
98 }
99
101 {
102 return $this->getWithArgument(MainNotificationCollector::class, $this->provider_factory->getNotificationsProvider());
103 }
104
105 public function toasts(): ToastCollector
106 {
107 return $this->getWithArgument(ToastCollector::class, $this->provider_factory->getToastsProvider());
108 }
109}
__construct(ProviderFactory $provider_factory)
CollectorFactory constructor.
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
Class MainMenuItemFactory This factory provides you all available types for MainMenu GlobalScreen Ite...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait SingletonTrait
Class SingletonTrait.
has(string $class_name)
getWithArgument(string $class_name, $argument)
getWithMultipleArguments(string $class_name, array $arguments)