Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ArrayAccess/TrayDigita-Core-Module
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Jul 14, 2024
2 parents 6094ca1 + 02622aa commit ec5a1ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use ArrayAccess\TrayDigita\App\Modules\Media\Entities\Attachment;
use ArrayAccess\TrayDigita\App\Modules\Media\Entities\UserAttachment;
use ArrayAccess\TrayDigita\App\Modules\Media\Media;
use ArrayAccess\TrayDigita\App\Modules\Posts\Posts;
use ArrayAccess\TrayDigita\App\Modules\Users\Entities\Admin;
use ArrayAccess\TrayDigita\App\Modules\Users\Entities\AdminLog;
use ArrayAccess\TrayDigita\App\Modules\Users\Entities\AdminMeta;
Expand Down Expand Up @@ -125,6 +126,7 @@ final class Core extends AbstractModule
private array $requiredModules = [
Users::class,
Media::class,
Posts::class
];

public function getName(): string
Expand Down Expand Up @@ -161,8 +163,6 @@ protected function doInit(): void
}
Consolidation::registerAutoloader(__NAMESPACE__, __DIR__);
$this->didInit = true;
$kernel = $this->getKernel();
$kernel->registerControllerDirectory(__DIR__ .'/Controllers');
$this->getTranslator()?->registerDirectory('module', __DIR__ . '/Languages');
$this->getConnection()->registerEntityDirectory(__DIR__ . '/Entities');

Expand Down
3 changes: 3 additions & 0 deletions SubModules/Service/Middlewares/InitMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ static function ($response) use ($language) {
$view = $this->serviceInitializer->core->getView();
$view->setRequest($request);
$view->setParameter('language', $selectedLanguage);

// add controller
$this->serviceInitializer->getKernel()->registerControllerDirectory(__DIR__ .'/../Controllers');
return $request;
}

Expand Down

0 comments on commit ec5a1ae

Please sign in to comment.