mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
fix cs
This commit is contained in:
parent
da9eba2618
commit
dfb583fa8b
@ -215,7 +215,7 @@ class WorkflowStepType extends AbstractType
|
|||||||
} else {
|
} else {
|
||||||
foreach ($transition->getTos() as $to) {
|
foreach ($transition->getTos() as $to) {
|
||||||
$meta = $workflow->getMetadataStore()->getPlaceMetadata($to);
|
$meta = $workflow->getMetadataStore()->getPlaceMetadata($to);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!array_key_exists('isFinal', $meta) || false === $meta['isFinal']
|
!array_key_exists('isFinal', $meta) || false === $meta['isFinal']
|
||||||
) {
|
) {
|
||||||
@ -224,7 +224,7 @@ class WorkflowStepType extends AbstractType
|
|||||||
}
|
}
|
||||||
$destUsers = $form['future_dest_users']->getData();
|
$destUsers = $form['future_dest_users']->getData();
|
||||||
$destEmails = $form['future_dest_emails']->getData();
|
$destEmails = $form['future_dest_emails']->getData();
|
||||||
|
|
||||||
if (!$toFinal && [] === $destUsers && [] === $destEmails) {
|
if (!$toFinal && [] === $destUsers && [] === $destEmails) {
|
||||||
$context
|
$context
|
||||||
->buildViolation('workflow.You must add at least one dest user or email')
|
->buildViolation('workflow.You must add at least one dest user or email')
|
||||||
|
@ -11,7 +11,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\EventListener;
|
namespace Chill\PersonBundle\EventListener;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\User;
|
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
|
||||||
@ -27,6 +26,7 @@ class AccompanyingPeriodWorkEventListener
|
|||||||
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
||||||
{
|
{
|
||||||
$referrer = $work->getAccompanyingPeriod()->getUser();
|
$referrer = $work->getAccompanyingPeriod()->getUser();
|
||||||
|
|
||||||
if (null !== $referrer) {
|
if (null !== $referrer) {
|
||||||
$work->addReferrer($referrer);
|
$work->addReferrer($referrer);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user