function MessageQueueItem::getMessage in Courier 8
Same name and namespace in other branches
- 2.x src/Entity/MessageQueueItem.php \Drupal\courier\Entity\MessageQueueItem::getMessage()
Get message with a channel entity type.
Parameters
string $entity_type_id: A channel entity type ID.
Return value
\Drupal\courier\ChannelInterface|NULL A message, or NULL.
Overrides MessageQueueItemInterface::getMessage
File
- src/
Entity/ MessageQueueItem.php, line 46
Class
- MessageQueueItem
- Defines a Message queue item entity.
Namespace
Drupal\courier\EntityCode
function getMessage($entity_type_id) {
foreach ($this
->getMessages() as $message) {
if ($message
->getEntityTypeId() == $entity_type_id) {
return $message;
}
}
return NULL;
}