@@ -32,58 +32,48 @@ public function __construct()
32
32
),
33
33
'jquery ' => array (
34
34
'js ' => array (
35
- 'file1 '
36
- ),
37
- 'css ' => array (
38
- 'file1 '
39
- )
35
+ 'public/components/jquery/dist/jquery.min.js '
36
+ ),
40
37
),
41
38
'jquery-ui ' => array (
42
39
'js ' => array (
43
- 'file1 '
40
+ 'public/components/jquery-ui/jquery-ui.min.js '
44
41
),
45
42
'css ' => array (
46
- 'file1 '
43
+ 'public/components/jquery-ui/themes/base/theme.css '
47
44
)
48
45
),
49
46
'jquery-file-upload ' => array (
50
47
'js ' => array (
51
- 'file1 '
52
- ),
53
- 'css ' => array (
54
- 'file1 '
55
- )
56
- ),
48
+ 'public/components/jquery-file-upload/jquery.fileupload.js '
49
+ )
50
+ ),
57
51
'fontawesome ' => array (
58
- 'js ' => array (
59
- 'file1 '
60
- ),
61
52
'css ' => array (
62
- 'file1 '
53
+ 'public/components/font-awesome/css/font-awesome.min.css '
63
54
)
64
55
),
65
56
'chartjs ' => array (
66
57
'js ' => array (
67
- 'file1 '
68
- ),
69
- 'css ' => array (
70
- 'file1 '
71
- )
58
+ 'public/components/chartjs/Chart.min.js '
59
+ ),
72
60
),
73
61
'select2 ' => array (
74
62
'js ' => array (
75
- 'file1 '
63
+ 'public/components/select2/select2.min.js '
76
64
),
77
65
'css ' => array (
78
- 'file1 '
66
+ 'public/components/select2/select2.css ' ,
67
+ 'public/components/select2/select2-bootstrap.css '
79
68
)
80
69
),
81
70
'tinymce ' => array (
82
71
'js ' => array (
83
- 'file1 '
72
+ 'public/components/tinymce-dist/jquery.tinymce.min.js ' ,
73
+ 'public/components/tinymce-dist/tinymce.min.js '
84
74
),
85
75
'css ' => array (
86
- 'file1 '
76
+ 'public/components/tinymce-dist/themes/modern/theme.min.js '
87
77
)
88
78
),
89
79
);
@@ -100,6 +90,26 @@ public function getPackage($name)
100
90
return false ;
101
91
}
102
92
93
+ /**
94
+ * Gets a set of packages from the package system
95
+ * @param array $packageList The list of packages to be retrieved
96
+ * @return array|bool Returns an array if the packages are found, false if nothing is found or invalid input.
97
+ */
98
+ public function getPackages (array $ packageList )
99
+ {
100
+ $ css = array (); $ js = array ();
101
+ foreach ($ packageList as $ package )
102
+ {
103
+ $ item = $ this ->getPackage [$ package ];
104
+ if ($ item != false )
105
+ {
106
+ if (is_array ($ item ['css ' ])) array_merge ($ css , $ item ['css ' ]);
107
+ if (is_array ($ item ['js ' ])) array_merge ($ js , $ item ['js ' ]);
108
+ }
109
+ }
110
+ return array ('css ' => $ css , 'js ' => $ js );
111
+ }
112
+
103
113
/**
104
114
* Adds a package to the package system
105
115
* @param string $name The name for the package
0 commit comments