printerMenu.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. /**
  3. * Author: 芸众商城 www.yunzshop.com
  4. * Date: 2018/12/6
  5. * Time: 11:35 AM
  6. */
  7. $printer_menu = [
  8. 'hotel_more_printer_list' => [
  9. 'name' => '打印机管理',
  10. 'url' => 'plugin.hotel.hotel.modules.moreprinter.printer.list.index',
  11. 'url_params' => '',
  12. 'permit' => 0,
  13. 'menu' => 1,
  14. 'icon' => 'fa-list',
  15. 'item' => 'hotel_more_printer_list',
  16. 'parents' => ['hotel_more_printer'],
  17. 'child' => [
  18. 'hotel_more_printer_add' => [
  19. 'name' => '添加',
  20. 'url' => 'plugin.hotel.hotel.modules.moreprinter.printer.operation.add',
  21. 'url_params' => '',
  22. 'permit' => 0,
  23. 'menu' => 0,
  24. 'icon' => '',
  25. 'item' => 'hotel_more_printer_add',
  26. 'parents' => ['hotel_more_printer', 'hotel_more_printer_list'],
  27. ],
  28. 'hotel_more_printer_edit' => [
  29. 'name' => '修改',
  30. 'url' => 'plugin.hotel.hotel.modules.moreprinter.printer.operation.edit',
  31. 'url_params' => '',
  32. 'permit' => 0,
  33. 'menu' => 0,
  34. 'icon' => '',
  35. 'item' => 'hotel_more_printer_edit',
  36. 'parents' => ['hotel_more_printer', 'hotel_more_printer_list'],
  37. ]
  38. ]
  39. ],
  40. 'hotel_more_temp_list' => [
  41. 'name' => '模板库管理',
  42. 'url' => 'plugin.hotel.hotel.modules.moreprinter.temp.list.index',
  43. 'url_params' => '',
  44. 'permit' => 0,
  45. 'menu' => 1,
  46. 'icon' => 'fa-list',
  47. 'item' => 'hotel_more_temp_list',
  48. 'parents' => ['hotel_more_printer'],
  49. 'child' => [
  50. 'hotel_more_temp_list_add' => [
  51. 'name' => '添加',
  52. 'url' => 'plugin.hotel.hotel.modules.moreprinter.temp.operation.add',
  53. 'url_params' => '',
  54. 'permit' => 0,
  55. 'menu' => 0,
  56. 'icon' => 'fa-clipboard',
  57. 'item' => 'hotel_more_temp_list_add',
  58. 'parents' => ['hotel_more_printer', 'hotel_more_temp_list'],
  59. ],
  60. 'hotel_more_temp_list_edit' => [
  61. 'name' => '修改',
  62. 'url' => 'plugin.hotel.hotel.modules.moreprinter.temp.operation.edit',
  63. 'url_params' => '',
  64. 'permit' => 0,
  65. 'menu' => 0,
  66. 'icon' => 'fa-clipboard',
  67. 'item' => 'hotel_more_temp_list_edit',
  68. 'parents' => ['hotel_more_printer', 'hotel_more_temp_list'],
  69. ],
  70. 'hotel_more_temp_list_temp' => [
  71. 'name' => '添加建',
  72. 'url' => 'plugin.more-printer.admin.temp.operation.tpl',
  73. 'url_params' => '',
  74. 'permit' => 0,
  75. 'menu' => 0,
  76. 'icon' => '',
  77. 'item' => 'hotel_more_temp_list_temp',
  78. 'parents' => ['hotel_more_printer', 'hotel_more_temp_list'],
  79. ]
  80. ]
  81. ],
  82. 'hotel_more_printer_set' => [
  83. 'name' => '打印机设置',
  84. 'url' => 'plugin.hotel.hotel.modules.moreprinter.set.index.index',
  85. 'url_params' => '',
  86. 'permit' => 0,
  87. 'menu' => 1,
  88. 'icon' => 'fa-cogs',
  89. 'item' => 'hotel_more_printer_set',
  90. 'parents' => ['hotel_more_printer'],
  91. 'child' => [
  92. 'hotel_more_printer_set_sub' => [
  93. 'name' => '提交',
  94. 'url' => 'plugin.hotel.hotel.modules.moreprinter.set.sub.index',
  95. 'url_params' => '',
  96. 'permit' => 0,
  97. 'menu' => 0,
  98. 'icon' => '',
  99. 'item' => 'hotel_more_printer_set_sub',
  100. 'parents' => ['hotel_more_printer', 'hotel_more_printer_set'],
  101. ]
  102. ]
  103. ]
  104. ];
  105. \app\backend\modules\menu\Menu::current()->setPluginMenu('hotel_more_printer', [
  106. 'name' => '多打印机',
  107. 'type' => 'tool',
  108. 'url' => 'plugin.hotel.hotel.modules.moreprinter.printer.list.index',// url 可以填写http 也可以直接写路由
  109. 'urlParams' => '',//如果是url填写的是路由则启用参数否则不启用
  110. 'permit' => 0,//如果不设置则不会做权限检测
  111. 'menu' => 1,//如果不设置则不显示菜单,子菜单也将不显示
  112. 'top_show' => 1,
  113. 'left_first_show' => 0,
  114. 'left_second_show' => 1,
  115. 'icon' => 'fa-print',//菜单图标
  116. 'list_icon' => 'printer',
  117. 'parents' => [],
  118. 'child' => $printer_menu
  119. ]);