ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
CollectorFactory.php
Go to the documentation of this file.
2
11
18{
23 protected static $instances = [];
28
29
36 {
37 $this->provider_factory = $provider_factory;
38 }
39
40
45 public function mainmenu() : MainMenuMainCollector
46 {
47 if (!$this->has(MainMenuMainCollector::class)) {
48 $providers = $this->provider_factory->getMainBarProvider();
49 $information = $this->provider_factory->getMainBarItemInformation();
50
51 return $this->getWithMultipleArguments(
52 MainMenuMainCollector::class,
53 [
54 $providers,
56 $information
57 ]
58 );
59 }
60
61 return $this->get(MainMenuMainCollector::class);
62 }
63
64
68 public function metaBar() : MetaBarMainCollector
69 {
70 return $this->getWithArgument(MetaBarMainCollector::class, $this->provider_factory->getMetaBarProvider());
71 }
72
73
78 public function tool() : MainToolCollector
79 {
80 if (!$this->has(MainToolCollector::class)) {
81 $providers = $this->provider_factory->getToolProvider();
82 $information = $this->provider_factory->getMainBarItemInformation();
83
84 return $this->getWithMultipleArguments(MainToolCollector::class, [$providers, $information]);
85 }
86
87 return $this->get(MainToolCollector::class);
88 }
89
90
95 public function layout() : MainLayoutCollector
96 {
97 return $this->getWithMultipleArguments(MainLayoutCollector::class, [$this->provider_factory->getModificationProvider()]);
98 }
99
100
105 {
106 return $this->getWithArgument(MainNotificationCollector::class, $this->provider_factory->getNotificationsProvider());
107 }
108}
An exception for terminatinating execution or to throw for unit testing.
__construct(ProviderFactory $provider_factory)
CollectorFactory constructor.
Class MainMenuMainCollector This Collector will collect and then provide all available slates from th...
trait SingletonTrait
Class SingletonTrait.
has(string $class_name)
getWithArgument(string $class_name, $argument)
getWithMultipleArguments(string $class_name, array $arguments)