Returns all portal which matches the given portal-key and locale.
public findPortalInformationsByPortalKeyAndLocale ( string $portalKey, string $locale, string $environment ) : |
||
$portalKey | string | The portal-key which the portal should match |
$locale | string | The locale which the portal should match |
$environment | string | The environment in which the url should be searched |
return |
/** * {@inheritdoc} */ public function process(Request $request, RequestAttributes $requestAttributes) { if (!$request->get('_locale') && !$request->get('_portal')) { return new RequestAttributes(); } $portalInformations = $this->webspaceManager->findPortalInformationsByPortalKeyAndLocale($request->get('_portal'), $request->get('_locale'), $this->environment); if (!$portalInformations) { return new RequestAttributes(); } return new RequestAttributes(['portalInformation' => reset($portalInformations)]); }