AddonDict.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\dict\addon;
  12. class AddonDict
  13. {
  14. /************************************************* 证书 *****************************************/
  15. const INSTALL = 'install';
  16. const UNINSTALL = 'uninstall';
  17. const UPDATE = 'update';
  18. const ON = 1;
  19. const OFF = 2;
  20. // 未执行
  21. const INSTALL_UNEXECUTED = 'unexecuted';
  22. // 执行中
  23. const INPROGRESS = 'inprogress';
  24. // 执行成功
  25. const INSTALL_SUCCESS = 'success';
  26. // 执行失败
  27. const INSTALL_FAIL = 'fail';
  28. /**
  29. * 插件操作方式
  30. * @return array
  31. */
  32. public static function getActionType()
  33. {
  34. return [
  35. self::INSTALL => get_lang('dict_addon.install'),
  36. self::UNINSTALL => get_lang('dict_addon.uninstall'),
  37. self::UPDATE => get_lang('dict_addon.update'),
  38. ];
  39. }
  40. /**
  41. * 状态
  42. * @return array
  43. */
  44. public static function getStatus()
  45. {
  46. return [
  47. self::ON => get_lang('dict_addon.status_on'),//展示
  48. self::OFF => get_lang('dict_addon.status_off'),//隐藏
  49. ];
  50. }
  51. const FRAMEWORK_KEY = 'niucloud-admin';
  52. const APP = 'app';
  53. const ADDON = 'addon';
  54. /**
  55. * 插件类型
  56. * @return array
  57. */
  58. public static function getType()
  59. {
  60. return [
  61. self::APP => get_lang('dict_addon.type_app'),//应用
  62. self::ADDON => get_lang('dict_addon.type_addon'),//插件
  63. ];
  64. }
  65. }