Skip to content

Commit

Permalink
add change
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Oct 14, 2023
1 parent 2f8a0a7 commit 3a4d22d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
9 changes: 5 additions & 4 deletions Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ protected function doInit(): void
}

$this->didInit = true;

$this->doRegisterEntities();

$manager = $this->getManager();
Expand Down Expand Up @@ -138,6 +137,7 @@ protected function doInit(): void
$this->{'priorityRecords'}[$name] = $priority;
$this->{'modules'}[$name] = $module;
});

// @dispatch(coreModule.beforeRegisterModules)
$manager->dispatch('coreModule.beforeRegisterModules', $this);
try {
Expand Down Expand Up @@ -228,15 +228,16 @@ private function doInitSubModules(): void
try {
foreach ($this->priorities as $module => $p) {
// @detach(coreModule.beforeInitModules)
$manager->dispatch('coreModule.beforeInitModule', $this, $module, $p);
$manager->dispatch('coreModule.beforeInitModule', $this, $this->subModules[$module], $p);
try {
$this->subModules[$module]->init();
// @detach(coreModule.initModule)
$manager->dispatch('coreModule.initModule', $this, $module, $p);
$manager->dispatch('coreModule.initModule', $this, $this->subModules[$module], $p);
} finally {
// @detach(coreModule.afterInitModule)
$manager->dispatch('coreModule.afterInitModule', $this, $module, $p);
$manager->dispatch('coreModule.afterInitModule', $this, $this->subModules[$module], $p);
}
unset($this->subModules[$module]);
}
// @detach(coreModule.afterInitModules)
$manager->dispatch('coreModule.initModules', $this);
Expand Down
30 changes: 7 additions & 23 deletions SubModules/Assets/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private function registerFactoryAssets(): void
$attributes = $list;
$script->registerURL(
$name,
(string)$url,
$url,
$attributes,
...array_filter($inherits, 'is_string')
);
Expand Down Expand Up @@ -160,12 +160,6 @@ private function contentFooterEvent(): void
}

const CSS = [
// https://necolas.github.io/normalize.css/
'normalize' => [
'url' => '/assets/core/css/normalize.css',
'version' => '8.0.1',
'inherits' => [],
],
// https://grapesjs.com/
"grapesjs" => [
'url' => 'https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.12.17/css/grapes.min.css',
Expand Down Expand Up @@ -206,7 +200,7 @@ private function contentFooterEvent(): void
const JS = [
// http://jquery.com/
'jquery' => [
'url' => '/assets/core/js/jquery.min.js',
'url' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js',
'version' => '3.7.1',
'inherits' => [],
],
Expand Down Expand Up @@ -240,16 +234,6 @@ private function contentFooterEvent(): void
'version' => '3.17.1',
'inherits' => [],
],
'events' => [
'url' => '/assets/core/js/events.min.js',
'version' => '1.0.0',
'inherits' => [],
],
'upload-chunk' => [
'url' => '/assets/core/js/upload-chunk.min.js',
'version' => '1.0.0',
'inherits' => [],
],
];

const PACKAGE = [
Expand All @@ -258,6 +242,11 @@ private function contentFooterEvent(): void
'grapesjs' => []
],
],
'uikit' => [
'css' => [
'uikit' => []
],
],
'cropper' => [
'css' => [
'cropper' => []
Expand All @@ -273,10 +262,5 @@ private function contentFooterEvent(): void
'codemirror' => []
],
],
'uikit' => [
'css' => [
'uikit' => []
],
],
];
}

0 comments on commit 3a4d22d

Please sign in to comment.