File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515class ThemeComponent extends Theme
1616{
1717 public $ name = "Theme name " ;
18+
19+ public $ themeConfig = [];
1820}
Original file line number Diff line number Diff line change 1616 */
1717class ViewComponent extends View
1818{
19+ public $ isEnabled = true ;
1920 /**
2021 * @var array Availables app themes
2122 */
@@ -37,6 +38,11 @@ class ViewComponent extends View
3738
3839 public function init ()
3940 {
41+ if (!$ this ->isEnabled )
42+ {
43+ return parent ::init ();
44+ }
45+
4046 if (!$ this ->themes )
4147 {
4248 return parent ::init ();
@@ -52,12 +58,16 @@ public function init()
5258 return parent ::init ();
5359 }
5460
55- if (!isset ($ themeData ['class ' ]))
61+ /* if (!isset($themeData['class']))
5662 {
5763 $themeData['class'] = 'skeeks\cms\view\ThemeComponent';
64+ }*/
65+
66+ if (!isset ($ themeData ['themeConfig ' ])) {
67+ return parent ::init ();
5868 }
5969
60- $ this ->theme = $ themeData ;
70+ $ this ->theme = $ themeData[ ' themeConfig ' ] ;
6171
6272 return parent ::init ();
6373 }
You can’t perform that action at this time.
0 commit comments