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.
Public API
Section titled “Public API”save(string $slug, array $values): int
Section titled “save(string $slug, array $values): int”The {@see SubmissionStore} seam (spec 045): persist and return the id. The default post-meta driver.
store(string $slug, array $values): Model
Section titled “store(string $slug, array $values): Model”storeFlow(FlowSubmissionRecord $record): int
Section titled “storeFlow(FlowSubmissionRecord $record): int”emailSource(int $submissionId): ?array
Section titled “emailSource(int $submissionId): ?array”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.