1 | <?php |
||
7 | class WidgetGenerator extends LaravelGeneratorCommand |
||
8 | { |
||
9 | /** |
||
10 | * The name and signature of the console command. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $signature = 'make:widget {name : The name of the widget class} {--p|plain}'; |
||
15 | |||
16 | /** |
||
17 | * The console command description. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $description = 'Create a new widget class'; |
||
22 | |||
23 | /** |
||
24 | * String to store the command type. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $type = 'Widget Class'; |
||
29 | |||
30 | /** |
||
31 | * Execute the console command. |
||
32 | * |
||
33 | * @return void |
||
34 | */ |
||
35 | public function fire() |
||
43 | |||
44 | /** |
||
45 | * Create a new view file for the widget. |
||
46 | * |
||
47 | * return void |
||
48 | */ |
||
49 | private function createView() |
||
63 | |||
64 | /** |
||
65 | * Get the stub file for the generator. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | protected function getStub() |
||
74 | |||
75 | /** |
||
76 | * Get the default namespace for the class. |
||
77 | * |
||
78 | * @param string $rootNamespace |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | protected function getDefaultNamespace($rootNamespace) |
||
86 | |||
87 | |||
88 | /** |
||
89 | * Get the console command options. |
||
90 | * |
||
91 | * @return array |
||
92 | */ |
||
93 | protected function getOptions() |
||
99 | |||
100 | /** |
||
101 | * @return mixed|string |
||
102 | */ |
||
103 | private function _getViewPath() |
||
110 | |||
111 | /** |
||
112 | * Creates the widget class |
||
113 | * @return bool |
||
114 | */ |
||
115 | private function _makeWidgetClass() |
||
139 | |||
140 | /** |
||
141 | * @return string |
||
142 | */ |
||
143 | private function _getViewStub() |
||
147 | } |
||
148 |