public function MailTest::getBody in Simplenews 8.2
Same name and namespace in other branches
- 8 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 45
Class
- MailTest
- Example mail implementation used for tests.
Namespace
Drupal\simplenews\MailCode
public function getBody() {
return $this
->getFormat() == 'plain' ? $this
->getPlainBody() : 'the body';
}