public function IdpForm::removeCertCallback in SAML Service Provider 8.2
Same name and namespace in other branches
- 8.3 src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::removeCertCallback()
- 4.x src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::removeCertCallback()
- 3.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 270 - Contains \Drupal\saml_sp\Form\SamlSpIdpAdd.
Class
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();
}