AddonConfig.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. namespace addons\TinyChannel;
  3. use common\components\BaseAddonConfig;
  4. use addons\TinyChannel\services\Application;
  5. use addons\TinyChannel\common\components\Bootstrap;
  6. /**
  7. * Class Addon
  8. * @package addons\TinyChannel
  9. */
  10. class AddonConfig extends BaseAddonConfig
  11. {
  12. /**
  13. * 基础信息
  14. *
  15. * @var array
  16. */
  17. public $info = [
  18. 'name' => 'TinyChannel',
  19. 'title' => '渠道',
  20. 'brief_introduction' => '管理微信公众号、微信小程序、字节小程序等渠道',
  21. 'description' => '',
  22. 'author' => '简言',
  23. 'version' => '1.0.0',
  24. ];
  25. /**
  26. * 前置插件
  27. *
  28. * @var array
  29. */
  30. public $preposition = [
  31. 'Wechat' => '微信公众号',
  32. // 'WechatMini' => '微信小程序',
  33. ];
  34. /**
  35. * 应用配置
  36. *
  37. * 例如:菜单设置/权限设置/快捷入口
  38. *
  39. * @var array
  40. */
  41. public $appsConfig = [
  42. 'backend' => 'common/config/backend.php',
  43. 'frontend' => 'common/config/frontend.php',
  44. 'merchant' => 'common/config/merchant.php',
  45. 'html5' => 'common/config/html5.php',
  46. 'api' => 'common/config/api.php',
  47. 'oauth2' => 'common/config/oauth2.php',
  48. ];
  49. /**
  50. * 引导文件
  51. *
  52. * 设置后系统会在执行插件控制器前执行
  53. *
  54. * @var Bootstrap
  55. */
  56. // public $bootstrap = Bootstrap::class;
  57. /**
  58. * 服务层
  59. *
  60. * 设置后系统会自动注册
  61. *
  62. * 调用方式
  63. *
  64. * Yii::$app->插件名称 + Services
  65. *
  66. * 例如
  67. *
  68. * Yii::$app->tinyShopServices;
  69. *
  70. * @var Application
  71. */
  72. // public $service = Application::class;
  73. /**
  74. * 商户路由映射
  75. *
  76. * 开启后无需再去后台应用端去开发程序,直接映射商家应用的控制器方法过去,菜单权限还需要单独配置
  77. *
  78. * @var bool
  79. */
  80. public $isMerchantRouteMap = false;
  81. /**
  82. * 类别
  83. *
  84. * @var string
  85. * [
  86. * 'plug' => "功能插件",
  87. * 'business' => "主要业务",
  88. * 'customer' => "客户关系",
  89. * 'activity' => "营销及活动",
  90. * 'services' => "常用服务及工具",
  91. * 'biz' => "行业解决方案",
  92. * 'h5game' => "小游戏",
  93. * 'other' => "其他",
  94. * ]
  95. */
  96. public $group = 'plug';
  97. /**
  98. * 保存在当前模块的根目录下面
  99. *
  100. * 例如 $install = 'Install';
  101. * 安装类
  102. * @var string
  103. */
  104. public $install = 'Install';
  105. /**
  106. * 卸载SQL类
  107. *
  108. * @var string
  109. */
  110. public $uninstall = 'UnInstall';
  111. /**
  112. * 更新SQL类
  113. *
  114. * @var string
  115. */
  116. public $upgrade = 'Upgrade';
  117. }
粤ICP备19079148号