public function ReplicateConfirmForm::getCancelUrl in Replicate UI 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/ ReplicateConfirmForm.php, line 143
Class
Namespace
Drupal\replicate_ui\FormCode
public function getCancelUrl() {
$entity_type_id = $this->routeMatch
->getRouteObject()
->getDefault('entity_type_id');
return Url::fromRoute("entity.{$entity_type_id}.canonical", [
$entity_type_id => $this
->getEntity()
->id(),
]);
}