@@ -35,12 +35,18 @@ |
||
35 | 35 | return $segment; |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param integer $index |
|
40 | + */ |
|
38 | 41 | public function activate($index){ |
39 | 42 | $this->content["menu"]->getItem($index)->setActive(true); |
40 | 43 | $this->content[$index]->setActive(true); |
41 | 44 | return $this; |
42 | 45 | } |
43 | 46 | |
47 | + /** |
|
48 | + * @param string $title |
|
49 | + */ |
|
44 | 50 | public function addPanel($title,$content){ |
45 | 51 | return $this->addItem([$title,$content]); |
46 | 52 | } |
@@ -16,8 +16,9 @@ discard block |
||
16 | 16 | $menu->asTab(false)->setAttachment(NULL,Side::TOP); |
17 | 17 | $this->content["menu"]=$menu; |
18 | 18 | $this->addItems($tabs); |
19 | - if(\sizeof($tabs)>0) |
|
20 | - $this->activate(0); |
|
19 | + if(\sizeof($tabs)>0) { |
|
20 | + $this->activate(0); |
|
21 | + } |
|
21 | 22 | } |
22 | 23 | |
23 | 24 | protected function createItem($value){ |
@@ -75,8 +76,9 @@ discard block |
||
75 | 76 | * @see BaseHtml::run() |
76 | 77 | */ |
77 | 78 | public function run(JsUtils $js) { |
78 | - if(isset($this->_bsComponent)===false) |
|
79 | - $this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item",$this->params); |
|
79 | + if(isset($this->_bsComponent)===false) { |
|
80 | + $this->_bsComponent=$js->semantic()->tab("#".$this->identifier." .item",$this->params); |
|
81 | + } |
|
80 | 82 | $this->addEventsOnRun($js); |
81 | 83 | return $this->_bsComponent; |
82 | 84 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $title=@$content[1]; |
18 | 18 | $desc=@$content[2]; |
19 | 19 | $status=@$content[3]; |
20 | - }else{ |
|
20 | + } else{ |
|
21 | 21 | $icon=@$content["icon"]; |
22 | 22 | $title=@$content["title"]; |
23 | 23 | $desc=@$content["description"]; |
@@ -32,16 +32,17 @@ discard block |
||
32 | 32 | if(isset($title)===true){ |
33 | 33 | $this->setTitle($title,$desc); |
34 | 34 | } |
35 | - }else{ |
|
35 | + } else{ |
|
36 | 36 | $this->setContent($content); |
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | 40 | public function setActive($value=true){ |
41 | - if($value) |
|
42 | - $this->setStatus(StepStatus::ACTIVE); |
|
43 | - else |
|
44 | - $this->setStatus(StepStatus::NONE); |
|
41 | + if($value) { |
|
42 | + $this->setStatus(StepStatus::ACTIVE); |
|
43 | + } else { |
|
44 | + $this->setStatus(StepStatus::NONE); |
|
45 | + } |
|
45 | 46 | return $this; |
46 | 47 | } |
47 | 48 |