ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
TopLegacyItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
33 {
35 
39  protected $symbol;
43  protected $title = "";
47  protected $content;
48 
53  {
54  parent::__construct($provider_identification);
55  $this->renderer = new TopLegacyItemRenderer();
56  }
57 
61  public function withSymbol(Symbol $symbol) : hasSymbol
62  {
63  $clone = clone($this);
64  $clone->symbol = $symbol;
65 
66  return $clone;
67  }
68 
72  public function getSymbol() : Symbol
73  {
74  return $this->symbol;
75  }
76 
80  public function hasSymbol() : bool
81  {
82  return ($this->symbol instanceof Symbol);
83  }
84 
88  public function withTitle(string $title) : hasTitle
89  {
90  $clone = clone($this);
91  $clone->title = $title;
92 
93  return $clone;
94  }
95 
99  public function getTitle() : string
100  {
101  return $this->title;
102  }
103 
104  public function withLegacyContent(Legacy $content) : self
105  {
106  $clone = clone $this;
107  $clone->content = $content;
108 
109  return $clone;
110  }
111 
115  public function getLegacyContent() : Legacy
116  {
117  return $this->content;
118  }
119 
123  public function hasLegacyContent() : bool
124  {
125  return ($this->content instanceof Legacy);
126  }
127 }
This describes a symbol.
Definition: Symbol.php:11
__construct(IdentificationInterface $provider_identification)
__construct(Container $dic, ilPlugin $plugin)