ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
ComponentHelper.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 2016 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5
namespace
ILIAS\UI\Implementation\Component
;
6
10
trait
ComponentHelper
11
{
15
private
$canonical_name = null;
16
23
public
function
getCanonicalName
()
24
{
25
if
($this->canonical_name === null) {
26
$this->canonical_name = $this->
getCanonicalNameByFullyQualifiedName
();
27
}
28
return
$this->canonical_name;
29
}
30
36
protected
function
getCanonicalNameByFullyQualifiedName
()
37
{
38
$cls = explode(
"\\"
, get_class($this));
39
$name
= [];
40
$cur = array_pop($cls);
41
while
($cur !==
"Component"
&& count($cls) > 0) {
42
$name
[] = preg_replace(
"%([a-z])([A-Z])%"
,
"$1 $2"
, $cur);
43
$cur = array_pop($cls);
44
}
45
return
implode(
" "
,
$name
);
46
}
47
59
77
90
103
117
132
153
185
211
ILIAS\UI\Implementation\Component
ILIAS\UI\Implementation\Component\getCanonicalNameByFullyQualifiedName
getCanonicalNameByFullyQualifiedName()
Does the calculation required for getCanonicalName.
Definition:
ComponentHelper.php:36
$name
if($format !==null) $name
Definition:
metadata.php:146
ILIAS\UI\Component\Component\getCanonicalName
getCanonicalName()
Get the canonical name of the component.
ComponentHelper
src
UI
Implementation
Component
ComponentHelper.php
Generated on Sat Jan 18 2025 19:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)