RouteUrlResolver deprecated
class RouteUrlResolver implements UrlResolverInterface (View source)
deprecated
Class RouteUrlResolver.
\@package Concrete\Core\Url\Resolver
Properties
protected UrlGeneratorInterface | $generator | ||
protected RouteCollection | $routeList | ||
protected UrlResolverInterface | $pathUrlResolver |
Methods
No description
No description
No description
Resolve urls from the list of registered routes takes a string.
Details
__construct(UrlResolverInterface $path_url_resolver, UrlGeneratorInterface $generator, RouteCollection $route_list)
No description
UrlGeneratorInterface
getGenerator()
No description
RouteCollection
getRouteList()
No description
URLInterface|null
resolve(array $arguments, URLInterface|null $resolved = null)
Resolve urls from the list of registered routes takes a string.
[code] $url = \URL::to('route/user_route', array('id' => 1)); [/code]
OR
[code] // Register a route $route_list->register('/users/{id}', '\My\Application\User\Controller::view', 'user_route');
// Create a resolver $route_url_resolver = new \Concrete\Core\Url\Resolver\RouteUrlResolver($generator, $route_list);
// Retrieve the URL $url = $route_url_resolver->resolve(array('route/user_route', array('id' => 1))); [/code]