Form & save into DB

This commit is contained in:
Jean-Francois Monfort
2021-05-06 09:36:03 +02:00
parent 82d8556f24
commit 4d8afd53ad
7 changed files with 109 additions and 134 deletions

View File

@@ -134,6 +134,7 @@ class ActivityType extends AbstractType
'label' => $activityType->getLabel('reasons'),
'required' => $activityType->isRequired('reasons'),
'class' => ActivityReason::class,
'multiple' => true,
'choice_label' => function (ActivityReason $activityReason) {
return $this->translatableStringHelper->localize($activityReason->getName());
},
@@ -172,6 +173,7 @@ class ActivityType extends AbstractType
'label' => $activityType->getLabel('thirdParties'),
'required' => $activityType->isRequired('thirdParties'),
'class' => ThirdParty::class,
'multiple' => true,
'choice_label' => function (ThirdParty $thirdParty) {
return $thirdParty->getName();
},
@@ -189,6 +191,7 @@ class ActivityType extends AbstractType
'label' => $activityType->getLabel('users'),
'required' => $activityType->isRequired('users'),
'class' => User::class,
'multiple' => true,
'choice_label' => function (User $user) {
return $user->getUsername();
},