phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlSplitbutton.php
Go to the documentation of this file.
1<?php
2
3namespace Ajax\bootstrap\html;
4
8
15
16 public function __construct($identifier, $value="&nbsp;", $items=array(), $cssStyle="btn-default", $onClick=null) {
17 parent::__construct($identifier, $value, $items, $cssStyle, $onClick);
18 $this->asButton($cssStyle);
19 $this->_template=include 'templates/tplSplitbutton.php';
20 $this->mClass="btn-group";
21 }
22
28 public function setSize($size) {
29 if (is_int($size)) {
30 return $this->addToMember($this->mClass, CssRef::sizes("btn-group")[$size]);
31 }
32 return $this->addToMemberCtrl($this->mClass, $size, CssRef::sizes("btn-group"));
33 }
34
35 public function onButtonClick($jsCode) {
36 $this->addEvent("buttonClick", $jsCode);
37 }
38
39 /*
40 * (non-PHPdoc)
41 * @see BaseHtml::run()
42 */
43 public function run(JsUtils $js) {
44 if ($this->getProperty("role")==="nav") {
45 foreach ( $this->items as $dropdownItem ) {
46 $dropdownItem->runNav($js);
47 }
48 }
49 $this->_bsComponent=$js->bootstrap()->splitbutton("#".$this->identifier);
50 $this->addEventsOnRun($js);
52 }
53}
JQuery PHP library.
Definition JsUtils.php:23
bootstrap(Bootstrap $bootstrap=NULL)
getter or setter of the Twitter Bootstrap variable
Definition JsUtils.php:140
Twitter Bootstrap HTML Dropdown component.
asButton($cssStyle="btn-primary")
Twitter Bootstrap HTML Splitbutton component.
run(JsUtils $js)
SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\Bas...
__construct($identifier, $value="&nbsp;", $items=array(), $cssStyle="btn-default", $onClick=null)
Default HTML values for Twitter Bootstrap HTML components.
Definition CssRef.php:12
addToMember(&$name, $value, $separator=' ')
Definition BaseHtml.php:98
addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ")
Definition BaseHtml.php:89
addEvent($event, $jsCode, $stopPropagation=false, $preventDefault=false)