MicroFrameWork/kernel/modules/module_shop_client/ModuleShopClientModule.php
2024-10-29 14:53:52 +03:00

32 lines
707 B
PHP

<?php
namespace kernel\modules\module_shop_client;
use kernel\Module;
use kernel\modules\menu\service\MenuService;
class ModuleShopClientModule extends Module
{
public MenuService $menuService;
public function __construct()
{
$this->menuService = new MenuService();
}
/**
* @throws \Exception
*/
public function init(): void
{
$this->menuService->createItem([
"label" => "Магазин модулей",
"url" => "/admin/module_shop_client",
"slug" => "module_shop_client",
]);
}
public function deactivate(): void
{
$this->menuService->removeItemBySlug("module_shop_client");
}
}