You are here

public function AssetMoveActionForm::getCancelUrl in farmOS 2.x

Returns the route to go to if the user cancels the action.

Return value

\Drupal\Core\Url A URL object.

Overrides ConfirmFormInterface::getCancelUrl

1 call to AssetMoveActionForm::getCancelUrl()
AssetMoveActionForm::submitForm in modules/core/location/src/Form/AssetMoveActionForm.php
Form submission handler.

File

modules/core/location/src/Form/AssetMoveActionForm.php, line 103

Class

AssetMoveActionForm
Provides an asset move confirmation form.

Namespace

Drupal\farm_location\Form

Code

public function getCancelUrl() {
  if ($this->entityType
    ->hasLinkTemplate('collection')) {
    return new Url('entity.' . $this->entityType
      ->id() . '.collection');
  }
  else {
    return new Url('<front>');
  }
}