You are here

public function MailTest::getAttachments in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 src/Mail/MailTest.php \Drupal\simplenews\Mail\MailTest::getAttachments()
  2. 8 src/Mail/MailTest.php \Drupal\simplenews\Mail\MailTest::getAttachments()

Returns an array of attachments for this newsletter mail.

Return value

array An array of managed file objects with properties uri, filemime and so on.

Overrides MailInterface::getAttachments

File

src/Mail/MailTest.php, line 32

Class

MailTest
Example mail implementation used for tests.

Namespace

Drupal\simplenews\Mail

Code

public function getAttachments() {
  return [
    [
      'uri' => 'example://test.png',
      'filemime' => 'x-example',
      'filename' => 'test.png',
    ],
  ];
}