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