You are here

public function Email::setBody in Courier 8

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

Sets the email body.

Parameters

string $body: The email body.

Return value

\Drupal\courier\EmailInterface Returns email for chaining.

Overrides EmailInterface::setBody

2 calls to Email::setBody()
Email::applyTokens in src/Entity/Email.php
Applies tokens to relevant fields.
Email::importTemplate in src/Entity/Email.php
Import the message values from configuration values into this entity, as found in the 'courier.template.TYPE' config type. Where TYPE is the entity type ID of this entity.

File

src/Entity/Email.php, line 101
Contains \Drupal\courier\Entity\Email.

Class

Email
Defines storage for a composed email.

Namespace

Drupal\courier\Entity

Code

public function setBody($body) {
  $this
    ->get('body')->value = $body;
  return $this;
}