phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlSegment.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\elements
;
4
5
use
Ajax\semantic\html\base\HtmlSemDoubleElement
;
6
use
Ajax\semantic\html\base\constants\SegmentType
;
7
use
Ajax\semantic\html\base\traits\AttachedTrait
;
8
use
Ajax\semantic\html\base\constants\State
;
9
use
Ajax\semantic\html\base\constants\Variation
;
10
use
Ajax\semantic\html\base\constants\Emphasis
;
11
use
Ajax\semantic\html\base\traits\TextAlignmentTrait
;
12
use
Ajax\semantic\html\collections\HtmlGrid
;
13
20
class
HtmlSegment
extends
HtmlSemDoubleElement
,
AttachedTrait
,
TextAlignmentTrait
{
21
22
public
function
__construct
(
$identifier
,
$content
=
""
) {
23
parent::__construct(
$identifier
,
"div"
,
"ui segment"
);
24
$this->_variations=\array_merge($this->_variations, [ Variation::PADDED,Variation::COMPACT ]);
25
$this->_states=\array_merge($this->_states, [ State::LOADING ]);
26
$this->content=
$content
;
27
}
28
34
public
function
setType
($type) {
35
return
$this->
addToPropertyCtrl
(
"class"
, $type, SegmentType::getConstants());
36
}
37
38
public
function
setSens
($sens=
"vertical"
) {
39
return
$this->
addToPropertyCtrl
(
"class"
, $sens, array (
"vertical"
,
"horizontal"
));
40
}
41
42
public
function
setEmphasis
($value=Emphasis::SECONDARY) {
43
return
$this->
addToPropertyCtrl
(
"class"
, $value, Emphasis::getConstants());
44
}
45
46
public
function
setCircular
() {
47
return
$this->
addToProperty
(
"class"
,
"circular"
);
48
}
49
50
public
function
clear
() {
51
return
$this->
addToProperty
(
"class"
,
"clearing"
);
52
}
53
54
public
function
setCompact
() {
55
return
$this->
addToProperty
(
"class"
,
"compact"
);
56
}
57
58
public
function
setBasic
() {
59
return
$this->
setProperty
(
"class"
,
"ui basic segment"
);
60
}
61
62
public
function
asContainer
() {
63
return
$this->
addToPropertyCtrl
(
"class"
,
"container"
, array (
"container"
));
64
}
65
66
public
function
addGrid
($numRows=1, $numCols=NULL){
67
$grid=
new
HtmlGrid
(
"Grid-"
.$this->identifier,$numRows,$numCols);
68
$this->content=$grid;
69
return
$grid;
70
}
71
}
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\HtmlDoubleElement\$content
$content
Definition
HtmlDoubleElement.php:14
Ajax\semantic\html\base\HtmlSemDoubleElement
Base class for Semantic double elements.
Definition
HtmlSemDoubleElement.php:23
Ajax\semantic\html\base\constants\Emphasis
Definition
Emphasis.php:7
Ajax\semantic\html\base\constants\SegmentType
Definition
SegmentType.php:7
Ajax\semantic\html\base\constants\State
Definition
State.php:8
Ajax\semantic\html\base\constants\Variation
Definition
Variation.php:7
Ajax\semantic\html\base\traits\AttachedTrait
Definition
AttachedTrait.php:9
Ajax\semantic\html\base\traits\AttachedTrait\addToPropertyCtrl
addToPropertyCtrl($name, $value, $typeCtrl)
Ajax\semantic\html\base\traits\BaseTrait\addToProperty
addToProperty($name, $value, $separator=" ")
Ajax\semantic\html\base\traits\BaseTrait\setProperty
setProperty($name, $value)
Ajax\semantic\html\base\traits\TextAlignmentTrait
Definition
TextAlignmentTrait.php:7
Ajax\semantic\html\collections\HtmlGrid
Semantic Grid component.
Definition
HtmlGrid.php:18
Ajax\semantic\html\elements\HtmlSegment
Semantic Segment element.
Definition
HtmlSegment.php:20
Ajax\semantic\html\elements\HtmlSegment\setEmphasis
setEmphasis($value=Emphasis::SECONDARY)
Definition
HtmlSegment.php:42
Ajax\semantic\html\elements\HtmlSegment\setCircular
setCircular()
Definition
HtmlSegment.php:46
Ajax\semantic\html\elements\HtmlSegment\asContainer
asContainer()
Definition
HtmlSegment.php:62
Ajax\semantic\html\elements\HtmlSegment\setBasic
setBasic()
Definition
HtmlSegment.php:58
Ajax\semantic\html\elements\HtmlSegment\setSens
setSens($sens="vertical")
Definition
HtmlSegment.php:38
Ajax\semantic\html\elements\HtmlSegment\clear
clear()
Definition
HtmlSegment.php:50
Ajax\semantic\html\elements\HtmlSegment\addGrid
addGrid($numRows=1, $numCols=NULL)
Definition
HtmlSegment.php:66
Ajax\semantic\html\elements\HtmlSegment\__construct
__construct($identifier, $content="")
Definition
HtmlSegment.php:22
Ajax\semantic\html\elements\HtmlSegment\setType
setType($type)
Defines the segment type.
Definition
HtmlSegment.php:34
Ajax\semantic\html\elements\HtmlSegment\setCompact
setCompact()
Definition
HtmlSegment.php:54
Ajax\semantic\html\elements
Ajax
semantic
html
elements
HtmlSegment.php
Generated on Sun Dec 10 2023 16:16:08 for
phpMv-UI
by
doxygen
1.9.8