122 lines
4.9 KiB
PHP
122 lines
4.9 KiB
PHP
<?php
|
|
namespace Yunshop\CollectionRoom;
|
|
|
|
|
|
|
|
|
|
use Yunshop\CollectionRoom\models\CollectionRoomIdentifierModel;
|
|
|
|
class PluginApplication extends \app\common\services\PluginApplication{
|
|
|
|
protected function setMenuConfig(){
|
|
\app\backend\modules\menu\Menu::current()->setPluginMenu('collection-room', [
|
|
'name' => '典藏室',
|
|
'type' => 'marketing',
|
|
'url' => 'plugin.collection-room.admin.index.index',// url 可以填写http 也可以直接写路由
|
|
'url_params' => '',//如果是url填写的是路由则启用参数否则不启用
|
|
'permit' => 1,//如果不设置则不会做权限检测
|
|
'menu' => 1,//如果不设置则不显示菜单,子菜单也将不显示
|
|
'icon' => '',//菜单图标
|
|
'list_icon' => 'collection-room',
|
|
'parents' => [],
|
|
'top_show' => 0,
|
|
'left_first_show' => 0,
|
|
'left_second_show' => 1,
|
|
'child' => [
|
|
'plugin_collection_room_index' => [
|
|
'name' => '画列表',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'icon' => '',
|
|
'url' => 'plugin.collection-room.admin.index.index',
|
|
'url_params' => '',
|
|
'item' => 'plugin_collection_room_index',
|
|
'parents' => ['collection-room'],
|
|
'child' => [
|
|
// 权限补充
|
|
'plugin_collection_room_index_index' => [
|
|
'name' => '画列表',
|
|
'url' => 'plugin.collection-room.admin.index.index',
|
|
'url_params' => '',
|
|
'permit' => 1,
|
|
'menu' => 0,
|
|
'icon' => '',
|
|
'item' => 'plugin_collection_room_index_index',
|
|
'parents' => ['collection-room','plugin_collection_room_index']
|
|
],
|
|
'plugin_collection_room_index_editinfo' => [
|
|
'name' => '画编辑',
|
|
'url' => 'plugin.collection-room.admin.index.editInfo',
|
|
'url_params' => '',
|
|
'permit' => 1,
|
|
'menu' => 0,
|
|
'icon' => '',
|
|
'item' => 'plugin_collection_room_index_editinfo',
|
|
'parents' => ['collection-room','plugin_collection_room_index']
|
|
],
|
|
]
|
|
],
|
|
'plugin_collection_room_identifier' => [
|
|
'name' => '编号管理',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'icon' => '',
|
|
'url' => 'plugin.collection-room.admin.identifier.index',
|
|
'url_params' => '',
|
|
'item' => 'plugin_collection_room_identifier',
|
|
'parents' => ['collection-room'],
|
|
'child' => [
|
|
// 权限补充
|
|
'plugin_collection_room_identifier_index' => [
|
|
'name' => '编号管理',
|
|
'url' => 'plugin.collection-room.admin.index.index',
|
|
'url_params' => '',
|
|
'permit' => 1,
|
|
'menu' => 0,
|
|
'icon' => '',
|
|
'item' => 'plugin_collection_room_identifier_index',
|
|
'parents' => ['collection-room','plugin_collection_room_identifier']
|
|
]
|
|
]
|
|
],
|
|
'plugin_collection_room_set' => [
|
|
'name' => '基本设置',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'icon' => '',
|
|
'url' => 'plugin.collection-room.admin.index.set',
|
|
'url_params' => '',
|
|
'parents' => ['collection-room'],
|
|
'child' => [
|
|
// 权限补充
|
|
'plugin_collection_room_index_set' => [
|
|
'name' => '基本设置',
|
|
'url' => 'plugin.collection-room.admin.index.set',
|
|
'url_params' => '',
|
|
'permit' => 1,
|
|
'menu' => 0,
|
|
'icon' => '',
|
|
'item' => 'plugin_collection_room_index_set',
|
|
'parents' => ['collection-room', 'plugin_collection_room_set'],
|
|
],
|
|
]
|
|
],
|
|
]
|
|
]);
|
|
}
|
|
|
|
public function register(){
|
|
CollectionRoomIdentifierModel::createDefaultData();
|
|
|
|
}
|
|
|
|
|
|
public function boot(){
|
|
$events = app('events');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} |