public function RedirectDestination::__construct in Bakery Single Sign-On System 8.2
Constructs a new RedirectDestination instance.
Parameters
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The URL generator.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Configuration factory.
\Drupal\Core\Routing\RedirectDestinationInterface|null $destination: Core destination redirect destination service.
File
- src/
RedirectDestination.php, line 61
Class
Namespace
Drupal\bakeryCode
public function __construct(RequestStack $request_stack, UrlGeneratorInterface $url_generator, ConfigFactoryInterface $config_factory, RedirectDestinationInterface $destination = NULL) {
$this->requestStack = $request_stack;
$this->urlGenerator = $url_generator;
$this->config = $config_factory
->get('bakery.settings');
$this->redirectDestination = $destination ?? \Drupal::destination();
}