ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
TopLinkItem.php
Go to the documentation of this file.
2
7
14{
15
19 protected $glyph;
23 protected $title = "";
27 protected $action = "";
28
29
34 {
36 $this->renderer = new TopLinkItemRenderer();
37 }
38
39
45 public function withAction(string $action) : TopLinkItem
46 {
47 $clone = clone($this);
48 $clone->action = $action;
49
50 return $clone;
51 }
52
53
57 public function getAction() : string
58 {
59 return $this->action;
60 }
61
62
66 public function withSymbol(Symbol $symbol) : hasSymbol
67 {
68 $clone = clone($this);
69 $clone->glyph = $symbol;
70
71 return $clone;
72 }
73
74
78 public function getSymbol() : Symbol
79 {
80 return $this->glyph;
81 }
82
83
87 public function hasSymbol() : bool
88 {
89 return ($this->glyph instanceof Symbol);
90 }
91
92
96 public function withTitle(string $title) : hasTitle
97 {
98 $clone = clone($this);
99 $clone->title = $title;
100
101 return $clone;
102 }
103
104
108 public function getTitle() : string
109 {
110 return $this->title;
111 }
112}
An exception for terminatinating execution or to throw for unit testing.
__construct(IdentificationInterface $provider_identification)
@inheritDoc
Definition: TopLinkItem.php:33
This describes how a glyph could be modified during construction of UI.
Definition: Glyph.php:14
This describes a symbol.
Definition: Symbol.php:12
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc