You are here

public function AddVariantStaticContextDeleteForm::getCancelUrl in Page Manager 8.4

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

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

Return value

\Drupal\Core\Url A URL object.

Overrides ConfirmFormInterface::getCancelUrl

File

page_manager_ui/src/Form/AddVariantStaticContextDeleteForm.php, line 31

Class

AddVariantStaticContextDeleteForm

Namespace

Drupal\page_manager_ui\Form

Code

public function getCancelUrl() {
  $cached_values = $this
    ->getTempstore();
  $page_variant = $this
    ->getPageVariant($cached_values);
  return new Url('entity.page_variant.add_step_form', [
    'page' => $page_variant
      ->getPage()
      ->id(),
    'machine_name' => $this->machine_name,
    'step' => 'contexts',
  ]);
}