You are here

public function Email::setSubject in Courier 2.x

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

Set subject of the email.

Parameters

string $subject: Subject of the email.

Return value

\Drupal\courier\EmailInterface Returns email for chaining.

Overrides EmailInterface::setSubject

2 calls to Email::setSubject()
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.

File

src/Entity/Email.php, line 81

Class

Email
Defines storage for a composed email.

Namespace

Drupal\courier\Entity

Code

public function setSubject($subject) {
  $this
    ->set('subject', [
    'value' => $subject,
  ]);
  return $this;
}