You are here

public function MailEntity::getFormat in Simplenews 8.2

Same name and namespace in other branches
  1. 8 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 197

Class

MailEntity
Default mail class for entities.

Namespace

Drupal\simplenews\Mail

Code

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