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'); + } }