FlowRepository
Corex\Forms\Flow\FlowRepository · class · Forms layer
Owns flow and append-only version persistence.
Public API
Section titled “Public API”__construct(FlowStore $store, BootLogger $logger)
Section titled “__construct(FlowStore $store, BootLogger $logger)”save(Flow $flow): Flow
Section titled “save(Flow $flow): Flow”appendVersion(FlowVersion $version): FlowVersion
Section titled “appendVersion(FlowVersion $version): FlowVersion”find(int $flowId): ?Flow
Section titled “find(int $flowId): ?Flow”findBySlug(string $slug): ?Flow
Section titled “findBySlug(string $slug): ?Flow”all(): array
Section titled “all(): array”Every flow that can be read. A record that cannot be is left out and named in the log. Each reader of this list used to get every flow or an exception, so one record without its payload emptied the Forms screen, the form filter on Submissions and Data, and the flow counts, all at once.
allWithDraft(): array
Section titled “allWithDraft(): array”Every readable flow beside the draft it points at, for a list that shows both.
findVersion(int $flowId, int $versionNumber): ?FlowVersion
Section titled “findVersion(int $flowId, int $versionNumber): ?FlowVersion”versions(int $flowId): array
Section titled “versions(int $flowId): array”Every version of a flow, or none of them. A version that cannot be read is not left out the way a flow is in all(). Its number is part of what cannot be read, and appendVersion() asks this list whether a number is taken.