public function getWorkflowDocumentsLink(Workflow $workflow) { $documents = $this->getWorkflowDocuments($workflow); $count = count($documents); $link = ''; if ($count > 1) { $link = $this->documentManager->getDocumentsPackageLink($documents, 'workflow_' . $workflow->getId() . '_documents.zip'); } elseif ($count === 1) { $documents = array_values($documents); /** @var Document $document */ $document = $documents[0]; $link = $this->documentManager->getDownloadLink($document->getFilename()); } return $link; }
public function getDownloadArchiveLink($documents, $originalName = null) { return $this->manager->getDocumentsPackageLink($documents, $originalName); }