ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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
7
use
ILIAS\UI\Component\Signal
;
8
12
trait
ComponentHelper
13
{
17
private
$canonical_name = null;
18
25
public
function
getCanonicalName
()
26
{
27
if
($this->canonical_name === null) {
28
$this->canonical_name = $this->
getCanonicalNameByFullyQualifiedName
();
29
}
30
return
$this->canonical_name;
31
}
32
38
protected
function
getCanonicalNameByFullyQualifiedName
()
39
{
40
$cls = explode(
"\\"
, get_class($this));
41
$name
= [];
42
$cur = array_pop($cls);
43
while
($cur !==
"Component"
&& count($cls) > 0) {
44
$name
[] = preg_replace(
"%([a-z])([A-Z])%"
,
"$1 $2"
, $cur);
45
$cur = array_pop($cls);
46
}
47
return
implode(
" "
,
$name
);
48
}
49
61
79
92
105
122
135
149
164
185
217
243
ILIAS\UI\Implementation\Component
ILIAS\UI\Implementation\Component\getCanonicalNameByFullyQualifiedName
getCanonicalNameByFullyQualifiedName()
Does the calculation required for getCanonicalName.
Definition:
ComponentHelper.php:38
ILIAS\UI\Component\Component\getCanonicalName
getCanonicalName()
Get the canonical name of the component.
$name
$name
Definition:
client_example.php:35
php
Signal
ComponentHelper
src
UI
Implementation
Component
ComponentHelper.php
Generated on Thu Jan 16 2025 19:02:38 for ILIAS by
1.8.13 (using
Doxyfile
)