Skip to content
Corex

Flow

Corex\Forms\Flow\Flow · class · Forms layer

Immutable identity and lifecycle projection for one persisted flow.

__construct(int $id, string $uuid, string $slug, string $name, string $description, string $state, int $ownerId, string $placementType, ?int $placementId, int $currentDraftVersion, int $publishedVersion, bool $testMode, int $createdBy, int $updatedBy, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt, ?DateTimeImmutable $publishedAt, ?DateTimeImmutable $closedAt, ?DateTimeImmutable $expiresAt)

Section titled “__construct(int $id, string $uuid, string $slug, string $name, string $description, string $state, int $ownerId, string $placementType, ?int $placementId, int $currentDraftVersion, int $publishedVersion, bool $testMode, int $createdBy, int $updatedBy, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt, ?DateTimeImmutable $publishedAt, ?DateTimeImmutable $closedAt, ?DateTimeImmutable $expiresAt)”

This constructor is an immutable domain record. Its named arguments map directly to the persisted Flow schema; none are service collaborators.

withDraftVersion(int $version, int $actorId, DateTimeImmutable $occurredAt): self

Section titled “withDraftVersion(int $version, int $actorId, DateTimeImmutable $occurredAt): self”

withState(string $state, int $publishedVersion, int $actorId, DateTimeImmutable $occurredAt): self

Section titled “withState(string $state, int $publishedVersion, int $actorId, DateTimeImmutable $occurredAt): self”