You are here

interface IdentityChannelManagerInterface in Courier 2.x

Same name and namespace in other branches
  1. 8 src/Service/IdentityChannelManagerInterface.php \Drupal\courier\Service\IdentityChannelManagerInterface

Interface for identity channel manager.

Hierarchy

Expanded class hierarchy of IdentityChannelManagerInterface

All classes that implement IdentityChannelManagerInterface

6 files declare their use of IdentityChannelManagerInterface
ComposeAccessCheck.php in courier_message_composer/src/Access/ComposeAccessCheck.php
CourierMessageController.php in courier_message_composer/src/Controller/CourierMessageController.php
MessageForm.php in courier_message_composer/src/Form/MessageForm.php
Permissions.php in courier_message_composer/src/Permissions.php
Settings.php in src/Form/Settings.php

... See full list

File

src/Service/IdentityChannelManagerInterface.php, line 10

Namespace

Drupal\courier\Service
View source
interface IdentityChannelManagerInterface {

  /**
   * Get IdentityChannel plugin ID bridging a identity and message combination.
   *
   * @param string $channel_type_id
   *   An channel entity type ID.
   * @param string $identity_type_id
   *   An identity entity type ID.
   *
   * @return string|null
   *   IdentityChannel plugin ID, or NULL if no plugin was found.
   */
  public function getCourierIdentityPluginID($channel_type_id, $identity_type_id);

  /**
   * Instantiate a CourierIdentity plugin instance.
   *
   * @param string $channel_type_id
   *   A channel entity type ID.
   * @param string $identity_type_id
   *   An identity entity type ID.
   *
   * @return \Drupal\courier\Plugin\IdentityChannel\IdentityChannelPluginInterface|null
   *   A CourierIdentity plugin instance, or NULL if no plugin was found.
   */
  public function getCourierIdentity($channel_type_id, $identity_type_id);

  /**
   * Gets all channel implementations.
   *
   * @return array
   *   Arrays of identity entity type IDs, keyed by channel entity type ID.
   */
  public function getChannels();

  /**
   * Gets all identity types.
   *
   * @return array
   *   Arrays of identity entity type IDs.
   */
  public function getIdentityTypes();

  /**
   * Get channels supported for an identity entity type.
   *
   * @param string $identity_type_id
   *   An identity entity type ID.
   *
   * @return array
   *   An array of channel entity type IDs.
   */
  public function getChannelsForIdentityType($identity_type_id);

  /**
   * Determine which channels an identity would like a message sent to.
   *
   * @param \Drupal\Core\Entity\EntityInterface $identity
   *   An identity entity.
   *
   * @return string[]
   *   IDs of entity types which implement \Drupal\courier\ChannelInterface.
   */
  public function getChannelsForIdentity(EntityInterface $identity);

}

Members

Namesort descending Modifiers Type Description Overrides
IdentityChannelManagerInterface::getChannels public function Gets all channel implementations. 1
IdentityChannelManagerInterface::getChannelsForIdentity public function Determine which channels an identity would like a message sent to. 1
IdentityChannelManagerInterface::getChannelsForIdentityType public function Get channels supported for an identity entity type. 1
IdentityChannelManagerInterface::getCourierIdentity public function Instantiate a CourierIdentity plugin instance. 1
IdentityChannelManagerInterface::getCourierIdentityPluginID public function Get IdentityChannel plugin ID bridging a identity and message combination. 1
IdentityChannelManagerInterface::getIdentityTypes public function Gets all identity types. 1