AbstractFormFactory implements FormFactoryInterface
AbstractYes
Base class for custom *Form Factories*. A Form Factory is responsible for building a {@link TYPO3\CMS\Form\Domain\Model\FormDefinition}.
Example
Generally, you should use this class as follows:
class MyFooBarFactory extends AbstractFormFactory { public function build(array $configuration, $prototypeName) { $configurationService = GeneralUtility::makeInstance(ConfigurationService::class); $prototypeConfiguration = $configurationService->getPrototypeConfiguration($prototypeName); $formDefinition = GeneralUtility::makeInstance(FormDefinition::class, 'nameOfMyForm', $prototypeConfiguration); // now, you should call methods on $formDefinition to add pages and form elements return $formDefinition; } }
Scope: frontend / backend This class is meant to be sub classed by developers.
Table of Contents
Interfaces
- FormFactoryInterface
- A Form Factory is responsible for building a {@link TYPO3\CMS\Form\Domain\Model\FormDefinition}.
Methods
- triggerFormBuildingFinished() : mixed
- Helper to be called by every AbstractFormFactory after everything has been built to call the "afterBuildingFinished" hook on all form elements.
Methods
triggerFormBuildingFinished()
Helper to be called by every AbstractFormFactory after everything has been built to call the "afterBuildingFinished" hook on all form elements.
protected
triggerFormBuildingFinished(FormDefinition $form) : mixed
Parameters
- $form : FormDefinition