mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
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:
@@ -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[]
|
||||
*/
|
||||
|
@@ -39,6 +39,7 @@ class WorkflowWithPublicViewDocumentHelper
|
||||
'storedObject' => $storedObject,
|
||||
'send' => $send,
|
||||
'metadata' => $metadata,
|
||||
'attachments' => $entityWorkflow->getAttachments(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user