ContentEntityDeleteForm::getCancelUrl

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

public function getCancelUrl() {
  /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
  $entity = $this->getEntity();
  return $entity->isDefaultTranslation() ? $this->traitGetCancelUrl() : $entity->urlInfo('canonical');
}
doc_Drupal
2016-10-29 08:57:11
Comments
Leave a Comment

Please login to continue.