PropertyMappingConfiguration implements AfterFormStateInitializedInterface
Scope: frontend
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Interfaces
- AfterFormStateInitializedInterface
- Event is triggered with current form state and form session, which is not the case with e.g. `afterBuildingFinished`. Can be used to further enrich components with runtime state.
Methods
- afterFormStateInitialized() : void
- adjustPropertyMappingForFileUploadsAtRuntime() : void
- Adjusts property mapping configuration for file upload elements at runtime.
Methods
afterFormStateInitialized()
public
afterFormStateInitialized(FormRuntime $formRuntime) : void
Parameters
- $formRuntime : FormRuntime
-
holding current form state and static form definition
adjustPropertyMappingForFileUploadsAtRuntime()
Adjusts property mapping configuration for file upload elements at runtime.
protected
adjustPropertyMappingForFileUploadsAtRuntime(FormRuntime $formRuntime, RenderableInterface $renderable) : void
At this point, form definition properties (from YAML) are fully available, unlike in initializeFormElement() which runs before YAML properties are set.
This sets:
- CONFIGURATION_UPLOAD_SEED: derived from the form session identifier for creating storage sub-folders.
- CONFIGURATION_ALLOW_REMOVAL: from the element's 'allowRemoval' property to enable HMAC-signed file deletion.
Parameters
- $formRuntime : FormRuntime
- $renderable : RenderableInterface