MicroFrameWork/kernel/modules/option/OptionModule.php
2024-09-23 15:33:48 +03:00

33 lines
629 B
PHP

<?php
namespace kernel\modules\option;
use kernel\Module;
use kernel\modules\menu\service\MenuService;
class OptionModule extends Module
{
public MenuService $menuService;
public function __construct()
{
$this->menuService = new MenuService();
}
/**
* @throws \Exception
*/
public function init(): void
{
$this->menuService->createItem([
"label" => "Опции",
"url" => "/admin/option",
"slug" => "option"
]);
}
public function deactivate(): void
{
$this->menuService->removeItemBySlug("option");
}
}