ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
TopLegacyItem.php
Go to the documentation of this file.
2
8
15{
16
20 protected $glyph;
24 protected $title = "";
28 protected $content = null;
29
30
35 {
37 $this->renderer = new TopLegacyItemRenderer();
38 }
39
40
44 public function withSymbol(Symbol $symbol) : hasSymbol
45 {
46 $clone = clone($this);
47 $clone->glyph = $symbol;
48
49 return $clone;
50 }
51
52
56 public function getSymbol() : Symbol
57 {
58 return $this->glyph;
59 }
60
61
65 public function hasSymbol() : bool
66 {
67 return ($this->glyph instanceof Symbol);
68 }
69
70
74 public function withTitle(string $title) : hasTitle
75 {
76 $clone = clone($this);
77 $clone->title = $title;
78
79 return $clone;
80 }
81
82
86 public function getTitle() : string
87 {
88 return $this->title;
89 }
90
91
98 {
99 $clone = clone $this;
100 $clone->content = $content;
101
102 return $clone;
103 }
104
105
109 public function getLegacyContent() : Legacy
110 {
111 return $this->content;
112 }
113
114
118 public function hasLegacyContent() : bool
119 {
120 return ($this->content instanceof Legacy);
121 }
122}
An exception for terminatinating execution or to throw for unit testing.
__construct(IdentificationInterface $provider_identification)
@inheritDoc
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