ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
RepositoryLink.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item
;
22
23
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
;
24
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasAction
;
25
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
;
26
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbolTrait
;
27
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle
;
28
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild
;
29
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isInterchangeableItem
;
30
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isInterchangeableItemTrait
;
31
use
ILIAS\UI\Component\Symbol\Symbol
;
32
use
ilLink
;
33
use
LogicException
;
34
use
ILIAS\GlobalScreen\Scope\isDecorateable
;
35
use
ILIAS\GlobalScreen\Scope\TriggererDecoratorTrait
;
36
40
class
RepositoryLink
extends
AbstractChildItem
implements
41
hasTitle
,
42
hasAction
,
43
hasSymbol
,
44
isInterchangeableItem
,
45
isChild
46
{
47
use
hasSymbolTrait
;
48
use
isInterchangeableItemTrait
;
49
50
protected
int
$ref_id
= 0;
51
protected
string
$alt_text
;
52
protected
string
$title
=
''
;
53
58
public
function
withTitle
(
string
$title):
hasTitle
59
{
60
$clone = clone($this);
61
$clone->title =
$title
;
62
63
return
$clone;
64
}
65
69
public
function
getTitle
(): string
70
{
71
return
$this->title
;
72
}
73
74
public
function
withAltText
(
string
$alt_text): self
75
{
76
$clone = clone($this);
77
$clone->alt_text =
$alt_text
;
78
79
return
$clone;
80
}
81
85
public
function
getAltText
(): string
86
{
87
return
$this->alt_text
;
88
}
89
93
final
public
function
getAction
(): string
94
{
95
return
ilLink::_getLink($this->ref_id);
96
}
97
102
public
function
withAction
(
string
$action):
hasAction
103
{
104
$clone = clone $this;
105
$clone->ref_id = (
int
) $action;
106
107
return
$clone;
108
}
109
110
public
function
withRefId
(
int
$ref_id): self
111
{
112
$clone = clone $this;
113
$clone->ref_id =
$ref_id
;
114
115
return
$clone;
116
}
117
118
public
function
getSymbol
():
Symbol
119
{
120
return
$this->symbol;
121
}
122
126
public
function
getRefId
():
int
127
{
128
return
$this->ref_id
;
129
}
130
134
public
function
withIsLinkToExternalAction
(
bool
$is_external):
hasAction
135
{
136
throw
new
LogicException
(
"Repository-Links are always internal"
);
137
}
138
142
public
function
isLinkWithExternalAction
(): bool
143
{
144
return
false
;
145
}
146
}
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\$title
string $title
Definition:
RepositoryLink.php:52
LogicException
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isInterchangeableItem
Definition:
isInterchangeableItem.php:27
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:29
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withRefId
withRefId(int $ref_id)
Definition:
RepositoryLink.php:110
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getTitle
getTitle()
Definition:
RepositoryLink.php:69
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Complex.php:21
isInterchangeableItemTrait
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withIsLinkToExternalAction
withIsLinkToExternalAction(bool $is_external)
Definition:
RepositoryLink.php:134
isInterchangeableItemTrait
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\$alt_text
string $alt_text
Definition:
RepositoryLink.php:51
isChild
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild
Interface isChild.
Definition:
isChild.php:28
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getSymbol
getSymbol()
Definition:
RepositoryLink.php:118
Symbol
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\isLinkWithExternalAction
isLinkWithExternalAction()
Definition:
RepositoryLink.php:142
TriggererDecoratorTrait
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink
Definition:
RepositoryLink.php:40
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getAction
getAction()
Definition:
RepositoryLink.php:93
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle
Interface hasTitle.
Definition:
hasTitle.php:26
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withTitle
withTitle(string $title)
Definition:
RepositoryLink.php:58
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
hasSymbol()
Definition:
hasSymbolTrait.php:63
hasAction
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getRefId
getRefId()
Definition:
RepositoryLink.php:126
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withAltText
withAltText(string $alt_text)
Definition:
RepositoryLink.php:74
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getAltText
getAltText()
Definition:
RepositoryLink.php:85
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
Definition:
hasSymbol.php:30
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\$ref_id
int $ref_id
Definition:
RepositoryLink.php:50
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasAction
Interface hasAction.
Definition:
hasAction.php:26
isDecorateable
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbolTrait
trait hasSymbolTrait
Trait hasSymbolTrait.
Definition:
hasSymbolTrait.php:32
ilLink
hasTitle
AbstractChildItem
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
Class AbstractBaseItem.
Definition:
AbstractChildItem.php:29
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withAction
withAction(string $action)
Definition:
RepositoryLink.php:102
isInterchangeableItem
components
ILIAS
GlobalScreen
src
Scope
MainMenu
Factory
Item
RepositoryLink.php
Generated on Wed Sep 10 2025 15:15:41 for ILIAS by
1.8.13 (using
Doxyfile
)