From 366d18a5c98989c403e8b6f66c7bd4014f2bbf11 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 16 Sep 2024 17:04:32 +0300 Subject: [PATCH] email template getAttachments method --- application/Espo/Entities/EmailTemplate.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/Espo/Entities/EmailTemplate.php b/application/Espo/Entities/EmailTemplate.php index 78a50e1b54..c4b328803f 100644 --- a/application/Espo/Entities/EmailTemplate.php +++ b/application/Espo/Entities/EmailTemplate.php @@ -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 + */ + public function getAttachments(): iterable + { + /** @var Collection */ + return $this->relations->getMany('attachments'); + } }