ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
TopLinkItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
33 {
34  use ContentLanguage;
37 
38  protected ?Symbol $symbol = null;
39  protected string $title = "";
40  protected string $action = "";
41 
46  {
47  parent::__construct($provider_identification);
48  $this->renderer = new TopLinkItemRenderer();
49  }
50 
51  public function withAction(string $action): self
52  {
53  $clone = clone($this);
54  $clone->action = $action;
55 
56  return $clone;
57  }
58 
62  public function getAction(): string
63  {
64  return $this->action;
65  }
66 
70  public function withSymbol(Symbol $symbol): hasSymbol
71  {
72  $clone = clone($this);
73  $clone->symbol = $symbol;
74 
75  return $clone;
76  }
77 
81  public function getSymbol(): Symbol
82  {
83  return $this->symbol;
84  }
85 
89  public function hasSymbol(): bool
90  {
91  return ($this->symbol instanceof Symbol);
92  }
93 
97  public function withTitle(string $title): hasTitle
98  {
99  $clone = clone($this);
100  $clone->title = $title;
101 
102  return $clone;
103  }
104 
108  public function getTitle(): string
109  {
110  return $this->title;
111  }
112 }
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(VocabulariesInterface $vocabularies)
__construct(IdentificationInterface $provider_identification)
Definition: TopLinkItem.php:45