person: add custom class validator for accompanying period

This commit is contained in:
nobohan
2021-12-03 18:10:52 +01:00
parent 611f0a9ca6
commit 2e4356c3c9
4 changed files with 100 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\Resource;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap;
use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck;
use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\AccompanyingPeriodValidity;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use DateTime;
use DateTimeImmutable;
@@ -58,6 +59,8 @@ use const SORT_REGULAR;
* "this.isConfidential and this.getUser === NULL",
* message="If the accompanying course is confirmed and confidential, a referrer must remain assigned."
* )
*
* @AccompanyingPeriodValidity(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED})
*/
class AccompanyingPeriod implements
GroupSequenceProviderInterface,