protected function injectSiteApiValueObjects(Request $request, $language)
    {
        /** @var \eZ\Publish\API\Repository\Values\Content\Content $content */
        /** @var \eZ\Publish\API\Repository\Values\Content\Location $location */
        $content = $request->attributes->get('content');
        $location = $request->attributes->get('location');

        $siteContent = $this->loadService->loadContent(
            $content->id,
            $content->versionInfo->versionNo,
            $language
        );

        if (!$location->isDraft()) {
            $siteLocation = $this->loadService->loadLocation($location->id);
        } else {
            $siteLocation = new SiteLocation([
                'contentInfo' => $siteContent->contentInfo,
                'innerLocation' => $location,
            ]);
        }

        $requestParams = $request->attributes->get('params');
        $requestParams['content'] = $siteContent;
        $requestParams['location'] = $siteLocation;

        $request->attributes->set('content', $siteContent);
        $request->attributes->set('location', $siteLocation);
        $request->attributes->set('params', $requestParams);
    }