You are here

public function DeleteAchievementsForm::getCancelUrl in Opigno Learning path 3.x

Same name and namespace in other branches
  1. 8 src/Form/DeleteAchievementsForm.php \Drupal\opigno_learning_path\Form\DeleteAchievementsForm::getCancelUrl()

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 DeleteAchievementsForm::getCancelUrl()
DeleteAchievementsForm::submitForm in src/Form/DeleteAchievementsForm.php
Form submission handler.

File

src/Form/DeleteAchievementsForm.php, line 104

Class

DeleteAchievementsForm
Class LearningPathAdminSettingsForm.

Namespace

Drupal\opigno_learning_path\Form

Code

public function getCancelUrl() {
  if (isset($this->group)) {
    return $this->group
      ->toUrl();
  }
  else {
    return Url::fromRoute('<front>');
  }
}