|
@@ -13,6 +13,7 @@ use SixShop\System\Config\ExtensionConfig;
|
|
|
use SixShop\System\Enum\ExtensionStatusEnum;
|
|
use SixShop\System\Enum\ExtensionStatusEnum;
|
|
|
use SixShop\System\Model\ExtensionConfigModel;
|
|
use SixShop\System\Model\ExtensionConfigModel;
|
|
|
use SixShop\System\Model\ExtensionModel;
|
|
use SixShop\System\Model\ExtensionModel;
|
|
|
|
|
+use think\Collection;
|
|
|
use think\db\Query;
|
|
use think\db\Query;
|
|
|
use think\exception\ValidateException;
|
|
use think\exception\ValidateException;
|
|
|
use think\facade\Cache;
|
|
use think\facade\Cache;
|
|
@@ -272,7 +273,7 @@ class ExtensionManager extends Service
|
|
|
return $this->extensionList;
|
|
return $this->extensionList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function getExtensionConfigForm(string $extensionID): array
|
|
|
|
|
|
|
+ public function getExtensionConfigForm(string $extensionID): Collection
|
|
|
{
|
|
{
|
|
|
$config = array_merge(ExtensionConfig::BASE, array_values($this->getExtension($extensionID)->getConfig()));
|
|
$config = array_merge(ExtensionConfig::BASE, array_values($this->getExtension($extensionID)->getConfig()));
|
|
|
$extensionConfig = ExtensionConfigModel::where('extension_id', $extensionID)->column(['value', 'type',], 'key', true);
|
|
$extensionConfig = ExtensionConfigModel::where('extension_id', $extensionID)->column(['value', 'type',], 'key', true);
|
|
@@ -298,9 +299,11 @@ class ExtensionManager extends Service
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- Event::trigger('after_read_extension_config', [$config, $extensionID]);
|
|
|
|
|
|
|
+ $configCollection = new Collection($config);
|
|
|
|
|
+ Event::trigger('after_read_extension_config', [$configCollection, $extensionID]);
|
|
|
|
|
+ Event::trigger('after_read_extension_config_'.$extensionID, [$configCollection]);
|
|
|
|
|
|
|
|
- return $config;
|
|
|
|
|
|
|
+ return $configCollection;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function migrations(string $id)
|
|
public function migrations(string $id)
|