ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
TopLegacyItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27
32{
34
35 protected ?Symbol $symbol = null;
36 protected string $title = "";
37 protected ?Content $content = null;
38
42 public function __construct(IdentificationInterface $provider_identification)
43 {
44 parent::__construct($provider_identification);
45 $this->renderer = new TopLegacyItemRenderer();
46 }
47
52 {
53 $clone = clone($this);
54 $clone->symbol = $symbol;
55
56 return $clone;
57 }
58
62 public function getSymbol(): Symbol
63 {
64 return $this->symbol;
65 }
66
70 public function hasSymbol(): bool
71 {
72 return ($this->symbol instanceof Symbol);
73 }
74
78 public function withTitle(string $title): hasTitle
79 {
80 $clone = clone($this);
81 $clone->title = $title;
82
83 return $clone;
84 }
85
89 public function getTitle(): string
90 {
91 return $this->title;
92 }
93
94 public function withLegacyContent(Content $content): self
95 {
96 $clone = clone $this;
97 $clone->content = $content;
98
99 return $clone;
100 }
101
105 public function getLegacyContent(): Content
106 {
107 return $this->content;
108 }
109
113 public function hasLegacyContent(): bool
114 {
115 return ($this->content instanceof Legacy);
116 }
117}
renderer()
__construct(IdentificationInterface $provider_identification)
@inheritDoc
This describes a symbol.
Definition: Symbol.php:30
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc