You are here

public function MessageQueueItem::setIdentity in Courier 8

Same name and namespace in other branches
  1. 2.x src/Entity/MessageQueueItem.php \Drupal\courier\Entity\MessageQueueItem::setIdentity()

Set associated identity.

Parameters

\Drupal\Core\Entity\EntityInterface $identity: The identity to set.

Return value

\Drupal\courier\MessageQueueItemInterface Returns this message queue item for chaining.

Overrides MessageQueueItemInterface::setIdentity

File

src/Entity/MessageQueueItem.php, line 38

Class

MessageQueueItem
Defines a Message queue item entity.

Namespace

Drupal\courier\Entity

Code

public function setIdentity(EntityInterface $identity) {
  $this
    ->set('identity', [
    'entity' => $identity,
  ]);
  return $this;
}