You are here

public function Email::exportTemplate in Courier 2.x

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

Export the message values from this template to configuration values.

Export the message values from this template to configuration values, as found in the 'courier.template.TYPE' config type. Where TYPE is the entity type ID of this entity.

This method is the reverse of {@link importTemplate()}

Return value

mixed Values from this entity converted to 'courier.template.TYPE' configuration.

Overrides ChannelInterface::exportTemplate

File

src/Entity/Email.php, line 188

Class

Email
Defines storage for a composed email.

Namespace

Drupal\courier\Entity

Code

public function exportTemplate() {
  return [
    'subject' => $this
      ->getSubject(),
    'body' => $this
      ->getBody(),
  ];
}