Method | Description | Returns |
---|---|---|
getAvailableLayouts() | Get the available layouts for showing forms | Collection |
getCurrentSubmission() | Get the current form submission | FormSubmission |
hasFileInput() | Returns whether form has InputFile at any step. This method can be used to decide whether to add `enctype="multipart/form-data"` to form. | bool |
getSteps() | Get the steps for the active revision of the form. Returns null if the form does not have an active revision. | Collection |
getElements() | Get the elements for the active revision of the form. Returns null if the form does not have an active revision. | Collection |
isSupportingBranches() | Checks whether the record supports branches | bool |
getAssignedWorkflow() | Get the workflow assigned to the record or entity | Workflow |
hasAssignedWorkflow() | Check whether the record has an assigned workflow | bool |
getBranches() | Get the branches associated with the record | Collection |
getBranchRevisions(RevisionBranch $branch) | Get the revisions for the provided branch | Collection |
getNumRevisionsWithoutBranch() | Get the number of revisions without branch | int |
getRevisionsWithoutBranch() | Get all revisions without branch | Collection |
getId() | int | |
getName() | string | |
getIdentifier() | string | |
getExternalId() | string | |
getCreated() | Date the record was created. | DateTime |
getModified() | Last modification date for the record. | DateTime |
getPublished() | DateTime | |
getSite() | Site | |
getActiveRevision() | FormRevision | |
isPublished() | Determines if the record is published. | bool |
getRevisions() | Collection (FormRevision) | |
getSubmissions() | Collection (FormSubmission) | |
getRevisionById(int $id) | Model | |
getLastRevision() | Model | |
getCustomFieldValues() | Collection (FormCustomFieldValue) | |
getCustomFieldValue(CustomField $customField) | Get the value for a custom field | CustomFieldValue |
getCustomFieldValueByName(string $customFieldName) | Get the value for a custom field by the custom field name | CustomFieldValue |
getCustomFieldContent(string $customFieldName) | Get the content for the custom field identified by the specified name | Content |
getCustomFieldContentOrDefault(string $customFieldName) | Get the content (or default content) for the custom field identified by the specified name | Content |
getCustomFieldBoolean(string $customFieldName, ?bool|null $default) | Get the (default) content of the custom field as boolean value | bool |
getCustomFieldText(string $customFieldName, ?string|null $default) | Get the (default) content of the custom field as text | string |
getCustomFieldImage(string $customFieldName) | Get the (default) image contained in the custom field | Image |
getCustomFieldFile(string $customFieldName) | Get the (default) file contained in the custom field | File |
getCustomFields() | Get the custom fields for this entity | array |
hasCustomField(string $customFieldName) | Check if the entity has a custom field with the specified name | bool |
isNewRecord() | Check if the record is a new record | bool |
isHierarchicalModel() | Check whether a model is a hierarchical model, i.e. can have children | bool |
isVersionedModel() | Check whether a model is versioned | bool |
getTotalSubmissionsCount() | Get the total number of form submissions. In the backend, this is calculated on the fly based on user access permissions. | int |
getUniqueInputElements() | Returns unique by name input elements of this model. Returns all elements through all revisions. | Collection |
getHateoasLinks() | Get the HATEOAS links for the record | array |
getEditUrl() | Get the url for editing the record. | string |
getDeleteUrl() | Get the url for deleting the record. | string |
getDuplicateUrl() | Get the url for duplicating the record. | string |
getPermissionsUrl() | Get the url for editing the permissions of the record. | string |
getCheckPermissionsUrl() | Get the url for checking user permissions for this record. | string |
getPublishUrl() | Get the url for publishing the record. | string |
getAvailableSaveActions(?Coredna\Kernel\Models\Model|null $currentRevision) | Get the save actions available for the record and provided revision being edited | array |
getAvailableSaveNewActions() | Get the actions available for saving a new version of the record. Determined whether an active revision can be set directly, and in which order the actions should be returned. | array |
getRevisionActions(Coredna\Kernel\Models\Model $revision, ?Coredna\Kernel\Models\Model|null $currentRevision) | Get the actions available for the provided revision | array |
getUpdateRevisionId(Coredna\Kernel\Models\Revision $revision) | Get the revision ID to use when updating the record. If the provided revision is a draft, the previous id is returned, if one exists. | int |
Forms\Models\Backend\Form
Form