You are here

public function FieldProvider::getConfigurableAttributesSyncedOnEvent in Lightweight Directory Access Protocol (LDAP) 8.4

Get configurable attributes synced on event.

Parameters

string $event: Event.

Return value

\Drupal\ldap_servers\Mapping[] Mapping.

File

ldap_user/src/FieldProvider.php, line 225

Class

FieldProvider
Provides the basic and required fields needed for user mappings.

Namespace

Drupal\ldap_user

Code

public function getConfigurableAttributesSyncedOnEvent(string $event) : array {
  $synced_attributes = [];
  foreach ($this->attributes as $key => $attribute) {
    if ($attribute
      ->isEnabled() && $attribute
      ->isConfigurable() && in_array($event, $attribute
      ->getProvisioningEvents(), TRUE)) {
      $synced_attributes[$key] = $attribute;
    }
  }
  return $synced_attributes;
}