use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface;
class LogoutSuccessHandler implements LogoutSuccessHandlerInterface {
+ /**
+ * {@inheritdoc}
+ */
protected $router;
+ /**
+ * {@inheritdoc}
+ */
public function __construct(RouterInterface $router) {
$this->router = $router;
}
}
//Remove route and controller from route defaults
- unset($route['_route'], $route['_controller']);
+ unset($route['_route'], $route['_controller'], $route['_canonical_route']);
//Generate url
$url = $this->router->generate($name, $route);
}
//Remove route and controller from route defaults
- unset($route['_route'], $route['_controller']);
+ unset($route['_route'], $route['_controller'], $route['_canonical_route']);
//Generate url
$url = $this->router->generate($name, $route);
$defaults = $route->getDefaults();
//Remove route and controller from route defaults
- unset($defaults['_route'], $defaults['_controller']);
+ unset($defaults['_route'], $defaults['_controller'], $defaults['_canonical_route']);
//Generate url
$url = $this->router->generate($name, $defaults);