ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
ComponentEntryRules.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
ILIAS\UI\Implementation\Crawler\Entry
;
4
12
class
ComponentEntryRules
extends
AbstractEntryPart
implements
\JsonSerializable
13
{
17
protected
$rules
=
array
(
18
"usage"
=>
array
(),
19
"composition"
=>
array
(),
20
"interaction"
=>
array
(),
21
"wording"
=>
array
(),
22
"ordering"
=>
array
(),
23
"style"
=>
array
(),
24
"responsiveness"
=>
array
(),
25
"accessibility"
=>
array
()
26
);
27
32
public
function
__construct
(
$rules
=
array
()) {
33
parent::__construct();
34
$this->
setRules
(
$rules
);
35
}
36
41
public
function
withRules
(
$rules
=
array
()){
42
$clone = clone $this;
43
$clone->setRules(
$rules
);
44
return
$clone;
45
}
46
51
protected
function
setRules
(
$rules
)
52
{
53
if
(!
$rules
){
54
return
;
55
}
56
$this->
assert
()->isArray(
$rules
);
57
foreach
(
$rules
as $rule_category => $category_rules){
58
$this->
assert
()->isIndex($rule_category, $this->rules);
59
if
($category_rules && $category_rules !=
""
) {
60
$this->
assert
()->isArray($category_rules);
61
foreach
($category_rules as $rule_id => $rule) {
62
$this->
assert
()->isString($rule);
63
$this->rules[$rule_category][$rule_id] = $rule;
64
}
65
}
66
}
67
}
68
72
public
function
getRules
(){
73
return
$this->rules
;
74
}
75
79
public
function
jsonSerialize
() {
80
return
$this->
getRules
();
81
}
82
}
ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryRules
Container to hold rules of UI Components.
Definition:
ComponentEntryRules.php:12
JsonSerializable
ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryRules\jsonSerialize
jsonSerialize()
Definition:
ComponentEntryRules.php:79
ILIAS\UI\Implementation\Crawler\Entry\AbstractEntryPart
Abstract Entry Part to share some common entry functionality.
Definition:
AbstractEntryPart.php:13
ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryRules\$rules
$rules
Definition:
ComponentEntryRules.php:17
ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryRules\__construct
__construct($rules=array())
ComponentEntryDescription constructor.
Definition:
ComponentEntryRules.php:32
ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryRules\getRules
getRules()
Definition:
ComponentEntryRules.php:72
ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryRules\withRules
withRules($rules=array())
Definition:
ComponentEntryRules.php:41
ILIAS\UI\Implementation\Crawler\Entry\AbstractEntryPart\assert
assert()
Definition:
AbstractEntryPart.php:30
ILIAS\UI\Implementation\Crawler\Entry
Definition:
AbstractEntryPart.php:4
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
php
ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryRules\setRules
setRules($rules)
Definition:
ComponentEntryRules.php:51
src
UI
Implementation
Crawler
Entry
ComponentEntryRules.php
Generated on Fri Jan 17 2025 19:01:21 for ILIAS by
1.8.13 (using
Doxyfile
)