/**
* @param string $name
*/
public function generate($name, array
$parameters =
[]): string
{ $path =
$this->router->
generate($name,
$parameters, RouterInterface::ABSOLUTE_PATH
);
$request =
$this->requestStack->
getMainRequest();
$basePath =
$request ?
$request->
getBasePath() : '';
$path =
$this->
removePrefix($path,
$basePath);
return self::DOMAIN_PLACEHOLDER .
$path . '#';
} public function replace(string
$content, string
$host, SalesChannelContext
$context): string
{ return Profiler::
trace('seo-url-replacer',
function D
) use ($content,
$host,
$context) { $matches =
[];
if (preg_match_all('/' . self::DOMAIN_PLACEHOLDER . '[^#]*#/',
$content,
$matches)) { $mapping =
$this->
createDefaultMapping($matches[0
]);