public ContentEntityDeleteForm::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
- core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php, line 81
Class
- ContentEntityDeleteForm
- Provides a generic base class for a content entity deletion form.
Namespace
Drupal\Core\Entity
Code
1 2 3 4 5 | public function getCancelUrl() { /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ $entity = $this ->getEntity(); return $entity ->isDefaultTranslation() ? $this ->traitGetCancelUrl() : $entity ->urlInfo( 'canonical' ); } |
Please login to continue.