PluginProbe
CSS & JavaScript Toolbox / 8.0.2
CSS & JavaScript Toolbox v8.0.2
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
css-javascript-toolbox / framework / view / block / parameter / grouper / tab / tab.php

tab.php in CSS & JavaScript Toolbox 8.0.2, at framework/view/block/parameter/grouper/tab/tab.php

87 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 /**
7 *
8 */
9 class CJT_Framework_View_Block_Parameter_Grouper_Tab_Tab {
10
11 /**
12 * put your comment there...
13 *
14 * @var mixed
15 */
16 protected $params = null;
17
18 /**
19 * put your comment there...
20 *
21 * @var mixed
22 */
23 protected $paramsView = array('enqueue' =>
24 array('scripts' => array(), 'styles' => array())
25 );
26
27 /**
28 * put your comment there...
29 *
30 * @param mixed $parameters
31 * @return CJT_Framework_View_Block_Parameter_Grouper_Tab
32 */
33 public function __construct($params) {
34 // Cache params list reference.
35 $this->params = $params;
36 // Cache styles and scripts to be enqueued.
37 foreach ($this->params as $groupKey => $group) {
38 foreach ($group['params'] as $param) {
39 $this->paramsView['enqueue']['scripts'] = array_merge($this->paramsView['enqueue']['scripts'], $param->enqueueScripts());
40 $this->paramsView['enqueue']['styles'] = array_merge($this->paramsView['enqueue']['styles'], $param->enqueueStyles());
41 }
42 }
43 }
44
45 /**
46 * put your comment there...
47 *
48 */
49 public function __toString() {
50 ob_start();
51 include 'index.phtml';
52 return ob_get_clean();
53 }
54
55 /**
56 * put your comment there...
57 *
58 */
59 public function enqueueScripts() {
60 return array_merge(array(
61 'jquery',
62 'jquery-ui-tabs'
63 ),
64 $this->paramsView['enqueue']['scripts']);
65 }
66
67 /**
68 * put your comment there...
69 *
70 */
71 public function enqueueStyles() {
72 return array_merge(array(
73 'framework:view:block:parameter:grouper:tab:public:css:tab',
74 'framework:css:jquery-ui-1.8.21.custom',
75 ),
76 $this->paramsView['enqueue']['styles']);
77 }
78
79 /**
80 * put your comment there...
81 *
82 */
83 public function getParams() {
84 return $this->params;
85 }
86
87 } // End class.