Uninstall.php 874 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace fectfurnilife\administer;
  3. use Yii;
  4. /**
  5. * 应用安装类
  6. * 您可以在这里添加类变量,在配置中的值可以注入进来。
  7. */
  8. class Uninstall implements \fecshop\services\extension\UninstallInterface
  9. {
  10. /**
  11. * @return mixed|void
  12. */
  13. public function run()
  14. {
  15. //$sql = "
  16. // DROP TABLE IF EXISTS `rf_addon_article1`;
  17. // DROP TABLE IF EXISTS `rf_addon_article_adv1`;
  18. //";
  19. // 执行sql, 创建表结构的时候,这个函数会返回0,因此不能以返回值作为return
  20. //Yii::$app->getDb()->createCommand($sql)->execute();
  21. if (!$this->removeImageFile()) {
  22. return false;
  23. }
  24. return true;
  25. }
  26. public function removeImageFile()
  27. {
  28. return Yii::$service->extension->administer->removeThemeFile();
  29. }
  30. }