public function ClientTestForm::setPlugin in OAuth2 Client 8.2
Set the plugin to test.
File
- src/
Form/ ClientTestForm.php, line 277
Class
- ClientTestForm
- Defines the form for testing OAuth2 Client integrations.
Namespace
Drupal\oauth2_client\FormCode
public function setPlugin(array &$form, FormStateInterface $form_state) {
// The current plugin is set through the URL (so as to allow redirects from
// OAuth2 servers back to this page). As such, when a plugin is selected,
// a redirect needs to happen.
if ($plugin = $form_state
->getValue('oauth2_client_plugin')) {
$form_state
->setRedirect('oauth2_client.reports.tester.plugin', [
'plugin' => $plugin,
]);
}
else {
$form_state
->setRedirect('oauth2_client.reports.tester');
}
}