Merge branch '331-manage-attachments-to-workflow' into 'master'

Add attachments to workflow

Closes #331

See merge request Chill-Projet/chill-bundles!764
This commit is contained in:
2025-02-03 21:15:00 +00:00
106 changed files with 3455 additions and 619 deletions

View File

@@ -21,6 +21,7 @@ use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
use Chill\MainBundle\Workflow\EntityWorkflowWithPublicViewInterface;
use Chill\MainBundle\Workflow\EntityWorkflowWithStoredObjectHandlerInterface;
use Chill\MainBundle\Workflow\Templating\EntityWorkflowViewMetadataDTO;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Service\AccompanyingPeriod\ProvideThirdPartiesAssociated;
use Chill\PersonBundle\Service\AccompanyingPeriod\ProvidePersonsAssociated;
@@ -78,6 +79,15 @@ final readonly class AccompanyingCourseDocumentWorkflowHandler implements Entity
return $this->repository->find($entityWorkflow->getRelatedEntityId());
}
public function getRelatedAccompanyingPeriod(EntityWorkflow $entityWorkflow): ?AccompanyingPeriod
{
if (null === $document = $this->getRelatedEntity($entityWorkflow)) {
return null;
}
return $document->getCourse();
}
/**
* @return array[]
*/

View File

@@ -39,6 +39,7 @@ class WorkflowWithPublicViewDocumentHelper
'storedObject' => $storedObject,
'send' => $send,
'metadata' => $metadata,
'attachments' => $entityWorkflow->getAttachments(),
]
);
}