Consent factory¶
New consents are normally built by the consent finisher,
based on the current FormRuntime
. In order to better separate
the actual consent building process from the form submission, a
dedicated consent factory is provided.
- class EliasHaeussler\Typo3FormConsent\Domain\Factory\ConsentFactory¶
Factory class to create new consents from a given form.
- createFromForm($finisherOptions, $finisherContext)¶
Create a new form consent from the given form, derived from the given finisher options.
Tip
This method's result can be modified by listening on the ModifyConsentEvent.
- Parameters
$finisherOptions (
EliasHaeussler\Typo3FormConsent\Domain\Finishers\FinisherOptions
) -- Consent finisher options of the current form$finisherContext (
TYPO3\CMS\Form\Domain\Finishers\FinisherContext
) -- The current finisher context
- Return type
EliasHaeussler\Typo3FormConsent\Domain\Model\Consent