Install.php 872 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace addons\Community;
  3. use addons\Community\common\service\InitService;
  4. use common\models\common\Region;
  5. use Yii;
  6. use yii\db\Migration;
  7. use common\helpers\MigrateHelper;
  8. use common\interfaces\AddonWidget;
  9. use yii\helpers\Json;
  10. /**
  11. * 安装
  12. *
  13. * Class Install
  14. * @package addons\Community
  15. */
  16. class Install extends Migration implements AddonWidget
  17. {
  18. /**
  19. * @param $addon
  20. * @return mixed|void
  21. * @throws \yii\base\InvalidConfigException
  22. * @throws \yii\web\NotFoundHttpException
  23. * @throws \yii\web\UnprocessableEntityHttpException
  24. */
  25. public function run($addon)
  26. {
  27. // MigrateHelper::upByPath([
  28. // '@addons/Community/console/migrations/'
  29. // ]);
  30. }
  31. public function runApp($mall_id, $addons_name){
  32. // 商城应用市场安装时的初始化
  33. InitService::init($mall_id);
  34. }
  35. }