kernel update
This commit is contained in:
@ -90,4 +90,33 @@ class ModuleController extends ConsoleController
|
||||
}
|
||||
}
|
||||
|
||||
public function actionConstructModule(): void
|
||||
{
|
||||
$this->out->r("Введите slug модуля:", 'yellow');
|
||||
$slug = substr(fgets(STDIN), 0, -1);
|
||||
$slug = strtolower($slug);
|
||||
|
||||
$this->out->r("Введите название модуля:", 'yellow');
|
||||
$name = substr(fgets(STDIN), 0, -1);
|
||||
|
||||
$this->out->r("Введите автора модуля:", 'yellow');
|
||||
$author = substr(fgets(STDIN), 0, -1);
|
||||
|
||||
$this->out->r("Введите название пунтка меню для модуля:", 'yellow');
|
||||
$label = substr(fgets(STDIN), 0, -1);
|
||||
|
||||
$moduleService = new ModuleService();
|
||||
$moduleService->createDirs($slug);
|
||||
|
||||
$moduleService->createModuleByParams([
|
||||
'slug' => $slug,
|
||||
'model' => ucfirst($slug),
|
||||
'author' => $author,
|
||||
'name' => $name,
|
||||
'label' => $label,
|
||||
]);
|
||||
|
||||
$this->out->r("Модуль $slug создан", 'green');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user