public function MenuLinkContentDeleteForm::getCancelUrl in Drupal 9
Same name and namespace in other branches
- 8 core/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php \Drupal\menu_link_content\Form\MenuLinkContentDeleteForm::getCancelUrl()
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 MenuLinkContentDeleteForm::getCancelUrl()
- MenuLinkContentDeleteForm::getRedirectUrl in core/
modules/ menu_link_content/ src/ Form/ MenuLinkContentDeleteForm.php - Returns the URL where the user should be redirected after deletion.
File
- core/
modules/ menu_link_content/ src/ Form/ MenuLinkContentDeleteForm.php, line 18
Class
- MenuLinkContentDeleteForm
- Provides a delete form for content menu links.
Namespace
Drupal\menu_link_content\FormCode
public function getCancelUrl() {
if ($this->moduleHandler
->moduleExists('menu_ui')) {
return new Url('entity.menu.edit_form', [
'menu' => $this->entity
->getMenuName(),
]);
}
return $this->entity
->toUrl();
}