-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathEBootstrapTabWrapper.php
54 lines (47 loc) · 1.08 KB
/
EBootstrapTabWrapper.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* Wrapper for {@link EBootstrapTabNavigation} and {@link EBootstrapTabContentWrapper}
* This widget is used only if the navigation should not be positioned at the top
*
* @author Tim Helfensdörfer <[email protected]>
* @version 0.3.0
* @package bootstrap.widgets.tabs
*/
class EBootstrapTabWrapper extends EBootstrapWidget {
/**
* Position of the navigation
*
* Possible values: bottom|left|right
* Default: top
*/
public $position = '';
/**
* Init widget
*/
public function init() {
parent::init();
if (!empty($this->position)) {
switch ($this->position) {
case 'bottom':
echo EBootstrap::openTag('div', array('class' => 'tabbable tabs-below'));
break;
case 'left':
echo EBootstrap::openTag('div', array('class' => 'tabbable tabs-left'));
break;
case 'right':
echo EBootstrap::openTag('div', array('class' => 'tabbable tabs-right'));
break;
}
}
}
/**
* Render footer
*/
public function run() {
parent::run();
if (!empty($this->position)) {
echo EBootstrap::closeTag('div');
}
}
}
?>