mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
merge conflicts resolved
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user