ILIAS  release_8 Revision v8.19
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 
36  protected ?Symbol $symbol = null;
37  protected string $title = "";
38  protected ?Legacy $content = null;
39 
44  {
45  parent::__construct($provider_identification);
46  $this->renderer = new TopLegacyItemRenderer();
47  }
48 
52  public function withSymbol(Symbol $symbol): hasSymbol
53  {
54  $clone = clone($this);
55  $clone->symbol = $symbol;
56 
57  return $clone;
58  }
59 
63  public function getSymbol(): Symbol
64  {
65  return $this->symbol;
66  }
67 
71  public function hasSymbol(): bool
72  {
73  return ($this->symbol instanceof Symbol);
74  }
75 
79  public function withTitle(string $title): hasTitle
80  {
81  $clone = clone($this);
82  $clone->title = $title;
83 
84  return $clone;
85  }
86 
90  public function getTitle(): string
91  {
92  return $this->title;
93  }
94 
95  public function withLegacyContent(Legacy $content): self
96  {
97  $clone = clone $this;
98  $clone->content = $content;
99 
100  return $clone;
101  }
102 
106  public function getLegacyContent(): Legacy
107  {
108  return $this->content;
109  }
110 
114  public function hasLegacyContent(): bool
115  {
116  return ($this->content instanceof Legacy);
117  }
118 }
This describes a symbol.
Definition: Symbol.php:29
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(IdentificationInterface $provider_identification)
__construct(Container $dic, ilPlugin $plugin)