You are here

public function OpenIDConnectClientFormBase::getRedirectUrl in OpenID Connect / OAuth client 2.x

Returns the redirect URL.

Parameters

string|null $id: Route parameter ID.

Return value

string The absolute URL as a string.

2 calls to OpenIDConnectClientFormBase::getRedirectUrl()
OpenIDConnectClientFormBase::buildForm in src/Form/OpenIDConnectClientFormBase.php
Form constructor.
OpenIDConnectClientFormBase::changeRedirectUrl in src/Form/OpenIDConnectClientFormBase.php
AJAX callback to provide an updated Redirect URL when label is changed.

File

src/Form/OpenIDConnectClientFormBase.php, line 235

Class

OpenIDConnectClientFormBase
Form handler for the OpenID Connect client add and edit forms.

Namespace

Drupal\openid_connect\Form

Code

public function getRedirectUrl($id = '') : string {
  if ($id) {
    $route_parameters = [
      'openid_connect_client' => $id,
    ];
    return Url::fromRoute('openid_connect.redirect_controller_redirect', $route_parameters, [
      'absolute' => TRUE,
      'language' => $this->languageManager
        ->getLanguage(LanguageInterface::LANGCODE_NOT_APPLICABLE),
    ])
      ->toString();
  }
  return $this
    ->t('Pending name input');
}