You are here

public function ProfileAddressBookDeleteForm::getCancelUrl in Commerce Core 8.2

Returns the route to go to if the user cancels the action.

Return value

\Drupal\Core\Url A URL object.

Overrides ContentEntityDeleteForm::getCancelUrl

1 call to ProfileAddressBookDeleteForm::getCancelUrl()
ProfileAddressBookDeleteForm::getRedirectUrl in modules/order/src/Form/ProfileAddressBookDeleteForm.php
Returns the URL where the user should be redirected after deletion.

File

modules/order/src/Form/ProfileAddressBookDeleteForm.php, line 36

Class

ProfileAddressBookDeleteForm
Provides a confirmation form for deleting a profile from the address book.

Namespace

Drupal\commerce_order\Form

Code

public function getCancelUrl() {

  /** @var \Drupal\profile\Entity\ProfileInterface $entity */
  $entity = $this->entity;
  return Url::fromRoute('commerce_order.address_book.overview', [
    'user' => $entity
      ->getOwnerId(),
  ]);
}