You are here

public function RngConfiguration::getIdentityTypes in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/RngConfiguration.php \Drupal\rng\RngConfiguration::getIdentityTypes()
  2. 8 src/RngConfiguration.php \Drupal\rng\RngConfiguration::getIdentityTypes()

Get valid identity entity types.

Return value

string[] Array of entity types IDs.

Overrides RngConfigurationInterface::getIdentityTypes

File

src/RngConfiguration.php, line 43

Class

RngConfiguration
The RNG Configuration service.

Namespace

Drupal\rng

Code

public function getIdentityTypes() {
  $config = $this->configFactory
    ->get('rng.settings');
  $identity_types = $config
    ->get('identity_types');
  $allowed_identity_types = is_array($identity_types) ? $identity_types : [];
  $available_identity_types = $this->identityChannelManager
    ->getIdentityTypes();
  return array_intersect($allowed_identity_types, $available_identity_types);
}