Editpage.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace addons\editpage;
  3. use think\Addons;
  4. /**
  5. * 插件
  6. */
  7. class Editpage extends Addons
  8. {
  9. /**
  10. * 插件安装方法
  11. * @return bool
  12. */
  13. public function install()
  14. {
  15. return true;
  16. }
  17. /**
  18. * 插件卸载方法
  19. * @return bool
  20. */
  21. public function uninstall()
  22. {
  23. return true;
  24. }
  25. /**
  26. * 插件启用方法
  27. * @return bool
  28. */
  29. public function enable()
  30. {
  31. return true;
  32. }
  33. /**
  34. * 插件禁用方法
  35. * @return bool
  36. */
  37. public function disable()
  38. {
  39. return true;
  40. }
  41. /**
  42. * @param $params
  43. */
  44. public function configInit(&$params)
  45. {
  46. $config['app_debug'] = config('app_debug');
  47. $config['controller'] = request()->controller();
  48. $config['action'] = request()->action();
  49. $config['module'] = request()->module();
  50. $config['index'] = url('editpage/index');
  51. $config['command'] = url('editpage/command');
  52. $params['editpage'] = $config;
  53. }
  54. }