Skip to content

Commit

Permalink
add posts & patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Mar 11, 2024
1 parent 6872c59 commit 02622aa
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 @@ -14,6 +14,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 @@ -128,6 +129,7 @@ final class Core extends AbstractModule
private array $requiredModules = [
Users::class,
Media::class,
Posts::class
];

public function getName(): string
Expand Down Expand Up @@ -163,8 +165,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 02622aa

Please sign in to comment.