ILIAS  release_7 Revision v7.30-3-g800a261c036
MetaBarItemFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
23
30{
35 public function topParentItem(IdentificationInterface $identification) : TopParentItem
36 {
37 return new TopParentItem($identification);
38 }
39
44 public function topLegacyItem(IdentificationInterface $identification) : TopLegacyItem
45 {
46 return new TopLegacyItem($identification);
47 }
48
53 public function linkItem(IdentificationInterface $identification) : LinkItem
54 {
55 return new LinkItem($identification);
56 }
57
62 public function topLinkItem(IdentificationInterface $identification) : TopLinkItem
63 {
64 return new TopLinkItem($identification);
65 }
66
72 {
73 static $created;
74 if ($created === true) {
75 // I currently disabled this since we have unresolved problems in https://mantis.ilias.de/view.php?id=26374
76 // throw new \LogicException("only one NotificationCenter can exist");
77 }
78 $created = true;
79
80 return new NotificationCenter($identification);
81 }
82}
An exception for terminatinating execution or to throw for unit testing.
Class MetaBarItemFactory This factory provides you all available types for MainMenu GlobalScreen Item...
topLegacyItem(IdentificationInterface $identification)
topLinkItem(IdentificationInterface $identification)
notificationCenter(IdentificationInterface $identification)
topParentItem(IdentificationInterface $identification)