|
5 | 5 | use Drupal\Core\Entity\EntityInterface;
|
6 | 6 | use Drupal\Core\Entity\EntityTypeManagerInterface;
|
7 | 7 | use Drupal\Core\File\Event\FileUploadSanitizeNameEvent;
|
| 8 | +use Drupal\os2forms_attachment\Element\AttachmentElement; |
8 | 9 | use Drupal\os2forms_get_organized\Exception\ArchivingMethodException;
|
9 | 10 | use Drupal\os2forms_get_organized\Exception\CitizenArchivingException;
|
10 | 11 | use Drupal\os2forms_get_organized\Exception\GetOrganizedCaseIdException;
|
11 | 12 | use Drupal\webform\Entity\WebformSubmission;
|
12 | 13 | use Drupal\webform_attachment\Element\WebformAttachmentBase;
|
13 |
| -use Drupal\webform_entity_print_attachment\Element\WebformEntityPrintAttachment; |
14 | 14 | use ItkDev\GetOrganized\Client;
|
15 | 15 | use ItkDev\GetOrganized\Service\Cases;
|
16 | 16 | use ItkDev\GetOrganized\Service\Documents;
|
@@ -334,7 +334,7 @@ private function createSubCase(string $caseId, string $caseName): string {
|
334 | 334 | private function uploadDocumentToCase(string $caseId, string $webformAttachmentElementId, WebformSubmission $submission, bool $shouldArchiveFiles, bool $shouldBeFinalized): void {
|
335 | 335 | // Handle main document (the attachment).
|
336 | 336 | $webformAttachmentElement = $submission->getWebform()->getElement($webformAttachmentElementId);
|
337 |
| - $fileContent = WebformEntityPrintAttachment::getFileContent($webformAttachmentElement, $submission); |
| 337 | + $fileContent = AttachmentElement::getFileContent($webformAttachmentElement, $submission); |
338 | 338 | $webformLabel = $submission->getWebform()->label();
|
339 | 339 | $webformLabel = str_replace('/', '-', $webformLabel);
|
340 | 340 | $pdfExtension = '.pdf';
|
|
0 commit comments