ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
RepositoryLink.php
Go to the documentation of this file.
1
<?php
namespace
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item
;
2
3
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
;
4
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasAction
;
5
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
;
6
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbolTrait
;
7
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle
;
8
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild
;
9
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isInterchangeableItem
;
10
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isInterchangeableItemTrait
;
11
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isTopItem
;
12
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\SymbolDecoratorTrait
;
13
use
ILIAS\UI\Component\Changeable
;
14
use
ILIAS\UI\Component\Symbol\Symbol
;
15
use
ilLink
;
16
use
ilObject2
;
17
24
class
RepositoryLink
extends
AbstractChildItem
implements
hasTitle
,
hasAction
,
hasSymbol
,
isInterchangeableItem
,
isTopItem
25
{
26
use
hasSymbolTrait
;
27
use
SymbolDecoratorTrait
;
28
use
isInterchangeableItemTrait
;
29
33
protected
$ref_id
= 0;
37
protected
$alt_text
;
41
protected
$title
=
''
;
42
47
public
function
withTitle
(
string
$title
) :
hasTitle
48
{
49
$clone = clone($this);
50
$clone->title =
$title
;
51
52
return
$clone;
53
}
54
58
public
function
getTitle
() : string
59
{
60
return
$this->title
;
61
}
62
67
public
function
withAltText
(
string
$alt_text
) :
RepositoryLink
68
{
69
$clone = clone($this);
70
$clone->alt_text =
$alt_text
;
71
72
return
$clone;
73
}
74
78
public
function
getAltText
() : string
79
{
80
return
$this->alt_text
;
81
}
82
86
final
public
function
getAction
() : string
87
{
88
return
ilLink::_getLink
($this->ref_id);
89
}
90
95
public
function
withAction
(
string
$action) :
hasAction
96
{
97
$clone = clone $this;
98
$clone->ref_id = (int) $action;
99
100
return
$clone;
101
}
102
107
public
function
withRefId
(
int
$ref_id
) :
RepositoryLink
108
{
109
$clone = clone $this;
110
$clone->ref_id =
$ref_id
;
111
112
return
$clone;
113
}
114
115
public
function
getSymbol
() :
Symbol
116
{
117
return
$this->symbol;
118
}
119
123
public
function
getRefId
() : int
124
{
125
return
$this->ref_id
;
126
}
127
131
public
function
withIsLinkToExternalAction
(
bool
$is_external) :
hasAction
132
{
133
throw
new \LogicException(
"Repository-Links are always internal"
);
134
}
135
139
public
function
isLinkWithExternalAction
() : bool
140
{
141
return
false
;
142
}
143
}
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isInterchangeableItem
Definition:
isInterchangeableItem.php:8
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\$ref_id
$ref_id
Definition:
RepositoryLink.php:33
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:11
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withRefId
withRefId(int $ref_id)
Definition:
RepositoryLink.php:107
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getTitle
getTitle()
Definition:
RepositoryLink.php:58
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item
Definition:
Complex.php:1
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\$title
$title
Definition:
RepositoryLink.php:41
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\$alt_text
$alt_text
Definition:
RepositoryLink.php:37
isTopItem
isInterchangeableItemTrait
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withIsLinkToExternalAction
withIsLinkToExternalAction(bool $is_external)
Definition:
RepositoryLink.php:131
isInterchangeableItemTrait
isChild
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getSymbol
getSymbol()
Definition:
RepositoryLink.php:115
Symbol
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\isLinkWithExternalAction
isLinkWithExternalAction()
Definition:
RepositoryLink.php:139
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink
Class Link Attention: This is not the same as the .
Definition:
RepositoryLink.php:24
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getAction
getAction()
Definition:
RepositoryLink.php:86
ILIAS\GlobalScreen\Scope\MainMenu\Factory\isTopItem
Interface TopIs.
Definition:
isTopItem.php:8
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle
Interface hasTitle.
Definition:
hasTitle.php:8
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withTitle
withTitle(string $title)
Definition:
RepositoryLink.php:47
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
hasSymbol()
Definition:
hasSymbolTrait.php:44
hasAction
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getRefId
getRefId()
Definition:
RepositoryLink.php:123
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withAltText
withAltText(string $alt_text)
Definition:
RepositoryLink.php:67
Changeable
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\getAltText
getAltText()
Definition:
RepositoryLink.php:78
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
Interface hasSymbol Methods for Entries with Symbols.
Definition:
hasSymbol.php:11
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasAction
Interface hasAction.
Definition:
hasAction.php:8
ilObject2
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbolTrait
trait hasSymbolTrait
Trait hasSymbolTrait.
Definition:
hasSymbolTrait.php:10
ilLink
hasTitle
AbstractChildItem
ILIAS\GlobalScreen\Scope\MainMenu\Factory\SymbolDecoratorTrait
trait SymbolDecoratorTrait
Definition:
SymbolDecoratorTrait.php:18
ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractChildItem
Class AbstractBaseItem.
Definition:
AbstractChildItem.php:10
ilLink\_getLink
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Definition:
class.ilLink.php:17
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\RepositoryLink\withAction
withAction(string $action)
Definition:
RepositoryLink.php:95
isInterchangeableItem
src
GlobalScreen
Scope
MainMenu
Factory
Item
RepositoryLink.php
Generated on Sun Aug 31 2025 20:01:30 for ILIAS by
1.8.13 (using
Doxyfile
)