class User in Courier 8
Same name in this branch
- 8 src/Plugin/IdentityChannel/CourierEmail/User.php \Drupal\courier\Plugin\IdentityChannel\CourierEmail\User
- 8 tests/modules/courier_test_message/src/Plugin/IdentityChannel/TestMessage/User.php \Drupal\courier_test_message\Plugin\IdentityChannel\TestMessage\User
Same name and namespace in other branches
- 2.x tests/modules/courier_test_message/src/Plugin/IdentityChannel/TestMessage/User.php \Drupal\courier_test_message\Plugin\IdentityChannel\TestMessage\User
Supports core user entities.
Plugin annotation
@IdentityChannel(
id = "identity:user:test_message",
label = @Translation("Drupal user to courier_test_message"),
channel = "courier_test_message",
identity = "user",
weight = 10
)
Hierarchy
- class \Drupal\courier_test_message\Plugin\IdentityChannel\TestMessage\User implements IdentityChannelPluginInterface
Expanded class hierarchy of User
File
- tests/
modules/ courier_test_message/ src/ Plugin/ IdentityChannel/ TestMessage/ User.php, line 21
Namespace
Drupal\courier_test_message\Plugin\IdentityChannel\TestMessageView source
class User implements IdentityChannelPluginInterface {
/**
* {@inheritdoc}
*/
public function applyIdentity(ChannelInterface &$message, EntityInterface $identity) {
/** @var \Drupal\user\UserInterface $identity */
/** @var \Drupal\courier_test_message\Entity\TestMessageInterface $message */
$message
->setUid($identity
->id());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
User:: |
public | function |
Inserts the identity into the message. Overrides IdentityChannelPluginInterface:: |