ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
CollectorFactory.php
Go to the documentation of this file.
2 
10 
17 {
18 
22  protected static $instances = [];
27 
28 
35  {
36  $this->provider_factory = $provider_factory;
37  }
38 
39 
44  public function mainmenu() : MainMenuMainCollector
45  {
46  if (!isset(self::$instances[StaticMainMenuProvider::class])) {
47  $providers = $this->provider_factory->getMainBarProvider();
48  $information = $this->provider_factory->getMainBarItemInformation();
49  self::$instances[StaticMainMenuProvider::class] = new MainMenuMainCollector($providers, $information);
50  }
51 
52  return self::$instances[StaticMainMenuProvider::class];
53  }
54 }
__construct(ProviderFactoryInterface $provider_factory)
CollectorFactory constructor.