You are here

protected function GeysirParagraphDeleteForm::getRedirectUrl in Geysir 8

Returns the URL where the user should be redirected after deletion.

Return value

\Drupal\Core\Url The redirect URL.

Overrides EntityDeleteFormTrait::getRedirectUrl

2 calls to GeysirParagraphDeleteForm::getRedirectUrl()
GeysirParagraphDeleteForm::getCancelUrl in src/Form/GeysirParagraphDeleteForm.php
Returns the route to go to if the user cancels the action.
GeysirParagraphDeleteForm::submitForm in src/Form/GeysirParagraphDeleteForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…

File

src/Form/GeysirParagraphDeleteForm.php, line 73

Class

GeysirParagraphDeleteForm
Functionality to delete a paragraph.

Namespace

Drupal\geysir\Form

Code

protected function getRedirectUrl() {
  $referer = $this
    ->getRequest()->server
    ->get('HTTP_REFERER');
  $path = parse_url($referer, PHP_URL_PATH);
  return Url::fromUserInput($path);
}