You are here

private function LdapUserAdminForm::checkEmptyEvents in Lightweight Directory Access Protocol (LDAP) 8.3

Warn about fields without associated events.

Parameters

array $mappings: Field mappings.

1 call to LdapUserAdminForm::checkEmptyEvents()
LdapUserAdminForm::validateForm in ldap_user/src/Form/LdapUserAdminForm.php
Form validation handler.

File

ldap_user/src/Form/LdapUserAdminForm.php, line 608

Class

LdapUserAdminForm
Provides the form to configure user configuration and field mapping.

Namespace

Drupal\ldap_user\Form

Code

private function checkEmptyEvents(array $mappings) {
  foreach ($mappings as $mapping) {
    if (empty($mapping['prov_events'])) {
      drupal_set_message($this
        ->t('No synchronization events checked in %item. This field will not be synchronized until some are checked.', [
        '%item' => $mapping['ldap_attr'],
      ]), 'warning');
    }
  }
}