You are here

public function AuthmapDeleteForm::getCancelUrl in External Authentication 2.0.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 AuthmapDeleteForm::getCancelUrl()
AuthmapDeleteForm::submitForm in src/Form/AuthmapDeleteForm.php
Form submission handler.

File

src/Form/AuthmapDeleteForm.php, line 86

Class

AuthmapDeleteForm
Confirm the user wants to delete an authmap entry.

Namespace

Drupal\externalauth\Form

Code

public function getCancelUrl() {

  // We want to return a URL object pointing to admin/people/authmap/PROVIDER.
  // Url('view.authmap.page', ['provider' => PROVIDER]) instead returns
  // admin/people/authmap?provider=PROVIDER, which is not recognized as
  // contextual filter value.
  return Url::fromUri('internal:/admin/people/authmap/' . $this->authmapEntry['provider']);
}