function BlockEntitySettingTrayForm::getRedirectUrl
Same name in other branches
- 9 core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php \Drupal\settings_tray\Block\BlockEntitySettingTrayForm::getRedirectUrl()
- 10 core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php \Drupal\settings_tray\Block\BlockEntitySettingTrayForm::getRedirectUrl()
- 11.x core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php \Drupal\settings_tray\Block\BlockEntitySettingTrayForm::getRedirectUrl()
Gets the form's redirect URL from 'destination' provide in the request.
Return value
\Drupal\Core\Url|null The redirect URL or NULL if dialog should just be closed.
1 call to BlockEntitySettingTrayForm::getRedirectUrl()
- BlockEntitySettingTrayForm::successfulAjaxSubmit in core/
modules/ settings_tray/ src/ Block/ BlockEntitySettingTrayForm.php - Allows the form to respond to a successful AJAX submission.
File
-
core/
modules/ settings_tray/ src/ Block/ BlockEntitySettingTrayForm.php, line 166
Class
- BlockEntitySettingTrayForm
- Provides form for block instance forms when used in the off-canvas dialog.
Namespace
Drupal\settings_tray\BlockCode
protected function getRedirectUrl() {
// \Drupal\Core\Routing\RedirectDestination::get() cannot be used directly
// because it will use <current> if 'destination' is not in the query
// string.
if ($this->getRequest()->query
->has('destination') && ($destination = $this->getRedirectDestination()
->get())) {
return Url::fromUserInput('/' . $destination);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.