ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
TopLegacyItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
33 {
34  use ContentLanguage;
36 
37  protected ?Symbol $symbol = null;
38  protected string $title = "";
39  protected ?Legacy $content = null;
40 
45  {
46  parent::__construct($provider_identification);
47  $this->renderer = new TopLegacyItemRenderer();
48  }
49 
53  public function withSymbol(Symbol $symbol): hasSymbol
54  {
55  $clone = clone($this);
56  $clone->symbol = $symbol;
57 
58  return $clone;
59  }
60 
64  public function getSymbol(): Symbol
65  {
66  return $this->symbol;
67  }
68 
72  public function hasSymbol(): bool
73  {
74  return ($this->symbol instanceof Symbol);
75  }
76 
80  public function withTitle(string $title): hasTitle
81  {
82  $clone = clone($this);
83  $clone->title = $title;
84 
85  return $clone;
86  }
87 
91  public function getTitle(): string
92  {
93  return $this->title;
94  }
95 
96  public function withLegacyContent(Legacy $content): self
97  {
98  $clone = clone $this;
99  $clone->content = $content;
100 
101  return $clone;
102  }
103 
107  public function getLegacyContent(): Legacy
108  {
109  return $this->content;
110  }
111 
115  public function hasLegacyContent(): bool
116  {
117  return ($this->content instanceof Legacy);
118  }
119 }
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(VocabulariesInterface $vocabularies)