templates controllers and module create in terminal
This commit is contained in:
@ -90,4 +90,28 @@ class ModuleController extends ConsoleController
|
||||
}
|
||||
}
|
||||
|
||||
public function actionConstructModule(): void
|
||||
{
|
||||
$this->out->r("Введите название модуля:", 'yellow');
|
||||
$name = substr(fgets(STDIN), 0, -1);
|
||||
|
||||
$this->out->r("Введите автора модуля:", 'yellow');
|
||||
$author = substr(fgets(STDIN), 0, -1);
|
||||
|
||||
$slug = strtolower($name);
|
||||
|
||||
$moduleService = new ModuleService();
|
||||
$moduleService->createDirs($slug);
|
||||
|
||||
$moduleService->createManifest([
|
||||
'name' => $name,
|
||||
'author' => $author,
|
||||
'slug' => $slug
|
||||
]);
|
||||
|
||||
$moduleService->createControllers($slug);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user