From c2dfe632e7990d61754dda832a95aeacbf3637a6 Mon Sep 17 00:00:00 2001 From: stasbilay02 Date: Thu, 24 Oct 2024 11:44:16 +0300 Subject: [PATCH] console msgs about modeule --- kernel/console/controllers/ModuleController.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/kernel/console/controllers/ModuleController.php b/kernel/console/controllers/ModuleController.php index 539b687..db59f58 100644 --- a/kernel/console/controllers/ModuleController.php +++ b/kernel/console/controllers/ModuleController.php @@ -24,7 +24,11 @@ class ModuleController extends ConsoleController if (file_exists(ROOT_DIR . $this->argv['path'])) { $moduleService = new ModuleService(); - $moduleService->installModule($this->argv['path']); + if ($moduleService->installModule($this->argv['path'])) { + $this->out->r("Модуль установлен", 'green'); + } else { + $this->out->r("Ошибка установки модуля", 'red'); + } } else { $this->out->r("Модуль не найден", 'red'); } @@ -42,6 +46,7 @@ class ModuleController extends ConsoleController if (file_exists(ROOT_DIR . $this->argv['path'])) { $moduleService = new ModuleService(); $moduleService->uninstallModule($this->argv['path']); + $this->out->r("Модуль удален", 'green'); } else { $this->out->r("Модуль не найден", 'red'); } @@ -59,6 +64,7 @@ class ModuleController extends ConsoleController if (file_exists(ROOT_DIR . $this->argv['path'])) { $moduleService = new ModuleService(); $moduleService->packModule($this->argv['path']); + $this->out->r("Модуль заархивирован", 'green'); } else { $this->out->r("Модуль не найден", 'red'); } @@ -74,7 +80,13 @@ class ModuleController extends ConsoleController } if (file_exists(ROOT_DIR . $this->argv['path'])) { $moduleService = new ModuleService(); - $moduleService->updateModule($this->argv['path']); + if ($moduleService->updateModule($this->argv['path'])) { + $this->out->r("Модуль обновлен", 'green'); + } else { + $this->out->r("Ошибка обновления модуля", 'red'); + } + } else { + $this->out->r("Модуль не найден", 'red'); } }