phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlAccordionMenu.php
Go to the documentation of this file.
1<?php
2
4
8
10 protected $params=array();
11
12 public function __construct( $identifier, $items=array() ){
13 parent::__construct( $identifier, $items);
14 $this->addToProperty("class", "accordion");
15 $this->setVertical();
16 }
17
22 protected function createItem($value) {
23 $title=$value;
24 $content="";
25 if(\is_array($value)){
26 $title=@$value[0];$content=@$value[1];
27 }
28 $itemO=new HtmlAccordionMenuItem("item-".$this->identifier."-".$this->count(), $title, $content);
29 return $itemO->setClass("item");
30 }
31
32 /*
33 * (non-PHPdoc)
34 * @see BaseHtml::run()
35 */
36 public function run(JsUtils $js) {
37 if(isset($this->_bsComponent)===false)
38 $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
39 $this->addEventsOnRun($js);
41 }
42
43 public function setExclusive($value){
44 $this->params["exclusive"]=$value;
45 }
46}
JQuery PHP library.
Definition JsUtils.php:23
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
Definition JsUtils.php:158
Base class for Html collections.
addToProperty($name, $value, $separator=" ")
run(JsUtils $js)
SimpleExtComponent\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\BaseHtmlrun()\Ajax\common\html\Bas...
createItem($value)
The item factory.HtmlCollection::createItem()