email template getAttachments method

This commit is contained in:
Yuri Kuznetsov
2024-09-16 17:04:32 +03:00
parent b055592d2b
commit 366d18a5c9
@@ -30,6 +30,7 @@
namespace Espo\Entities;
use Espo\Core\ORM\Entity;
use Espo\ORM\Collection;
class EmailTemplate extends Entity
{
@@ -58,4 +59,13 @@ class EmailTemplate extends Entity
/** @var string[] */
return $this->getLinkMultipleIdList('attachments');
}
/**
* @return iterable<Attachment>
*/
public function getAttachments(): iterable
{
/** @var Collection<Attachment> */
return $this->relations->getMany('attachments');
}
}