ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ 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
s
t
w
+
Functions
_
a
b
c
f
g
h
i
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
namespace
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer
;
2
3
use
ILIAS\Data\URI
;
4
use
ILIAS\GlobalScreen\Collector\Renderer\ComponentDecoratorApplierTrait
;
5
use
ILIAS\GlobalScreen\Collector\Renderer\isSupportedTrait
;
6
use
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasSymbol
;
7
use
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasTitle
;
8
use
ILIAS\GlobalScreen\Scope\MetaBar\Factory\isItem
;
9
use
ILIAS\UI\Component\Component
;
10
use
ILIAS\UI\Component\Symbol\Symbol
;
11
17
abstract
class
AbstractMetaBarItemRenderer
implements
MetaBarItemRenderer
18
{
19
use
ComponentDecoratorApplierTrait
;
20
use
isSupportedTrait
;
24
protected
$ui
;
25
26
30
public
function
__construct
()
31
{
32
global
$DIC
;
33
$this->
ui
= $DIC->ui();
34
}
35
36
42
protected
function
getURI
(
string
$uri_string) :
URI
43
{
44
if
(strpos($uri_string,
'http'
) === 0) {
45
return
new
URI
($uri_string);
46
}
47
48
return
new
URI
(rtrim(
ILIAS_HTTP_PATH
,
"/"
) .
"/"
. ltrim($uri_string,
"./"
));
49
}
50
51
55
public
function
getComponentForItem
(
isItem
$item) :
Component
56
{
57
$component = $this->
getSpecificComponentForItem
($item);
58
$component = $this->applyDecorator($component, $item);
59
60
return
$component;
61
}
62
63
64
abstract
protected
function
getSpecificComponentForItem
(
isItem
$item) :
Component
;
65
66
72
protected
function
getStandardSymbol
(
isItem
$item) :
Symbol
73
{
74
if
($item instanceof
hasSymbol
&& $item->hasSymbol()) {
75
return
$item->getSymbol();
76
}
77
if
($item instanceof
hasTitle
) {
78
$abbr = strtoupper(substr($item->getTitle(), 0, 1));
79
}
else
{
80
$abbr = strtoupper(substr(uniqid(
''
,
true
), -1));
81
}
82
83
return
$this->
ui
->factory()->symbol()->icon()->standard($abbr, $abbr,
'small'
,
true
)->withAbbreviation($abbr);
84
}
85
}
ILIAS\UI\Component\Symbol\Symbol
This describes a symbol.
Definition:
Symbol.php:11
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasTitle
Interface hasTitle.
Definition:
hasTitle.php:8
ILIAS\UI\Component
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\__construct
__construct()
BaseMetaBarItemRenderer constructor.
Definition:
AbstractMetaBarItemRenderer.php:30
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getComponentForItem
getComponentForItem(isItem $item)
Definition:
AbstractMetaBarItemRenderer.php:55
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer
Definition:
AbstractMetaBarItemRenderer.php:1
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getSpecificComponentForItem
getSpecificComponentForItem(isItem $item)
Component
Symbol
hasTitle
isSupportedTrait
ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasSymbol
hasSymbol()
Definition:
hasSymbolTrait.php:44
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getStandardSymbol
getStandardSymbol(isItem $item)
Definition:
AbstractMetaBarItemRenderer.php:72
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:11
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\$ui
$ui
Definition:
AbstractMetaBarItemRenderer.php:24
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer
Class AbstractMetaBarItemRenderer.
Definition:
AbstractMetaBarItemRenderer.php:17
ComponentDecoratorApplierTrait
ILIAS\GlobalScreen\Scope\MetaBar\Factory\hasSymbol
Interface hasSymbol.
Definition:
hasSymbol.php:10
isItem
ComponentDecoratorApplierTrait
URI
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\MetaBarItemRenderer
Interface MetaBarItemRenderer.
Definition:
MetaBarItemRenderer.php:11
$DIC
$DIC
Definition:
xapitoken.php:46
ILIAS\GlobalScreen\Scope\MetaBar\Collector\Renderer\AbstractMetaBarItemRenderer\getURI
getURI(string $uri_string)
Definition:
AbstractMetaBarItemRenderer.php:42
ILIAS_HTTP_PATH
const ILIAS_HTTP_PATH
Definition:
StandardNotificationRendererTest.php:7
isSupportedTrait
src
GlobalScreen
Scope
MetaBar
Collector
Renderer
AbstractMetaBarItemRenderer.php
Generated on Sun Apr 6 2025 20:01:38 for ILIAS by
1.8.13 (using
Doxyfile
)