public function RngConfiguration::getIdentityTypes in RNG - Events and Registrations 8.2
Same name and namespace in other branches
- 8 src/RngConfiguration.php \Drupal\rng\RngConfiguration::getIdentityTypes()
- 3.x 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\rngCode
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);
}