[CORE][Router] Remove duplicate service for URL generation, as that is actually the same object

This commit is contained in:
2021-11-10 13:59:02 +00:00
parent 420ebcda26
commit dea9aa4dcf
2 changed files with 5 additions and 11 deletions

View File

@@ -63,13 +63,11 @@ abstract class Router
*/
public const NETWORK_PATH = UrlGeneratorInterface::NETWORK_PATH;
public static ?SymfonyRouter $router = null;
public static ?UrlGeneratorInterface $url_gen = null;
public static ?SymfonyRouter $router = null;
public static function setServices($rtr, $gen): void
public static function setRouter($rtr): void
{
self::$router = $rtr;
self::$url_gen = $gen;
self::$router = $rtr;
}
public static function isAbsolute(string $url)
@@ -84,7 +82,7 @@ abstract class Router
*/
public static function url(string $id, array $args = [], int $type = self::ABSOLUTE_PATH): string
{
return self::$url_gen->generate($id, $args, $type);
return self::$router->generate($id, $args, $type);
}
/**