private function LdapUserMappingBaseForm::checkEmptyEvents in Lightweight Directory Access Protocol (LDAP) 8.4
Warn about fields without associated events.
Parameters
array $mappings: Field mappings.
1 call to LdapUserMappingBaseForm::checkEmptyEvents()
- LdapUserMappingBaseForm::validateForm in ldap_user/
src/ Form/ LdapUserMappingBaseForm.php - Form validation handler.
File
- ldap_user/
src/ Form/ LdapUserMappingBaseForm.php, line 135
Class
- LdapUserMappingBaseForm
- Provides the form to configure user configuration and field mapping.
Namespace
Drupal\ldap_user\FormCode
private function checkEmptyEvents(array $mappings) : void {
foreach ($mappings as $key => $mapping) {
if (empty($mapping['prov_events'])) {
$this
->messenger()
->addWarning($this
->t('No synchronization events checked in %item. This field will not be synchronized until some are checked.', [
'%item' => $key,
]));
}
}
}