ILIAS  release_8 Revision v8.24
LinkItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27
33{
35 protected ?Symbol $symbol = null;
36 protected string $title = "";
37 protected string $action = "";
38
43 {
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
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}
__construct(IdentificationInterface $provider_identification)
@inheritDoc
Definition: LinkItem.php:42
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...