| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace addons\HuijuBill;
- use Yii;
- use yii\db\Migration;
- use common\helpers\MigrateHelper;
- use common\interfaces\AddonWidget;
- use common\logic\middleground\Core;
- use Exception;
- /**
- * 安装
- *
- * Class Install
- * @package addons\HuijuBill
- */
- class Install extends Migration implements AddonWidget
- {
- /**
- * @param $addon
- * @return mixed|void
- * @throws \yii\base\InvalidConfigException
- * @throws \yii\web\NotFoundHttpException
- * @throws \yii\web\UnprocessableEntityHttpException
- */
- public function run($addon)
- {
- // MigrateHelper::upByPath([
- // '@addons/HuijuBill/console/migrations/'
- // ]);
- }
- public function runApp($mall_id, $addons_name)
- {
- // 商城应用市场安装时的初始化
- try {
- (new Core())->check($mall_id);
- } catch (Exception $e) {
- $msg = "安装插件初始化错误:" . $e->getMessage();
- Yii::error($msg);
- throw new Exception($msg);
- }
- }
- }
|