ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
MainMenuItemFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
32
39{
47 public function topParentItem(IdentificationInterface $identification): TopParentItem
48 {
49 return new TopParentItem($identification);
50 }
51
58 public function topLinkItem(IdentificationInterface $identification): TopLinkItem
59 {
60 return new TopLinkItem($identification);
61 }
62
68 public function link(IdentificationInterface $identification): Link
69 {
70 return new Link($identification);
71 }
72
79 public function separator(IdentificationInterface $identification): Separator
80 {
81 return new Separator($identification);
82 }
83
90 public function complex(IdentificationInterface $identification): Complex
91 {
92 return new Complex($identification);
93 }
94
100 public function repositoryLink(IdentificationInterface $identification): RepositoryLink
101 {
102 return new RepositoryLink($identification);
103 }
104
110 public function linkList(IdentificationInterface $identification): LinkList
111 {
112 return new LinkList($identification);
113 }
114
120 public function custom(string $class_name, IdentificationInterface $identification): isItem
121 {
122 if (!class_exists($class_name)) {
123 return new Lost($identification);
124 }
125
126 return new $class_name($identification);
127 }
128}
Class MainMenuItemFactory This factory provides you all available types for MainMenu GlobalScreen Ite...
complex(IdentificationInterface $identification)
Returns you a GlobalScreen Complex Item which is used to generate complex content from a Async-URL.
custom(string $class_name, IdentificationInterface $identification)
separator(IdentificationInterface $identification)
Returns you a GlobalScreen Separator which is used to separate to other entries in a optical way.
link(IdentificationInterface $identification)
Returns you s GlobalScreen Link which can be added to Slates.
topParentItem(IdentificationInterface $identification)
Returns you a GlobalScreen TopParentItem which can be added to the MainMenu.
topLinkItem(IdentificationInterface $identification)
Returns you a GlobalScreen TopLinkItem which can be added to the MainMenu.
repositoryLink(IdentificationInterface $identification)
Returns you a GlobalScreen RepositoryLink Item which is used to generate URLs to Ref-IDs.
linkList(IdentificationInterface $identification)
Returns you a GlobalScreen LinkList Item which is used to group multiple Links.