You are here

public function IdentityChannelManager::getIdentityTypes in Courier 8

Same name and namespace in other branches
  1. 2.x src/Service/IdentityChannelManager.php \Drupal\courier\Service\IdentityChannelManager::getIdentityTypes()

Gets all identity types.

Return value

array Arrays of identity entity type IDs.

Overrides IdentityChannelManagerInterface::getIdentityTypes

File

src/Service/IdentityChannelManager.php, line 74

Class

IdentityChannelManager
Manages discovery and instantiation of CourierIdentity plugins.

Namespace

Drupal\courier\Service

Code

public function getIdentityTypes() {
  $identity_types = [];
  foreach ($this
    ->getNonFallbackDefinitions() as $plugin_id => $plugin) {
    if (!in_array($plugin['identity'], $identity_types)) {
      $identity_types[] = $plugin['identity'];
    }
  }
  return $identity_types;
}