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