phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
Tabs.php
Go to the documentation of this file.
1<?php
2
4
7
13class Tabs extends SimpleExtComponent {
18 protected $tabs;
19
20 public function __construct(JsUtils $js) {
21 parent::__construct($js);
22 $this->tabs=array ();
23 }
24
25 public function getTabs() {
26 return $this->tabs;
27 }
28
29 public function setTabs(array $tabs) {
30 $this->tabs=$tabs;
31 return $this;
32 }
33
34 public function addTab($tab) {
35 $this->tabs []=$tab;
36 }
37
38 public function getTab($index) {
39 if ($index>0&&$index<sizeof($this->tabs))
40 return $this->tabs [$index];
41 }
42
43 public function show($index) {
44 $this->tabs [$index]->show();
45 }
46
54 public function onShow($index, $jsCode) {
55 $tab=$this->getTab($index);
56 if (isset($tab))
57 return $tab->onShow($jsCode);
58 }
59
66 public function onShown($index, $jsCode) {
67 $tab=$this->getTab($index);
68 if (isset($tab))
69 return $tab->onShown($jsCode);
70 }
71
78 public function onHide($index, $jsCode) {
79 $tab=$this->getTab($index);
80 if (isset($tab))
81 return $tab->onShow($jsCode);
82 }
83
90 public function onHidden($index, $jsCode) {
91 $tab=$this->getTab($index);
92 if (isset($tab))
93 return $tab->onShow($jsCode);
94 }
95}
JQuery PHP library.
Definition JsUtils.php:23
Composant Twitter Bootstrap Tab.
Definition Tabs.php:13
onShow($index, $jsCode)
This event fires on tab show, but before the new tab has been shown.
Definition Tabs.php:54
onHidden($index, $jsCode)
This event fires after a new tab is shown (and thus the previous active tab is hidden).
Definition Tabs.php:90
onHide($index, $jsCode)
This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden).
Definition Tabs.php:78
onShown($index, $jsCode)
This event fires on tab show after a tab has been shown.
Definition Tabs.php:66