You are here

private function LdapUserTestForm::provisionEnabled in Lightweight Directory Access Protocol (LDAP) 8.3

Same name and namespace in other branches
  1. 8.4 ldap_user/src/Form/LdapUserTestForm.php \Drupal\ldap_user\Form\LdapUserTestForm::provisionEnabled()

Given a $prov_event determine if LDAP user configuration supports it.

This is overall, not a per field syncing configuration.

Parameters

int $direction: self::PROVISION_TO_DRUPAL or self::PROVISION_TO_LDAP.

int $provision_trigger: Provision trigger, see events above, such as 'sync', 'provision', 'delete_ldap_entry', 'delete_drupal_entry', 'cancel_drupal_entry'.

Return value

bool Provisioning enabled. TODO: Move to ldapusertestform and/or kill.

1 call to LdapUserTestForm::provisionEnabled()
LdapUserTestForm::submitForm in ldap_user/src/Form/LdapUserTestForm.php
Form submission handler.

File

ldap_user/src/Form/LdapUserTestForm.php, line 197

Class

LdapUserTestForm
A form to allow the administrator to query LDAP.

Namespace

Drupal\ldap_user\Form

Code

private function provisionEnabled($direction, $provision_trigger) {
  $result = FALSE;
  if ($direction == self::PROVISION_TO_LDAP) {
    $result = LdapConfiguration::provisionAvailableToLdap($provision_trigger);
  }
  elseif ($direction == self::PROVISION_TO_DRUPAL) {
    $result = LdapConfiguration::provisionAvailableToDrupal($provision_trigger);
  }
  return $result;
}