app module
This commit is contained in:
@ -4,14 +4,17 @@ namespace app\modules\tag;
|
||||
|
||||
use kernel\Module;
|
||||
use kernel\modules\menu\service\MenuService;
|
||||
use kernel\services\MigrationService;
|
||||
|
||||
class TagModule extends Module
|
||||
{
|
||||
|
||||
public MenuService $menuService;
|
||||
public MigrationService $migrationService;
|
||||
public function __construct()
|
||||
{
|
||||
$this->menuService = new MenuService();
|
||||
$this->migrationService = new MigrationService();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -19,6 +22,8 @@ class TagModule extends Module
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->migrationService->runAtPath("{KERNEL_APP_MODULES}/tag/migrations");
|
||||
|
||||
$this->menuService->createItem([
|
||||
"label" => "Тэги",
|
||||
"url" => "/admin/tag",
|
||||
|
8
app/modules/tag/controllers/TagController.php
Normal file
8
app/modules/tag/controllers/TagController.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace app\modules\tag\controllers;
|
||||
|
||||
class TagController extends \kernel\app_modules\tag\controllers\TagController
|
||||
{
|
||||
|
||||
}
|
@ -6,5 +6,6 @@
|
||||
"description": "Tags module",
|
||||
"module_path": "{APP}/modules/{slug}",
|
||||
"module_class": "app\\modules\\tag\\TagModule",
|
||||
"module_class_file": "{APP}/modules/tag/TagModule.php"
|
||||
"module_class_file": "{APP}/modules/tag/TagModule.php",
|
||||
"routs": "routs/tag.php"
|
||||
}
|
2
app/modules/tag/routs/tag.php
Normal file
2
app/modules/tag/routs/tag.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
include KERNEL_APP_MODULES_DIR . "/tag/routs/tag.php";
|
Reference in New Issue
Block a user