chore: simplify parameter handling
This commit is contained in:
1 parent
3df9659ce2
commit
65398d59d4
3 files changed
+12
-104
No files matched your search
@@ -74,29 +74,15 @@ trait ParticipantCardFlowTrait
|
||||
// Merge default options with provided options and body dimensions
|
||||
$formOptions = array_merge([
|
||||
'booking_context' => $bookingDto,
|
||||
'height_choices' => $this->getHeightChoices(),
|
||||
'weight_choices' => $this->getWeightChoices(),
|
||||
'shoe_size_min' => $this->getShoeSizeMin(),
|
||||
'shoe_size_max' => $this->getShoeSizeMax(),
|
||||
'height_choices' => $this->getParameter('body_dimensions.height_choices'),
|
||||
'weight_choices' => $this->getParameter('body_dimensions.weight_choices'),
|
||||
'shoe_size_min' => $this->getParameter('body_dimensions.shoe_size_min'),
|
||||
'shoe_size_max' => $this->getParameter('body_dimensions.shoe_size_max'),
|
||||
], $options);
|
||||
|
||||
return $this->createForm(BookingParticipantType::class, $wrapper, $formOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
abstract private function getHeightChoices(): array;
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
abstract private function getWeightChoices(): array;
|
||||
|
||||
abstract private function getShoeSizeMin(): int;
|
||||
|
||||
abstract private function getShoeSizeMax(): int;
|
||||
|
||||
/**
|
||||
* Collects notifications from all participants and clears them from DTOs.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user