Ueditor.php 669 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace addons\ueditor;
  3. use think\Addons;
  4. /**
  5. * 百度Ueditor插件
  6. */
  7. class Ueditor 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. * @param $params
  27. */
  28. public function configInit(&$params)
  29. {
  30. $config = $this->getConfig();
  31. $params['ueditor'] = [
  32. 'classname' => $config['classname'] ?? '.editor',
  33. 'baiduMapAk' => $config['baiduMapAk'] ?? ''
  34. ];
  35. }
  36. }