module tabs widget

This commit is contained in:
2024-11-05 15:36:46 +03:00
parent 825d3df776
commit 9a152885d8
7 changed files with 38 additions and 47 deletions

View File

@ -1,32 +0,0 @@
<?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");
}
}

View File

@ -4,8 +4,6 @@
"author": "ITGuild",
"slug": "module_shop_client",
"description": "Module shop client module",
"module_class": "kernel\\modules\\module_shop_client\\ModuleShopClientModule",
"module_class_file": "{KERNEL_MODULES}/module_shop_client/ModuleShopClientModule.php",
"routs": "routs/module_shop_client.php",
"migration_path": "migrations",
"dependence": "menu"

View File

@ -50,4 +50,6 @@ $table->addAction(function ($row, $url) use ($moduleService){
$table->create();
\kernel\widgets\ModuleTabsWidget::create()->run();
$table->render();