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