public function RevisionRevertForm::getCancelUrl in Entity API 8
Same name and namespace in other branches
- 8.0 src/Form/RevisionRevertForm.php \Drupal\entity\Form\RevisionRevertForm::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
- src/
Form/ RevisionRevertForm.php, line 80
Class
Namespace
Drupal\entity\FormCode
public function getCancelUrl() {
if ($this->revision
->getEntityType()
->hasLinkTemplate('version-history')) {
return $this->revision
->toUrl('version-history');
}
return $this->revision
->toUrl();
}