ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LinkItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
31 {
32  use ContentLanguage;
34 
35  protected ?Symbol $symbol = null;
36  protected string $title = "";
37  protected string $action = "";
38 
42  public function __construct(IdentificationInterface $provider_identification)
43  {
44  parent::__construct($provider_identification);
45  $this->renderer = new LinkItemRenderer();
46  }
47 
48  public function withAction(string $action): self
49  {
50  $clone = clone($this);
51  $clone->action = $action;
52 
53  return $clone;
54  }
55 
59  public function getAction(): string
60  {
61  return $this->action;
62  }
63 
67  public function withSymbol(Symbol $symbol): hasSymbol
68  {
69  $clone = clone($this);
70  $clone->symbol = $symbol;
71 
72  return $clone;
73  }
74 
78  public function getSymbol(): Symbol
79  {
80  return $this->symbol;
81  }
82 
86  public function hasSymbol(): bool
87  {
88  return ($this->symbol instanceof Symbol);
89  }
90 
94  public function withTitle(string $title): hasTitle
95  {
96  $clone = clone($this);
97  $clone->title = $title;
98 
99  return $clone;
100  }
101 
105  public function getTitle(): string
106  {
107  return $this->title;
108  }
109 }
This describes a symbol.
Definition: Symbol.php:29
renderer()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(IdentificationInterface $provider_identification)
Definition: LinkItem.php:42
__construct(Container $dic, ilPlugin $plugin)