protected function WebformSubmissionForm::setTrustedRedirectUrl in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::setTrustedRedirectUrl()
Set webform state to redirect to a trusted redirect response.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
\Drupal\Core\Url $url: A URL object.
1 call to WebformSubmissionForm::setTrustedRedirectUrl()
- WebformSubmissionForm::setConfirmation in src/
WebformSubmissionForm.php - Set webform state confirmation redirect and message.
File
- src/
WebformSubmissionForm.php, line 2293
Class
- WebformSubmissionForm
- Provides a webform to collect and edit submissions.
Namespace
Drupal\webformCode
protected function setTrustedRedirectUrl(FormStateInterface $form_state, Url $url) {
$form_state
->setResponse(new TrustedRedirectResponse($url
->setAbsolute()
->toString()));
}