public function StaticContextDeleteForm::getCancelUrl in Page Manager 8
Same name and namespace in other branches
- 8.4 page_manager_ui/src/Form/StaticContextDeleteForm.php \Drupal\page_manager_ui\Form\StaticContextDeleteForm::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/ StaticContextDeleteForm.php, line 46 - Contains \Drupal\page_manager_ui\Form\StaticContextDeleteForm.
Class
- StaticContextDeleteForm
- Provides a form for deleting an access condition.
Namespace
Drupal\page_manager_ui\FormCode
public function getCancelUrl() {
$cached_values = $this
->getTempstore();
/** @var $page \Drupal\page_manager\PageInterface */
$page = $cached_values['page'];
if ($page
->isNew()) {
return new Url('entity.page.add_step_form', [
'machine_name' => $this->machine_name,
'step' => 'contexts',
]);
}
else {
$page_variant = $this
->getPageVariant($cached_values);
return new Url('entity.page.edit_form', [
'machine_name' => $this->machine_name,
'step' => 'page_variant__' . $page_variant
->id() . '__contexts',
]);
}
}