Returns the Request object that will be forwarded to the kernel for previewing the content.
protected getForwardRequest ( eZ\Publish\API\Repository\Values\Content\Location $location, eZ\Publish\API\Repository\Values\Content\Content $content, |
||
$location | eZ\Publish\API\Repository\Values\Content\Location | |
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$previewSiteAccess | ||
$request | ||
$language | string | |
Résultat |
protected function getForwardRequest(Location $location, Content $content, SiteAccess $previewSiteAccess) { $request = parent::getForwardRequest($location, $content, $previewSiteAccess); // If the preview siteaccess is configured in legacy_mode, we forward to the LegacyKernelController. if ($this->configResolver->getParameter('legacy_mode', 'ezsettings', $previewSiteAccess->name)) { $request->attributes->set('_controller', 'ezpublish_legacy.controller:indexAction'); } return $request; }
protected function getForwardRequest(Location $location, Content $content, SiteAccess $previewSiteAccess, Request $request, $language) { $request = parent::getForwardRequest($location, $content, $previewSiteAccess, $request, $language); $overrideViewAction = $this->configResolver->getParameter('override_url_alias_view_action', 'netgen_ez_platform_site_api'); // If the preview siteaccess is configured in legacy_mode // we forward to the LegacyKernelController. // For compatibility with eZ Publish Legacy if ($this->isLegacyModeSiteAccess($previewSiteAccess->name)) { $request->attributes->set('_controller', 'ezpublish_legacy.controller:indexAction'); } elseif ($overrideViewAction) { $request->attributes->set('_controller', UrlAliasRouter::OVERRIDE_VIEW_ACTION); $this->injectSiteApiValueObjects($request, $language); } return $request; }