templates controllers and module create in terminal

This commit is contained in:
2024-12-10 15:28:34 +03:00
parent fb39da53a6
commit 3c0b78ea56
5 changed files with 193 additions and 0 deletions

View File

@ -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);
}
}