phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlLabelGroups.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\elements
;
4
5
use
Ajax\semantic\html\base\HtmlSemCollection
;
6
use
Ajax\service\JArray
;
7
use
Ajax\semantic\html\base\constants\Size
;
8
use
Ajax\semantic\html\base\constants\Color
;
9
16
class
HtmlLabelGroups
extends
HtmlSemCollection
{
17
18
public
function
__construct
(
$identifier
,$labels=array(), $attributes=array()) {
19
parent::__construct(
$identifier
,
"div"
,
"ui labels"
);
20
$this->_states=\array_merge(Size::getConstants(),Color::getConstants(),[
"tag"
,
"circular"
]);
21
$this->
addItems
($labels);
22
$this->
setStates
($attributes);
23
}
24
25
protected
function
createItem
($value) {
26
$caption=$value;
27
$icon=NULL;
28
$tagName
=
"div"
;
29
if
(\is_array($value)) {
30
$caption=JArray::getValue($value,
"caption"
, 0);
31
$icon=JArray::getValue($value,
"icon"
, 1);
32
$tagName
=JArray::getValue($value,
"tagName"
, 2);
33
}
34
$labelO=
new
HtmlLabel
(
"label-"
. $this->identifier, $caption,$icon,
$tagName
);
35
return
$labelO;
36
}
37
38
protected
function
createCondition
($value) {
39
return
($value instanceof
HtmlLabel
) ===
false
;
40
}
41
42
}
Ajax\common\html\BaseHtml\$tagName
$tagName
Definition
BaseHtml.php:21
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\HtmlCollection\addItems
addItems($items)
Definition
HtmlCollection.php:22
Ajax\semantic\html\base\HtmlSemCollection
Base class for Semantic Html collections.
Definition
HtmlSemCollection.php:13
Ajax\semantic\html\base\constants\Color
Definition
Color.php:8
Ajax\semantic\html\base\constants\Size
Definition
Size.php:4
Ajax\semantic\html\base\traits\BaseTrait\setStates
setStates($states)
Definition
BaseTrait.php:82
Ajax\semantic\html\elements\HtmlLabelGroups
Semantic Label groups component.
Definition
HtmlLabelGroups.php:16
Ajax\semantic\html\elements\HtmlLabelGroups\createCondition
createCondition($value)
Definition
HtmlLabelGroups.php:38
Ajax\semantic\html\elements\HtmlLabelGroups\createItem
createItem($value)
The item factory.
Definition
HtmlLabelGroups.php:25
Ajax\semantic\html\elements\HtmlLabelGroups\__construct
__construct($identifier, $labels=array(), $attributes=array())
Definition
HtmlLabelGroups.php:18
Ajax\semantic\html\elements\HtmlLabel
Semantic Label component.
Definition
HtmlLabel.php:20
Ajax\service\JArray
Definition
JArray.php:4
Ajax\semantic\html\elements
Ajax
semantic
html
elements
HtmlLabelGroups.php
Generated on Sun Dec 10 2023 16:16:07 for
phpMv-UI
by
doxygen
1.9.8