public function MailTest::getBody in Simplenews 8
Same name and namespace in other branches
- 8.2 src/Mail/MailTest.php \Drupal\simplenews\Mail\MailTest::getBody()
- 3.x src/Mail/MailTest.php \Drupal\simplenews\Mail\MailTest::getBody()
Returns the mail body.
Return value
string The body, as plaintext or html depending on the format.
Overrides MailInterface::getBody
File
- src/
Mail/ MailTest.php, line 28
Class
- MailTest
- Example mail implementation used for tests.
Namespace
Drupal\simplenews\MailCode
public function getBody() {
return $this
->getFormat() == 'plain' ? $this
->getPlainBody() : 'the body';
}