From b055592d2b597ad419e2f6294757092a7b76bab1 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 16 Sep 2024 17:03:09 +0300 Subject: [PATCH] setFile method --- application/Espo/Modules/Crm/Entities/Document.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/Espo/Modules/Crm/Entities/Document.php b/application/Espo/Modules/Crm/Entities/Document.php index ea54ab25eb..f6654fecd6 100644 --- a/application/Espo/Modules/Crm/Entities/Document.php +++ b/application/Espo/Modules/Crm/Entities/Document.php @@ -47,6 +47,13 @@ class Document extends Entity return $this->get('name'); } + public function setFile(?Attachment $file): self + { + $this->relations->set('file', $file); + + return $this; + } + public function getFileId(): ?string { return $this->get('fileId');