igfs/kernel/modules/admin_themes/AdminThemesModule.php
2024-09-23 17:03:42 +03:00

34 lines
730 B
PHP

<?php
namespace kernel\modules\admin_themes;
use kernel\Module;
use kernel\modules\menu\service\MenuService;
class AdminThemesModule extends Module
{
public MenuService $menuService;
public function __construct()
{
$this->menuService = new MenuService();
}
/**
* @throws \Exception
*/
public function init(): void
{
$this->menuService->createItem([
"label" => "Темы админпанели",
"url" => "/admin/settings/admin-themes",
"slug" => "admin-themes",
"parent_slug" => "settings"
]);
}
public function deactivate(): void
{
$this->menuService->removeItemBySlug("admin-themes");
}
}