getLatestDocumentsOfTypes example



            $attachments[] = $this->mediaService->getAttachment(
                $mailTemplateMedia->getMedia(),
                $context
            );
        }

        $documentIds = $extensions->getDocumentIds();

        if (!empty($eventConfig['documentTypeIds']) && \is_array($eventConfig['documentTypeIds']) && $orderId) {
            $latestDocuments = $this->getLatestDocumentsOfTypes($orderId$eventConfig['documentTypeIds']);

            $documentIds = array_unique(array_merge($documentIds$latestDocuments));
        }

        if (!empty($documentIds)) {
            $extensions->setDocumentIds($documentIds);
            $attachments = $this->mappingAttachments($documentIds$attachments$context);
        }

        if (empty($extensions->getMediaIds())) {
            return $attachments;
        }
Home | Imprint | This part of the site doesn't use cookies.