public function Email::importTemplate in Courier 8
Same name and namespace in other branches
- 2.x src/Entity/Email.php \Drupal\courier\Entity\Email::importTemplate()
Import the message values from configuration values into this entity, 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 exportTemplate()}
Parameters
mixed $content: Values from a 'courier.template.TYPE' configuration.
Overrides ChannelInterface::importTemplate
File
- src/
Entity/ Email.php, line 185 - Contains \Drupal\courier\Entity\Email.
Class
- Defines storage for a composed email.
Namespace
Drupal\courier\EntityCode
public function importTemplate($content) {
$this
->setSubject($content['subject']);
$this
->setBody($content['body']);
}