Zahlungsparser
This commit is contained in:
@@ -58,13 +58,15 @@ class PaymentMethod extends CommonModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Teilnehmer-Eingabe-Schema für einen Slug (payer-seitig).
|
||||
* Teilnehmer-Eingabe-Schema für einen Slug (payer-seitig) -- das, was das Anmeldeformular
|
||||
* abfragt. Programmatisch befüllte Felder (`system => true`, z.B. das vom Zahlungsimport
|
||||
* nachgetragene Zahler-Konto) sind hier bewusst nicht dabei.
|
||||
*
|
||||
* @return array<int, array{name: string, label: string, type: string, required: bool}>
|
||||
*/
|
||||
public static function participantOptionsFor(string $slug): array
|
||||
{
|
||||
return EventPaymentModuleRegistry::forSlug($slug)?->getParticipantOptions() ?? [];
|
||||
return EventPaymentModuleRegistry::forSlug($slug)?->participantInputOptions() ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,6 +90,20 @@ class PaymentMethod extends CommonModel
|
||||
return EventPaymentModuleRegistry::forSlug($slug)?->sanitizeConfiguration($config) ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Entfernt die tenant-weiten Optionen eines Slugs aus einer Konfiguration.
|
||||
*
|
||||
* Aufgerufen beim Copy-on-Assign an eine Veranstaltung: Was den Mandanten als Ganzes betrifft
|
||||
* (z.B. das Kontoauszug-Format), darf nicht pro Aktion einfrieren.
|
||||
*
|
||||
* @param array<string, mixed> $config
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public static function stripTenantScopedOptions(string $slug, array $config): array
|
||||
{
|
||||
return EventPaymentModuleRegistry::forSlug($slug)?->stripTenantScopedOptions($config) ?? $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft, ob alle Pflicht-Optionen eines Slugs in der Konfiguration befüllt (non-empty) sind.
|
||||
* Unbekannte Slugs (kein Modul) gelten als vollständig -- kein Modul, keine Pflichtfelder.
|
||||
|
||||
Reference in New Issue
Block a user