You are here

protected function CrmCoreUserSyncRelationRules::getRules in CRM Core 8.3

Same name and namespace in other branches
  1. 8 modules/crm_core_user_sync/src/CrmCoreUserSyncRelationRules.php \Drupal\crm_core_user_sync\CrmCoreUserSyncRelationRules::getRules()

Retrieves the individual contact id for specified user.

Return value

int|null Individual id, if relation exists.

1 call to CrmCoreUserSyncRelationRules::getRules()
CrmCoreUserSyncRelationRules::getContactType in modules/crm_core_user_sync/src/CrmCoreUserSyncRelationRules.php
Get contact type resolved from configured synchronization rules.

File

modules/crm_core_user_sync/src/CrmCoreUserSyncRelationRules.php, line 54

Class

CrmCoreUserSyncRelationRules
CrmCoreUserSyncRelation service.

Namespace

Drupal\crm_core_user_sync

Code

protected function getRules() {
  if ($this->rules === NULL) {
    $rules = $this->configFactory
      ->get($this->configName)
      ->get('rules');
    uasort($rules, [
      $this,
      'weightCmp',
    ]);
    $this->rules = $rules;
  }
  return $this->rules;
}