public function IdentityChannelManager::getCourierIdentity in Courier 8
Same name and namespace in other branches
- 2.x src/Service/IdentityChannelManager.php \Drupal\courier\Service\IdentityChannelManager::getCourierIdentity()
Instantiate a CourierIdentity plugin instance.
Parameters
string $channel_type_id: A channel entity type ID.
string $identity_type_id: An identity entity type ID.
Return value
\Drupal\courier\Plugin\IdentityChannel\IdentityChannelPluginInterface|NULL A CourierIdentity plugin instance, or NULL if no plugin was found.
Overrides IdentityChannelManagerInterface::getCourierIdentity
File
- src/
Service/ IdentityChannelManager.php, line 49
Class
- IdentityChannelManager
- Manages discovery and instantiation of CourierIdentity plugins.
Namespace
Drupal\courier\ServiceCode
public function getCourierIdentity($channel_type_id, $identity_type_id) {
if ($plugin_id = $this
->getCourierIdentityPluginID($channel_type_id, $identity_type_id)) {
return $this
->createInstance($plugin_id);
}
return NULL;
}