merge conflicts resolved

This commit is contained in:
2022-02-14 14:55:47 +01:00
4 changed files with 23 additions and 11 deletions

View File

@@ -500,6 +500,20 @@ class AccompanyingPeriod implements
return end($periods) === $this;
}
/**
* @Assert\Callback
*/
public function canUserBeNull(ExecutionContextInterface $context)
{
if ($this->getStep() === self::STEP_CONFIRMED && $this->isConfidential() === true) {
if (!$this->getUser()) {
$context->buildViolation('User cannot be null for an accompanying period that is confirmed and confidential')
->atPath('user')
->addViolation();
}
}
}
/**
* Close a participation for a person.
*
@@ -938,7 +952,7 @@ class AccompanyingPeriod implements
}
/**
* Validation function.
* Validation functions.
*/
public function isDateConsistent(ExecutionContextInterface $context)
{