ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
LinkItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
33 {
38  protected $symbol;
42  protected $title = "";
46  protected $action = "";
47 
52  {
53  parent::__construct($provider_identification);
54  $this->renderer = new LinkItemRenderer();
55  }
56 
57  public function withAction(string $action) : self
58  {
59  $clone = clone($this);
60  $clone->action = $action;
61 
62  return $clone;
63  }
64 
68  public function getAction() : string
69  {
70  return $this->action;
71  }
72 
76  public function withSymbol(Symbol $symbol) : hasSymbol
77  {
78  $clone = clone($this);
79  $clone->symbol = $symbol;
80 
81  return $clone;
82  }
83 
87  public function getSymbol() : Symbol
88  {
89  return $this->symbol;
90  }
91 
95  public function hasSymbol() : bool
96  {
97  return ($this->symbol instanceof Symbol);
98  }
99 
103  public function withTitle(string $title) : hasTitle
104  {
105  $clone = clone($this);
106  $clone->title = $title;
107 
108  return $clone;
109  }
110 
114  public function getTitle() : string
115  {
116  return $this->title;
117  }
118 }
This describes a symbol.
Definition: Symbol.php:11
__construct(IdentificationInterface $provider_identification)
Definition: LinkItem.php:51
__construct(Container $dic, ilPlugin $plugin)