phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlButtontoolbar.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\bootstrap\html
;
4
12
class
HtmlButtontoolbar
extends
HtmlButtongroups
{
13
14
public
function
__construct
(
$identifier
,
$elements
=array(), $cssStyle=NULL, $size=NULL,
$tagName
=
"div"
) {
15
parent::__construct(
$identifier
,
$elements
, $cssStyle, $size,
$tagName
);
16
$this->
setClass
(
"btn-toolbar"
);
17
}
18
19
/*
20
* (non-PHPdoc)
21
* @see \Ajax\bootstrap\html\HtmlButtongroups::addElement()
22
*/
23
public
function
addElement
($element) {
24
if
($element instanceof
HtmlButtongroups
) {
25
$this->elements []=$element;
26
}
else
{
27
$this->
getLastButtonGroup
()->addElement($element);
28
}
29
}
30
35
public
function
addGroup
() {
36
$nb=
sizeof
(
$this->elements
);
37
$bg=
new
HtmlButtongroups
($this->identifier.
"-buttongroups-"
.$nb);
38
$this->elements []=$bg;
39
return
$bg;
40
}
41
46
private
function
getLastButtonGroup
() {
47
$nb=
sizeof
(
$this->elements
);
48
if
($nb>0)
49
$bg=$this->elements [$nb-1];
50
else
{
51
$bg=
new
HtmlButtongroups
($this->identifier.
"-buttongroups-"
.$nb);
52
$this->elements []=$bg;
53
}
54
return
$bg;
55
}
56
61
public
function
getGroup
($index) {
62
return
parent::getElement($index);
63
}
64
65
public
function
getLastGroup
() {
66
$bg=
null
;
67
$nb=
sizeof
(
$this->elements
);
68
if
($nb>0)
69
$bg=$this->elements [$nb-1];
70
return
$bg;
71
}
72
73
77
public
function
getElement
($index) {
78
$element=
null
;
79
$i=0;
80
if
(is_int($index)) {
81
$elements
=array ();
82
foreach
( $this->elements as $group ) {
83
$elements
=array_merge(
$elements
, $group->getElements());
84
}
85
if
($index<
sizeof
(
$elements
)) {
86
$element=
$elements
[$index];
87
}
88
}
else
{
89
while
( $element===
null
&& $i<
sizeof
($this->elements) ) {
90
$element=$this->elements [$i]->getElement($index);
91
$i++;
92
}
93
}
94
return
$element;
95
}
96
}
Ajax\bootstrap\html\HtmlButtongroups
Twitter Bootstrap Buttongroups component.
Definition
HtmlButtongroups.php:14
Ajax\bootstrap\html\HtmlButtongroups\$elements
$elements
Definition
HtmlButtongroups.php:19
Ajax\bootstrap\html\HtmlButtontoolbar
Twitter Bootstrap HTML Button toolbar.
Definition
HtmlButtontoolbar.php:12
Ajax\bootstrap\html\HtmlButtontoolbar\getGroup
getGroup($index)
return the Buttongroups at position $index
Definition
HtmlButtontoolbar.php:61
Ajax\bootstrap\html\HtmlButtontoolbar\getElement
getElement($index)
Definition
HtmlButtontoolbar.php:77
Ajax\bootstrap\html\HtmlButtontoolbar\getLastGroup
getLastGroup()
Definition
HtmlButtontoolbar.php:65
Ajax\bootstrap\html\HtmlButtontoolbar\getLastButtonGroup
getLastButtonGroup()
Definition
HtmlButtontoolbar.php:46
Ajax\bootstrap\html\HtmlButtontoolbar\addGroup
addGroup()
Add and return a new buttongroup.
Definition
HtmlButtontoolbar.php:35
Ajax\bootstrap\html\HtmlButtontoolbar\addElement
addElement($element)
Definition
HtmlButtontoolbar.php:23
Ajax\bootstrap\html\HtmlButtontoolbar\__construct
__construct($identifier, $elements=array(), $cssStyle=NULL, $size=NULL, $tagName="div")
Definition
HtmlButtontoolbar.php:14
Ajax\common\html\BaseHtml\$tagName
$tagName
Definition
BaseHtml.php:21
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\HtmlSingleElement\setClass
setClass($classNames)
Definition
HtmlSingleElement.php:15
Ajax\bootstrap\html
Ajax
bootstrap
html
HtmlButtontoolbar.php
Generated on Sun Dec 10 2023 16:15:53 for
phpMv-UI
by
doxygen
1.9.8