administration, $this->securityUser, $this->em, $this->accountQueryFactory ); $portal->addRoute('sign/in', [ 'presenter' => 'Sign', 'action' => 'in', ]); $portal->addRoute('sign/out', [ 'presenter' => 'Sign', 'action' => 'out', ]); $portal->addRoute('sign/new-password', [ 'presenter' => 'Sign', 'action' => 'newPassword', ]); if ($this->administration->isLostPasswordEnabled()) { $portal->addRoute('sign/lost-password', [ 'presenter' => 'Sign', 'action' => 'lostPassword', ]); } $routeList[] = $portal = new FancyAdminRouteList( 'PortalCustomer', $this->administration, $this->securityUser, $this->em, $this->accountQueryFactory ); $portal->addCustomerRoute('/[/][/]', [ 'presenter' => 'Home', 'action' => 'default', ]); $routeList[] = $portal = new FancyAdminRouteList( 'PortalBackoffice', $this->administration, $this->securityUser, $this->em, $this->accountQueryFactory ); $portal->addRoute('[/][/]', [ 'presenter' => 'Home', 'action' => 'default', ]); return $routeList; } public function createFilterByQueryObject(BaseQuery $query): array { return [ RouteAlias::FilterIn => function ($entity) use ($query) { if ($entity = $query->byId($entity)->fetchOneOrNull()) { return $entity; } throw new BadRequestException(httpCode: IResponse::S404_NotFound); }, RouteAlias::FilterOut => fn(Entity $entity) => $entity->getId() ]; } }