get('router.route_provider'), $container->get('redirect.destination') ); } /** * {@inheritdoc} */ public function getOptions(RouteMatchInterface $route_match) { $options = parent::getOptions($route_match); // Append the current path or destination to the query string. $options['query']['destination'] = $this->redirectDestination->get(); return $options; } }