use Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult;
use Shopware\Core\Framework\Log\Package;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
#[Package('core')]
abstract class JsonFactoryBase implements ResponseFactoryInterface
{ public function createRedirectResponse(EntityDefinition
$definition, string
$id, Request
$request, Context
$context): Response
{ $headers =
[ 'Location' =>
$this->
getEntityBaseUrl($request,
$definition) . '/' .
$id,
];
return new Response(null, Response::HTTP_NO_CONTENT,
$headers);
} abstract protected function getApiBaseUrl(Request
$request): string;
protected function getEntityBaseUrl(Request
$request, EntityDefinition
$definition): string
{ $apiCase =
$this->
getApiBaseUrl($request);