FormPersistenceManagerInterface
The form persistence manager interface
Scope: frontend / backend
Table of Contents
Constants
- FORM_DEFINITION_FILE_EXTENSION : mixed = '.form.yaml'
Methods
- delete() : void
- Delete the form representation identified by $persistenceIdentifier
- getAccessibleExtensionFolders() : array
- Return a list of all accessible extension folders
- getAccessibleFormStorageFolders() : Folder[]
- Return a list of all accessible file mount points
- getUniqueIdentifier() : string
- getUniquePersistenceIdentifier() : string
- This takes a form identifier and returns a unique persistence identifier for it.
- hasForms() : bool
- Check if any form definition is available
- hasValidFileExtension() : bool
- isAllowedPersistencePath() : bool
- listForms() : array
- List all form definitions which can be loaded through this form persistence manager.
- load() : array
- Load the array form representation identified by $persistenceIdentifier, and return it.
- save() : mixed
- Save the array form representation identified by $persistenceIdentifier
Constants
FORM_DEFINITION_FILE_EXTENSION
public
mixed
FORM_DEFINITION_FILE_EXTENSION
= '.form.yaml'
Methods
delete()
Delete the form representation identified by $persistenceIdentifier
public
delete(string $persistenceIdentifier, array $formSettings) : void
Parameters
- $persistenceIdentifier : string
- $formSettings : array
Tags
getAccessibleExtensionFolders()
Return a list of all accessible extension folders
public
getAccessibleExtensionFolders(array $formSettings) : array
Parameters
- $formSettings : array
Return values
arraygetAccessibleFormStorageFolders()
Return a list of all accessible file mount points
public
getAccessibleFormStorageFolders(array $formSettings) : Folder[]
Parameters
- $formSettings : array
Return values
Folder[]getUniqueIdentifier()
public
getUniqueIdentifier(array $formSettings, string $identifier) : string
Parameters
- $formSettings : array
- $identifier : string
Return values
stringgetUniquePersistenceIdentifier()
This takes a form identifier and returns a unique persistence identifier for it.
public
getUniquePersistenceIdentifier(string $formIdentifier, string $savePath, array $formSettings) : string
Parameters
- $formIdentifier : string
- $savePath : string
- $formSettings : array
Return values
stringhasForms()
Check if any form definition is available
public
hasForms(array $formSettings) : bool
Parameters
- $formSettings : array
Return values
boolhasValidFileExtension()
public
hasValidFileExtension(string $fileName) : bool
Parameters
- $fileName : string
Return values
boolisAllowedPersistencePath()
public
isAllowedPersistencePath(string $persistencePath, array $formSettings) : bool
Parameters
- $persistencePath : string
- $formSettings : array
Return values
boollistForms()
List all form definitions which can be loaded through this form persistence manager.
public
listForms(array $formSettings[, string $orderField = '' ][, SortDirection|null $orderDirection = null ]) : array
Returns an associative array with each item containing the keys 'name' (the human-readable name of the form) and 'persistenceIdentifier' (the unique identifier for the Form Persistence Manager e.g. the path to the saved form definition).
Parameters
- $formSettings : array
- $orderField : string = ''
- $orderDirection : SortDirection|null = null
Return values
array —in the format [['name' => 'Form 01', 'persistenceIdentifier' => 'path1'], [ .... ]]
load()
Load the array form representation identified by $persistenceIdentifier, and return it.
public
load(string $persistenceIdentifier, array $formSettings, array $typoScriptSettings) : array
Parameters
- $persistenceIdentifier : string
- $formSettings : array
- $typoScriptSettings : array
-
FE TS "plugin.tx_form.settings" - Given when rendering a form as plugin using FormFrontendController or formvh:render, empty array in all BE usages. Intended to override details like labels of single forms.
Return values
arraysave()
Save the array form representation identified by $persistenceIdentifier
public
save(string $persistenceIdentifier, array $formDefinition, array $formSettings) : mixed
Parameters
- $persistenceIdentifier : string
- $formDefinition : array
- $formSettings : array