public function IdpForm::removeCertCallback in SAML Service Provider 3.x
Same name and namespace in other branches
- 8.3 src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::removeCertCallback()
- 8.2 src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::removeCertCallback()
- 4.x src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::removeCertCallback()
Submit handler for the "remove cert" button.
Decrements the max counter and causes a form rebuild.
File
- src/
Form/ IdpForm.php, line 273
Class
- IdpForm
- Provides the form to configure the IdP.
Namespace
Drupal\saml_sp\FormCode
public function removeCertCallback(array &$form, FormStateInterface $form_state) {
$cert_field = $form_state
->get('num_certs');
if ($cert_field > 1) {
$remove_button = $cert_field - 1;
$form_state
->set('num_certs', $remove_button);
}
$form_state
->setRebuild();
}