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