Skip to content

Commit

Permalink
Update for signature changes in Ibexa 4.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed May 15, 2024
1 parent e079b9d commit 2929063
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions bundle/Routing/UrlAliasGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@ public function __construct(
$this->configResolver = $configResolver;
}

public function loadLocation($locationId): Location
public function loadLocation($locationId, ?array $languages = null): Location
{
$isSiteApiPrimaryContentView = $this->configResolver->getParameter('ng_site_api.site_api_is_primary_content_view');
$isSiteApiPrimaryContentView = $this->configResolver->getParameter(
'ng_site_api.site_api_is_primary_content_view',
);

if (!$isSiteApiPrimaryContentView) {
return parent::loadLocation($locationId);
return parent::loadLocation($locationId, $languages);
}

return $this->repository->sudo(
static fn (Repository $repository) => $repository->getLocationService()->loadLocation($locationId, []),
static fn (Repository $repository) => $repository->getLocationService()->loadLocation(
$locationId,
$languages,
),
);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"require": {
"php": ">=8.1",
"ext-dom": "*",
"ibexa/core": "^4.6",
"ibexa/core": "^4.6.5",
"ibexa/http-cache": "^4.6",
"ibexa/fieldtype-richtext": "^4.6",
"netgen/ibexa-search-extra": "^3.0",
Expand Down

0 comments on commit 2929063

Please sign in to comment.