#7 - QR Codes & payments

This commit was merged in pull request #22.
This commit is contained in:
Martin Slachta
2026-06-16 19:33:55 +02:00
parent cfbdca238c
commit df5f9b1df4
11 changed files with 251 additions and 72 deletions
@@ -0,0 +1,19 @@
<?php
/** Values derived from a submission (not entered by the visitor), exposed to templates. */
final class RsvFormCalculatedValues {
/** @return array<string, mixed> */
public function for(RsvFormDefinition $definition, RsvFormData $data): array {
return [
'price' => (new RsvFormPriceCalculator())->calculate($definition, $data),
];
}
/**
* The names these values expose, so template validation accepts {{ price }}.
* @return list<string>
*/
public static function names(): array {
return ['price'];
}
}