ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
AbstractMetaBarItemRenderer.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer
;
22
23
use
ILIAS\Data\URI
;
24
use
ILIAS\DI\UIServices
;
25
use
ILIAS\GlobalScreen\Collector\Renderer\ComponentDecoratorApplierTrait
;
26
use
ILIAS\GlobalScreen\Collector\Renderer\isSupportedTrait
;
27
use
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasSymbol
;
28
use
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasTitle
;
29
use
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isItem
;
30
use
ILIAS\UI\Component\Component
;
31
use
ILIAS\UI\Component\Symbol\Symbol
;
32
37
abstract
class
AbstractMetaBarItemRenderer
implements
MetaBarItemRenderer
38
{
39
use
ComponentDecoratorApplierTrait
;
40
use
isSupportedTrait
;
41
45
protected
$ui
;
46
50
public
function
__construct
()
51
{
52
global
$DIC
;
53
$this->
ui
= $DIC->ui();
54
}
55
60
protected
function
getURI
(
string
$uri_string) :
URI
61
{
62
if
(strpos($uri_string,
'http'
) === 0) {
63
return
new
URI
($uri_string);
64
}
65
66
return
new
URI
(rtrim(ILIAS_HTTP_PATH,
"/"
) .
"/"
. ltrim($uri_string,
"./"
));
67
}
68
72
public
function
getComponentForItem
(
isItem
$item) :
Component
73
{
74
$component = $this->
getSpecificComponentForItem
($item);
75
76
return
$this->applyDecorator($component, $item);
77
}
78
79
abstract
protected
function
getSpecificComponentForItem
(
isItem
$item) :
Component
;
80
85
protected
function
buildIcon
(
isItem
$item) :
Symbol
86
{
87
if
($item instanceof
hasSymbol
&& $item->hasSymbol()) {
88
return
$this->applySymbolDecorator($item->getSymbol(), $item);
89
}
90
if
($item instanceof
hasTitle
) {
91
$abbr = strtoupper(substr($item->getTitle(), 0, 1));
92
}
else
{
93
$abbr = strtoupper(substr(uniqid(
''
,
true
), -1));
94
}
95
96
return
$this->
ui
->factory()->symbol()->icon()->standard($abbr, $abbr,
'small'
,
true
)->withAbbreviation($abbr);
97
}
98
102
protected
function
getStandardSymbol
(
isItem
$item) :
Symbol
103
{
104
return
$this->
buildIcon
($item);
105
}
106
}
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:11
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasTitle
Interface hasTitle.
Definition:
hasTitle.php:27
ILIAS\UI\Component
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\__construct
__construct()
BaseMetaBarItemRenderer constructor.
Definition:
AbstractMetaBarItemRenderer.php:50
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getComponentForItem
getComponentForItem(isItem $item)
Definition:
AbstractMetaBarItemRenderer.php:72
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer
Definition:
AbstractMetaBarItemRenderer.php:21
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getSpecificComponentForItem
getSpecificComponentForItem(isItem $item)
Component
UIServices
Symbol
hasTitle
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\buildIcon
buildIcon(isItem $item)
Definition:
AbstractMetaBarItemRenderer.php:85
isSupportedTrait
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
hasSymbol()
Definition:
hasSymbolTrait.php:66
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getStandardSymbol
getStandardSymbol(isItem $item)
Definition:
AbstractMetaBarItemRenderer.php:102
$DIC
global $DIC
Definition:
goto.php:24
ILIAS\Data\URI
The scope of this class is split ilias-conform URI's into components.
Definition:
URI.php:17
ui
ui()
Definition:
ui.php:5
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isItem
Class isItem.
Definition:
isItem.php:30
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\$ui
$ui
Definition:
AbstractMetaBarItemRenderer.php:45
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer
Class AbstractMetaBarItemRenderer.
Definition:
AbstractMetaBarItemRenderer.php:37
ComponentDecoratorApplierTrait
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasSymbol
Interface hasSymbol.
Definition:
hasSymbol.php:31
isItem
ComponentDecoratorApplierTrait
URI
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\MetaBarItemRenderer
Interface MetaBarItemRenderer.
Definition:
MetaBarItemRenderer.php:29
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getURI
getURI(string $uri_string)
Definition:
AbstractMetaBarItemRenderer.php:60
isSupportedTrait
src
GlobalScreen
Scope
MetaBar
Collector
Renderer
AbstractMetaBarItemRenderer.php
Generated on Tue Apr 8 2025 21:02:12 for ILIAS by
1.8.13 (using
Doxyfile
)