Add TransitionHasDestineeIfIsSentExternal validator

This commit introduces a new validator to ensure that transitions marked as 'sent' have a designated external recipient. It includes related tests for scenarios with and without recipients and covers integration with the workflow context.
This commit is contained in:
2024-10-04 10:25:18 +02:00
parent 071c5e3c55
commit 7cd638c5fc
6 changed files with 286 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ namespace Chill\MainBundle\Workflow;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\UserGroup;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Workflow\Validator\TransitionHasDestineeIfIsSentExternal;
use Chill\PersonBundle\Entity\Person;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Validator\ThirdPartyHasEmail;
@@ -24,6 +25,7 @@ use Symfony\Component\Workflow\Transition;
/**
* Context for a transition on an workflow entity.
*/
#[TransitionHasDestineeIfIsSentExternal]
class WorkflowTransitionContextDTO
{
/**