1
- <?php namespace System \Console ;
1
+ <?php namespace Cms \Console ;
2
2
3
3
use File ;
4
4
use Cms \Classes \Theme ;
13
13
*
14
14
* This adds a new theme by requesting it from the Winter marketplace.
15
15
*
16
- * @package winter\wn-system -module
16
+ * @package winter\wn-cms -module
17
17
* @author Alexey Bobkov, Samuel Georges
18
18
*/
19
19
class ThemeInstall extends Command
@@ -36,6 +36,10 @@ class ThemeInstall extends Command
36
36
*/
37
37
public function handle ()
38
38
{
39
+ echo 'wtf ' ;
40
+ \Winter \Storm \Network \Http::post ('https://google.com/ ' );
41
+
42
+
39
43
$ themeName = $ this ->argument ('name ' );
40
44
$ argDirName = $ this ->argument ('dirName ' );
41
45
@@ -59,10 +63,14 @@ public function handle()
59
63
60
64
$ themeDetails = $ updateManager ->requestThemeDetails ($ themeName );
61
65
66
+ dd ('after requestThemeDetails ' );
67
+
62
68
if ($ themeManager ->isInstalled ($ themeDetails ['code ' ])) {
63
69
return $ this ->error (sprintf ('The theme %s is already installed. ' , $ themeDetails ['code ' ]));
64
70
}
65
71
72
+ dd ($ themeName );
73
+
66
74
if (Theme::exists ($ themeDetails ['code ' ])) {
67
75
return $ this ->error (sprintf ('A theme named %s already exists. ' , $ themeDetails ['code ' ]));
68
76
}
@@ -81,6 +89,8 @@ public function handle()
81
89
return ;
82
90
}
83
91
92
+ dd ($ themeName );
93
+
84
94
$ this ->info ('Downloading theme... ' );
85
95
$ updateManager ->downloadTheme ($ themeDetails ['code ' ], $ themeDetails ['hash ' ]);
86
96
@@ -104,12 +114,14 @@ public function handle()
104
114
105
115
$ dirName = $ argDirName ;
106
116
}
117
+ dd ($ themeName );
107
118
108
119
$ this ->info (sprintf ('The theme %s has been installed. (now %s) ' , $ themeDetails ['code ' ], $ dirName ));
109
- }
110
- catch (Exception $ ex ) {
120
+ } catch (\Throwable $ ex ) {
111
121
$ this ->error ($ ex ->getMessage ());
112
122
}
123
+
124
+ dd ($ themeName );
113
125
}
114
126
115
127
/**
0 commit comments