Skip to content
Corex

SubmissionRepository

Corex\Forms\Submission\SubmissionRepository · class · Forms layer

Persists submissions through the data layer (Principle III: the repository is the only layer that touches the data source). Stores a private corex_submission post plus the form slug and each validated value as corex_field_* meta — queryable by slug.

The {@see SubmissionStore} seam (spec 045): persist and return the id. The default post-meta driver.

storeFlow(FlowSubmissionRecord $record): int

Section titled “storeFlow(FlowSubmissionRecord $record): int”

What a flow email of this submission was addressed from: the flow and version it was made with, its answers and its routing (spec 112, FR-032a). Null for a submission no flow made.

updatePipelineMetadata(int $submissionId, array $metadata): void

Section titled “updatePipelineMetadata(int $submissionId, array $metadata): void”

appendTimeline(int $submissionId, string $stage, string $outcome, array $summary): void

Section titled “appendTimeline(int $submissionId, string $stage, string $outcome, array $summary): void”

Append a timeline event in the one canonical shape the admin screens read ({id, submission_id, stage, outcome, summary, created_at}) — the same shape Corex\Config\Submissions\SubmissionTimelineRepository writes, so the pipeline’s own events are no longer a foreign shape the UI has to special-case.