ILIAS  release_8 Revision v8.24
TopLinkItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27
33{
35
36 protected ?Symbol $symbol = null;
37 protected string $title = "";
38 protected string $action = "";
39
44 {
46 $this->renderer = new TopLinkItemRenderer();
47 }
48
49 public function withAction(string $action): self
50 {
51 $clone = clone($this);
52 $clone->action = $action;
53
54 return $clone;
55 }
56
60 public function getAction(): string
61 {
62 return $this->action;
63 }
64
69 {
70 $clone = clone($this);
71 $clone->symbol = $symbol;
72
73 return $clone;
74 }
75
79 public function getSymbol(): Symbol
80 {
81 return $this->symbol;
82 }
83
87 public function hasSymbol(): bool
88 {
89 return ($this->symbol instanceof Symbol);
90 }
91
95 public function withTitle(string $title): hasTitle
96 {
97 $clone = clone($this);
98 $clone->title = $title;
99
100 return $clone;
101 }
102
106 public function getTitle(): string
107 {
108 return $this->title;
109 }
110}
__construct(IdentificationInterface $provider_identification)
@inheritDoc
Definition: TopLinkItem.php:43
This describes a symbol.
Definition: Symbol.php:30
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...