* @copyright Since 2013 Ovidiu Cimpean * @license Do not edit, modify or copy this file * * @version Release: 4 */ class NewsletterProMailAttachment { public static function get($templateName) { $attachments = []; if (isset($templateName)) { $attachment = NewsletterProAttachment::newInstanceByTemplateName($templateName); if ($attachment) { $files = $attachment->filesPathFilename(); if (!empty($files)) { foreach ($files as $file) { $attach = NewsletterPro_Swift_Attachment::fromPath($file['path'])->setFilename($file['name']); $attachments[] = $attach; } } } } return $attachments; } }