phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
HtmlSegmentGroups.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\elements
;
4
5
use
Ajax\semantic\html\base\constants\SegmentType
;
6
use
Ajax\semantic\html\base\HtmlSemCollection
;
7
use
Ajax\semantic\html\base\constants\Sens
;
8
use
Ajax\JsUtils
;
9
10
class
HtmlSegmentGroups
extends
HtmlSemCollection
{
11
12
13
public
function
__construct
(
$identifier
, $items=array()){
14
parent::__construct(
$identifier
,
"div"
,
"ui segments"
);
15
$this->
addItems
($items);
16
}
17
18
19
protected
function
createItem
($value){
20
return
new
HtmlSegment
(
"segment-"
.$this->
count
(),$value);
21
}
22
23
protected
function
createCondition
($value){
24
return
!($value instanceof
HtmlSegment
);
25
}
26
32
public
function
setType
($type){
33
return
$this->
addToPropertyCtrl
(
"class"
, $type,
SegmentType::getConstants
());
34
}
35
36
public
function
setSens
($sens=
Sens::VERTICAL
){
37
return
$this->
addToPropertyCtrl
(
"class"
, $sens,
Sens::getConstants
());
38
}
39
40
public
function
run
(
JsUtils
$js){
41
$result=
parent::run
($js);
42
return
$result->setItemSelector(
".ui.segment"
);
43
}
44
45
public
static
function
group
(
$identifier
,$items=array(),$type=
""
,$sens=
Sens::VERTICAL
){
46
$group=
new
HtmlSegmentGroups
(
$identifier
,$items);
47
$group->setSens($sens);
48
return
$group->setType($type);
49
}
50
51
}
Ajax\common\html\HtmlCollection\addItems
addItems($items)
Definition:
HtmlCollection.php:22
Ajax\semantic\html\elements\HtmlSegmentGroups\createItem
createItem($value)
Definition:
HtmlSegmentGroups.php:19
Ajax\semantic\html\elements\HtmlSegmentGroups\group
static group($identifier, $items=array(), $type="", $sens=Sens::VERTICAL)
Definition:
HtmlSegmentGroups.php:45
HtmlSemCollection
Ajax\common\BaseEnum\getConstants
static getConstants()
Definition:
BaseEnum.php:17
Ajax\semantic\html\elements\HtmlSegmentGroups\setSens
setSens($sens=Sens::VERTICAL)
Definition:
HtmlSegmentGroups.php:36
Ajax\semantic\html\base\traits\run
run(JsUtils $js)
Definition:
HasTimeoutTrait.php:20
Ajax\semantic\html\elements\HtmlSegment
Semantic Segment element.
Definition:
HtmlSegment.php:20
Ajax\semantic\html\elements\HtmlSegmentGroups\createCondition
createCondition($value)
Definition:
HtmlSegmentGroups.php:23
Ajax\semantic\html\elements\HtmlSegmentGroups\__construct
__construct( $identifier, $items=array())
Definition:
HtmlSegmentGroups.php:13
Ajax\semantic\html\elements\HtmlSegmentGroups\setType
setType($type)
Defines the group type.
Definition:
HtmlSegmentGroups.php:32
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition:
BaseWidget.php:14
Ajax\semantic\html\elements\HtmlSegmentGroups
Definition:
HtmlSegmentGroups.php:10
Ajax\common\html\HtmlCollection\count
count()
Definition:
HtmlCollection.php:100
Ajax\semantic\html\base\HtmlSemCollection
Base class for Semantic Html collections.
Definition:
HtmlSemCollection.php:13
Ajax\JsUtils
JQuery PHP library.
Definition:
JsUtils.php:23
SegmentType
Ajax\semantic\html\base\constants\Sens\VERTICAL
const VERTICAL
Definition:
Sens.php:5
Sens
JsUtils
Ajax\semantic\html\elements
Ajax\common\html\traits\addToPropertyCtrl
addToPropertyCtrl($name, $value, $typeCtrl)
Definition:
BaseHtmlPropertiesTrait.php:87
Ajax\semantic\html\elements\HtmlSegmentGroups\run
run(JsUtils $js)
Definition:
HtmlSegmentGroups.php:40
Ajax
semantic
html
elements
HtmlSegmentGroups.php
Generated on Thu Sep 19 2024 23:26:03 for
phpMv-UI
by
doxygen
1.8.13