mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
DX: fix cs
This commit is contained in:
@@ -143,10 +143,10 @@ class AccompanyingPeriodContext implements
|
||||
->add('category', EntityType::class, [
|
||||
'placeholder' => 'Choose a document category',
|
||||
'class' => DocumentCategory::class,
|
||||
'query_builder' => static fn(EntityRepository $er) => $er->createQueryBuilder('c')
|
||||
'query_builder' => static fn (EntityRepository $er) => $er->createQueryBuilder('c')
|
||||
->where('c.documentClass = :docClass')
|
||||
->setParameter('docClass', AccompanyingCourseDocument::class),
|
||||
'choice_label' => fn($entity = null) => $entity ? $this->translatableStringHelper->localize($entity->getName()) : '',
|
||||
'choice_label' => fn ($entity = null) => $entity ? $this->translatableStringHelper->localize($entity->getName()) : '',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ class AccompanyingPeriodContext implements
|
||||
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, mixed $entity): void
|
||||
{
|
||||
$options = $template->getOptions();
|
||||
$persons = new ArrayCollection($entity->getCurrentParticipations()->map(static fn(AccompanyingPeriodParticipation $p) => $p->getPerson())->toArray());
|
||||
$persons = new ArrayCollection($entity->getCurrentParticipations()->map(static fn (AccompanyingPeriodParticipation $p) => $p->getPerson())->toArray());
|
||||
|
||||
foreach ($entity->getCurrentParticipations() as $p) {
|
||||
foreach ($p->getPerson()->getResources() as $r) {
|
||||
@@ -181,7 +181,7 @@ class AccompanyingPeriodContext implements
|
||||
$builder->add($key, EntityType::class, [
|
||||
'class' => Person::class,
|
||||
'choices' => $persons,
|
||||
'choice_label' => fn(Person $p) => $this->personRender->renderString($p, ['addAge' => true]),
|
||||
'choice_label' => fn (Person $p) => $this->personRender->renderString($p, ['addAge' => true]),
|
||||
'multiple' => false,
|
||||
'expanded' => true,
|
||||
'required' => false,
|
||||
|
Reference in New Issue
Block a user