theme uninstall add
This commit is contained in:
@ -42,8 +42,24 @@ class AdminThemeController extends ConsoleController
|
||||
|
||||
$this->out->r("Тема " . $manifest['name'] . " установлена", 'green');
|
||||
}
|
||||
}
|
||||
|
||||
public function actionUninstallTheme(): void
|
||||
{
|
||||
if (!isset($this->argv['path'])) {
|
||||
throw new \Exception('Missing admin theme path "--path" specified');
|
||||
}
|
||||
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$themeName = basename($this->argv['path']);
|
||||
$fileHelper = new Files();
|
||||
$fileHelper->recursiveRemoveDir(ROOT_DIR . $this->argv['path']);
|
||||
$fileHelper->recursiveRemoveDir(RESOURCES_DIR . '/' . $themeName);
|
||||
|
||||
$this->out->r("Тема удалена", 'green');
|
||||
} else {
|
||||
$this->out->r("Тема не найдена", 'red');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -14,5 +14,6 @@ App::$collector->group(["prefix" => "migration"], callback: function (RouteColle
|
||||
|
||||
App::$collector->group(["prefix" => "admin-theme"], callback: function (RouteCollector $router){
|
||||
App::$collector->console('install', [\kernel\console\controllers\AdminThemeController::class, 'actionInstallTheme']);
|
||||
App::$collector->console('uninstall', [\kernel\console\controllers\AdminThemeController::class, 'actionUninstallTheme']);
|
||||
});
|
||||
|
||||
|
@ -27,13 +27,6 @@ $form->field(class: \itguild\forms\inputs\File::class, name: "icon_file", params
|
||||
->setLabel("Путь к иконке")
|
||||
->render();
|
||||
|
||||
$form->field(\itguild\forms\inputs\Checkbox::class, "hashing", params:[
|
||||
'value' => false
|
||||
// 'class' => "form-control"
|
||||
])
|
||||
->setLabel('Не хешировать')
|
||||
->render();
|
||||
|
||||
$form->field(class: \itguild\forms\inputs\TextInput::class, name: "icon_font", params: [
|
||||
'class' => "form-control",
|
||||
'value' => $model->icon_font ?? ''
|
||||
|
Reference in New Issue
Block a user