ILIAS  release_7 Revision v7.30-3-g800a261c036
MainMenuItemFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
31
38{
46 public function topParentItem(IdentificationInterface $identification) : TopParentItem
47 {
48 return new TopParentItem($identification);
49 }
50
57 public function topLinkItem(IdentificationInterface $identification) : TopLinkItem
58 {
59 return new TopLinkItem($identification);
60 }
61
67 public function link(IdentificationInterface $identification) : Link
68 {
69 return new Link($identification);
70 }
71
78 public function separator(IdentificationInterface $identification) : Separator
79 {
80 return new Separator($identification);
81 }
82
89 public function complex(IdentificationInterface $identification) : Complex
90 {
91 return new Complex($identification);
92 }
93
99 public function repositoryLink(IdentificationInterface $identification) : RepositoryLink
100 {
101 return new RepositoryLink($identification);
102 }
103
109 public function linkList(IdentificationInterface $identification) : LinkList
110 {
111 return new LinkList($identification);
112 }
113
119 public function custom(string $class_name, IdentificationInterface $identification) : isItem
120 {
121 if (!class_exists($class_name)) {
122 return new Lost($identification);
123 }
124
125 return new $class_name($identification);
126 }
127}
An exception for terminatinating execution or to throw for unit testing.
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.