|
|
@@ -7,6 +7,7 @@ use SixShop\Core\ExtensionAbstract;
|
|
|
use SixShop\Core\Service\AutoloadService;
|
|
|
use SixShop\System\Cron\SystemCron;
|
|
|
use SixShop\System\Enum\ExtensionStatusEnum;
|
|
|
+use SixShop\System\Hook\DebugHook;
|
|
|
use SixShop\System\Hook\ExtensionStatusHook;
|
|
|
use SixShop\System\Hook\GatheringCrontabEventHook;
|
|
|
use SixShop\System\Service\FrontendDeployService;
|
|
|
@@ -24,10 +25,17 @@ class Extension extends ExtensionAbstract
|
|
|
|
|
|
public function getHooks(): array
|
|
|
{
|
|
|
- return [
|
|
|
+ $hooks = [
|
|
|
ExtensionStatusHook::class,
|
|
|
GatheringCrontabEventHook::class
|
|
|
];
|
|
|
+
|
|
|
+ // Debug 模式下添加 DebugHook
|
|
|
+ if (app()->isDebug()) {
|
|
|
+ $hooks[] = DebugHook::class;
|
|
|
+ }
|
|
|
+
|
|
|
+ return $hooks;
|
|
|
}
|
|
|
|
|
|
public function getCronJobs(): array
|