You are here

public function PageVariantDeleteForm::getCancelUrl in Page Manager 8

Same name and namespace in other branches
  1. 8.4 page_manager_ui/src/Form/PageVariantDeleteForm.php \Drupal\page_manager_ui\Form\PageVariantDeleteForm::getCancelUrl()

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

Return value

\Drupal\Core\Url A URL object.

Overrides ConfirmFormInterface::getCancelUrl

1 call to PageVariantDeleteForm::getCancelUrl()
PageVariantDeleteForm::submitForm in page_manager_ui/src/Form/PageVariantDeleteForm.php
Form submission handler.

File

page_manager_ui/src/Form/PageVariantDeleteForm.php, line 73
Contains Drupal\page_manager_ui\Form\PageVariantDeleteForm.

Class

PageVariantDeleteForm
Builds the form to delete a PageVariant.

Namespace

Drupal\page_manager_ui\Form

Code

public function getCancelUrl() {
  $machine_name = $this
    ->getRouteMatch()
    ->getParameter('machine_name');
  return new Url('entity.page.edit_form', [
    'machine_name' => $machine_name,
    'step' => 'general',
  ]);
}