You are here

function MailEntity::getFormat in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Mail/MailEntity.php \Drupal\simplenews\Mail\MailEntity::getFormat()
  2. 3.x src/Mail/MailEntity.php \Drupal\simplenews\Mail\MailEntity::getFormat()

Returns the mail format.

Return value

string The mail format as string, either 'plain' or 'html'.

Overrides MailInterface::getFormat

3 calls to MailEntity::getFormat()
MailEntity::build in src/Mail/MailEntity.php
Build the entity object.
MailEntity::buildBody in src/Mail/MailEntity.php
Build the themed newsletter body.
MailEntity::getBody in src/Mail/MailEntity.php
Returns the mail body.

File

src/Mail/MailEntity.php, line 216

Class

MailEntity
Default mail class for entities.

Namespace

Drupal\simplenews\Mail

Code

function getFormat() {
  return $this
    ->getNewsletter()->format;
}