23 $this->_template=
'<%tagName% id="%identifier%" %properties%>%elements%</%tagName%>';
27 if (isset($cssStyle)) {
42 foreach ( $this->elements as $element ) {
43 $element->setSize($size);
46 return $this->
addToPropertyUnique(
"class", CssRef::sizes(
"btn-group")[$size], CssRef::sizes(
"btn-group"));
52 foreach ( $this->elements as $element )
53 $element->setStyle($value);
58 $bt->setTagName(
"button");
59 $bt->addBtnClass(
"dropdown-toogle");
60 $bt->addBtnClass(
"btn-default");
64 $bt->setMTagName(
"div");
65 $bt->setRole(
"group");
66 $bt->setMClass(
"btn-group");
74 } elseif (\is_array($element)) {
76 } elseif (is_string($element)) {
77 $result=
new HtmlButton($this->identifier.
"-button-".$iid,$element);
80 $this->elements[]=$result;
85 if (array_key_exists(
"glyph", $element))
87 elseif (array_key_exists(
"btnCaption", $element)) {
88 if (array_key_exists(
"split", $element))
91 $bt=
new HtmlDropdown($this->identifier.
"-dropdown-".$iid);
95 $bt=
new HtmlButton($this->identifier.
"-button-".$iid);
96 $bt->fromArray($element);
117 if (is_int($value)) {
118 $value=CssRef::alignment(
"btn-group")[$value];
120 $value=
"btn-group-".$value;
121 if (strstr($value,
"justified")) {
122 foreach ( $this->elements as $element ) {
123 $element->wrap(
'<div class="btn-group" role="group">',
'</div>');
136 return $this->elements[$index];
144 $this->elements[$index]=$button;
152 public function on($event, $jsCode, $stopPropagation=
false, $preventDefault=
false) {
153 foreach ( $this->elements as $element ) {
154 $element->on($event, $jsCode, $stopPropagation, $preventDefault);
Twitter Bootstrap HTML Dropdown component.
Default HTML values for Twitter Bootstrap HTML components.
getElementById($identifier, $elements)
addToPropertyUnique($name, $value, $typeCtrl)
addToPropertyCtrl($name, $value, $typeCtrl)
setProperty($name, $value)