ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
TopLinkItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28
32class TopLinkItem extends AbstractBaseItem implements
33 isItem,
39{
43
44 protected ?Symbol $symbol = null;
45 protected string $title = "";
46 protected string $action = "";
47
51 public function __construct(IdentificationInterface $provider_identification)
52 {
53 parent::__construct($provider_identification);
54 $this->renderer = new TopLinkItemRenderer();
55 }
56
57 public function withAction(string $action): self
58 {
59 $clone = clone($this);
60 $clone->action = $action;
61
62 return $clone;
63 }
64
65 public function getAction(): string
66 {
67 return $this->action;
68 }
69
74 {
75 $clone = clone($this);
76 $clone->symbol = $symbol;
77
78 return $clone;
79 }
80
84 public function getSymbol(): Symbol
85 {
86 return $this->symbol;
87 }
88
92 public function hasSymbol(): bool
93 {
94 return ($this->symbol instanceof Symbol);
95 }
96
100 public function withTitle(string $title): hasTitle
101 {
102 $clone = clone($this);
103 $clone->title = $title;
104
105 return $clone;
106 }
107
111 public function getTitle(): string
112 {
113 return $this->title;
114 }
115}
renderer()
__construct(IdentificationInterface $provider_identification)
@inheritDoc
Definition: TopLinkItem.php:51
This describes a symbol.
Definition: Symbol.php:30
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc