getOrderDocumentsQuery example

if ($data->orders === null || \count($data->orders) === 0) {
            $this->View()->assign([
                'success' => false,
                'message' => 'No valid order id passed.',
            ]);

            return;
        }

        $files = [];
        $models = $this->getOrderDocumentsQuery($data->orders, $data->docType)->getResult();
        foreach ($models as $model) {
            foreach ($model->getDocuments() as $document) {
                $file = $this->downloadFileFromFilesystem(sprintf('documents/%s.pdf', $document->getHash()));
                if ($file !== null) {
                    $files[] = $file;
                }
            }
        }

        $this->mergeDocuments($files);

        
Home | Imprint | This part of the site doesn't use cookies.