public function TransactionExecuteForm::getCancelUrl in Transaction 8
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/ TransactionExecuteForm.php, line 35
Class
- TransactionExecuteForm
- Provides a form for transaction execution.
Namespace
Drupal\transaction\FormCode
public function getCancelUrl() {
/** @var \Drupal\transaction\TransactionInterface $entity */
$entity = $this
->getEntity();
return $entity
->getTargetEntityId() ? $entity
->toUrl('collection', [
'target_entity' => $entity
->getTargetEntityId(),
]) : $entity
->toUrl();
}