Skip to content
Corex

FormCatalogEntry

Corex\Forms\Catalog\FormCatalogEntry · class · Forms layer

One form in the catalog, whatever kind of form it is. submissionCount is nullable on purpose: null means “nobody could tell us”, which is a different fact from zero and must not be flattened into one. Screens read {@see hasSubmissionCount()} rather than testing the integer, so an unmeasured form never renders as an empty one.

create(string $slug, string $label, string $source, ?int $flowId, array $fields, ?int $declaredFieldCount, bool $active, bool $editableInBuilder, ?int $submissionCount, string $capability): self

Section titled “create(string $slug, string $label, string $source, ?int $flowId, array $fields, ?int $declaredFieldCount, bool $active, bool $editableInBuilder, ?int $submissionCount, string $capability): self”

The number of fields, preferring real definitions over a declared total. A provider may know its count without being able to hand over the definitions; a code form always has the definitions themselves. Counting what we hold beats trusting what we were told.

A one-line “field: rule, rule” digest of the form’s validation, for the read-only view of a form nobody can open in the builder. Empty when no field declares a rule.