add configurable form finishers and webhook delivery
Expose finisher settings through the editor registry and build the action editor dynamically. Add configurable admin email recipients and subjects, and introduce a webhook finisher with validated request options and JSON submission payloads. Expand submission handler tests to cover editor configuration, email overrides, webhook validation, HTTP responses, and submission outcomes.
This commit is contained in:
@@ -15,6 +15,19 @@ class FinishersRepository {
|
||||
return $this->config['finishers'][$key] ?? null;
|
||||
}
|
||||
|
||||
public function getEditorConfig(): array
|
||||
{
|
||||
$editorConfig = [];
|
||||
foreach ($this->config['finishers'] as $key => $config) {
|
||||
$editorConfig[$key] = [
|
||||
'label' => $config['label'] ?? $key,
|
||||
'settings' => $config['settings'] ?? [],
|
||||
];
|
||||
}
|
||||
|
||||
return $editorConfig;
|
||||
}
|
||||
|
||||
public function finisherExists (string $key) : bool
|
||||
{
|
||||
return array_key_exists($key, $this->config['finishers']);
|
||||
|
||||
Reference in New Issue
Block a user