Simditor.php 666 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace addons\simditor;
  3. use app\common\library\Menu;
  4. use think\Addons;
  5. /**
  6. * 插件
  7. */
  8. class Simditor extends Addons
  9. {
  10. /**
  11. * 插件安装方法
  12. * @return bool
  13. */
  14. public function install()
  15. {
  16. return true;
  17. }
  18. /**
  19. * 插件卸载方法
  20. * @return bool
  21. */
  22. public function uninstall()
  23. {
  24. return true;
  25. }
  26. public function upgrade()
  27. {
  28. return true;
  29. }
  30. /**
  31. * @param $params
  32. */
  33. public function configInit(&$params)
  34. {
  35. $config = $this->getConfig();
  36. $params['simditor'] = ['classname' => $config['classname'] ?? '.editor'];
  37. }
  38. }