public function PostDeleteForm::getRedirectUrl in Open Social 8.3
Same name and namespace in other branches
- 8.9 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 8 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 8.2 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 8.4 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 8.5 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 8.6 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 8.7 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 8.8 modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 10.3.x modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 10.0.x modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 10.1.x modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
- 10.2.x modules/social_features/social_post/src/Form/PostDeleteForm.php \Drupal\social_post\Form\PostDeleteForm::getRedirectUrl()
Returns the URL where the user should be redirected after deletion.
Return value
\Drupal\Core\Url The redirect URL.
Overrides EntityDeleteFormTrait::getRedirectUrl
File
- modules/
social_features/ social_post/ src/ Form/ PostDeleteForm.php, line 39
Class
- PostDeleteForm
- Provides a form for deleting Post entities.
Namespace
Drupal\social_post\FormCode
public function getRedirectUrl() {
// Set the redirect url to the destination in the url.
if (\Drupal::request()->query
->has('destination')) {
$destination = \Drupal::destination();
$path = $destination
->get();
return Url::fromUserInput($path);
}
// Default to the stream page.
return Url::fromRoute('social_core.homepage');
}