ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
TopLegacyItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29
33class TopLegacyItem extends AbstractBaseItem implements
34 isItem,
39{
42
43 protected ?Symbol $symbol = null;
44 protected string $title = "";
45 protected ?Content $content = null;
46
50 public function __construct(IdentificationInterface $provider_identification)
51 {
52 parent::__construct($provider_identification);
53 $this->renderer = new TopLegacyItemRenderer();
54 }
55
60 {
61 $clone = clone($this);
62 $clone->symbol = $symbol;
63
64 return $clone;
65 }
66
70 public function getSymbol(): Symbol
71 {
72 return $this->symbol;
73 }
74
78 public function hasSymbol(): bool
79 {
80 return ($this->symbol instanceof Symbol);
81 }
82
86 public function withTitle(string $title): hasTitle
87 {
88 $clone = clone($this);
89 $clone->title = $title;
90
91 return $clone;
92 }
93
97 public function getTitle(): string
98 {
99 return $this->title;
100 }
101
102 public function withLegacyContent(Content $content): self
103 {
104 $clone = clone $this;
105 $clone->content = $content;
106
107 return $clone;
108 }
109
113 public function getLegacyContent(): Content
114 {
115 return $this->content;
116 }
117
118 public function hasLegacyContent(): bool
119 {
120 return ($this->content instanceof Legacy);
121 }
122}
renderer()
__construct(IdentificationInterface $provider_identification)
@inheritDoc
This describes a symbol.
Definition: Symbol.php:30
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc