FormPersistenceManagerInterface

The form persistence manager interface

Scope: frontend / backend

Internal

Table of Contents

Constants

FORM_DEFINITION_FILE_EXTENSION  = '.form.yaml'

Methods

delete()  : void
Delete the form representation identified by $persistenceIdentifier
getAccessibleExtensionFolders()  : array<string|int, mixed>
Return a list of all accessible extension folders
getAccessibleFormStorageFolders()  : array<string|int, 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<string|int, mixed>
List all form definitions which can be loaded through this form persistence manager.
load()  : array<string|int, mixed>
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<string|int, mixed> $formSettings) : void
Parameters
$persistenceIdentifier : string
$formSettings : array<string|int, mixed>
Tags
throws
PersistenceManagerException

getAccessibleExtensionFolders()

Return a list of all accessible extension folders

public getAccessibleExtensionFolders(array<string|int, mixed> $formSettings) : array<string|int, mixed>
Parameters
$formSettings : array<string|int, mixed>
Return values
array<string|int, mixed>

getAccessibleFormStorageFolders()

Return a list of all accessible file mount points

public getAccessibleFormStorageFolders(array<string|int, mixed> $formSettings) : array<string|int, Folder>
Parameters
$formSettings : array<string|int, mixed>
Return values
array<string|int, Folder>

getUniqueIdentifier()

public getUniqueIdentifier(array<string|int, mixed> $formSettings, string $identifier) : string
Parameters
$formSettings : array<string|int, mixed>
$identifier : string
Return values
string

getUniquePersistenceIdentifier()

This takes a form identifier and returns a unique persistence identifier for it.

public getUniquePersistenceIdentifier(string $formIdentifier, string $savePath, array<string|int, mixed> $formSettings) : string
Parameters
$formIdentifier : string
$savePath : string
$formSettings : array<string|int, mixed>
Return values
string

hasForms()

Check if any form definition is available

public hasForms(array<string|int, mixed> $formSettings) : bool
Parameters
$formSettings : array<string|int, mixed>
Return values
bool

hasValidFileExtension()

public hasValidFileExtension(string $fileName) : bool
Parameters
$fileName : string
Return values
bool

isAllowedPersistencePath()

public isAllowedPersistencePath(string $persistencePath, array<string|int, mixed> $formSettings) : bool
Parameters
$persistencePath : string
$formSettings : array<string|int, mixed>
Return values
bool

listForms()

List all form definitions which can be loaded through this form persistence manager.

public listForms(array<string|int, mixed> $formSettings) : array<string|int, mixed>

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<string|int, mixed>
Return values
array<string|int, mixed>

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<string|int, mixed> $formSettings, array<string|int, mixed> $typoScriptSettings) : array<string|int, mixed>
Parameters
$persistenceIdentifier : string
$formSettings : array<string|int, mixed>
$typoScriptSettings : array<string|int, mixed>

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
array<string|int, mixed>

save()

Save the array form representation identified by $persistenceIdentifier

public save(string $persistenceIdentifier, array<string|int, mixed> $formDefinition, array<string|int, mixed> $formSettings) : mixed
Parameters
$persistenceIdentifier : string
$formDefinition : array<string|int, mixed>
$formSettings : array<string|int, mixed>
Tags
throws
PersistenceManagerException

        
On this page

Search results