Skip to content

Commit

Permalink
[Tests] add baseUrl to slug routes
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed Aug 23, 2023
1 parent 55c808f commit 36b2e7d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public function generate(object $object, array $params = []): string
throw new LinkGenerationNotPossibleException(sprintf('No Valid Slug found for object "%s"', $object->getFullPath()));
}

return $slug ? $slug->getSlug() : $fallbackSlug->getSlug();
$basePath = $this->requestStack->getMainRequest()->getBaseUrl();

return sprintf('%s%s', $basePath, $slug ? $slug->getSlug() : $fallbackSlug->getSlug());
}
}

0 comments on commit 36b2e7d

Please sign in to comment.