[!!!][TASK] EXT:form - Use Extbase/ Fluid for frontend rendering 27/42927/15
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Fri, 18 Sep 2015 14:07:24 +0000 (16:07 +0200)
committerBenni Mack <benni@typo3.org>
Fri, 18 Sep 2015 18:51:12 +0000 (20:51 +0200)
The form extension - including the custom data model, controller logic,
property validation, views and templating - has been adopted to support
the Extbase/ Fluid MVC stack. This allows better customization and
control of the generated behavior and markup by simply modifying Fluid
templates or utilizing own custom view helper logic. At the same time
the rewrite must not break current setups, i.e. the frontend rendering
must be as compatible as possible.

Resolves: #69401
Releases: master
Change-Id: Ieece008316417f70b54906221dbba4f9bcbf7f33
Reviewed-on: http://review.typo3.org/42927
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
503 files changed:
typo3/sysext/core/Documentation/Changelog/master/Breaking-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Deprecation-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Feature-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst [new file with mode: 0644]
typo3/sysext/form/Classes/Bootstrap.php [new file with mode: 0644]
typo3/sysext/form/Classes/Controller/FormController.php [deleted file]
typo3/sysext/form/Classes/Controller/FrontendController.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Builder/ElementBuilder.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Builder/FormBuilder.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Builder/ValidationBuilder.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php [deleted file]
typo3/sysext/form/Classes/Domain/Filter/AbstractFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/AlphabeticFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/AlphanumericFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/CurrencyFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/DigitFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/FilterInterface.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/IntegerFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/LowerCaseFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/RegExpFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/RemoveXssFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/StripNewLinesFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/TitleCaseFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/TrimFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Filter/UpperCaseFilter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Model/Additional/AbstractAdditionalElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Additional/AdditionalAdditionalElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Additional/ErrorAdditionalElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Additional/LabelAdditionalElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Additional/LegendAdditionalElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Additional/MandatoryAdditionalElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/AbstractAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/AcceptAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/AcceptCharsetAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/AccesskeyAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/ActionAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/AltAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/CheckedAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/ClassAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/ColsAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/DirAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/DisabledAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/EnctypeAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/IdAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/LabelAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/LangAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/MaxlengthAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/MethodAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/MultipleAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/NameAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/PlaceholderAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/ReadonlyAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/RowsAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/SelectedAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/SizeAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/SrcAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/StyleAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/TabindexAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/TitleAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/TypeAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Attribute/ValueAttribute.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Configuration.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Model/Element.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Model/Element/AbstractElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/AbstractPlainElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/ButtonElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/CheckboxElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/CheckboxGroupElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/ContainerElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/ContentElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/FieldsetElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/FileuploadElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/HeaderElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/HiddenElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/ImagebuttonElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/OptgroupElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/OptionElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/PasswordElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/RadioElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/RadioGroupElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/ResetElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/SelectElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/SubmitElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/TextareaElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/TextblockElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Element/TextlineElement.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/Form.php [deleted file]
typo3/sysext/form/Classes/Domain/Model/ValidationElement.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Property/TypeConverter/ArrayToValidationElementConverter.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Repository/TypoScriptRepository.php [new file with mode: 0644]
typo3/sysext/form/Classes/Domain/Validator/AbstractValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/AlphabeticValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/AlphanumericValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/BetweenValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/DateValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/DigitValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/EmailValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/EqualsValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/FileAllowedTypesValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/FileMaximumSizeValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/FileMinimumSizeValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/FloatValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/GreaterThanValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/InArrayValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/IntegerValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/IpValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/LengthValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/LessThanValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/RegExpValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/RequiredValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/UriValidator.php [new file with mode: 0755]
typo3/sysext/form/Classes/Domain/Validator/ValidationElementValidator.php [new file with mode: 0644]
typo3/sysext/form/Classes/ElementCounter.php [deleted file]
typo3/sysext/form/Classes/Filter/AlphabeticFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/AlphanumericFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/CurrencyFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/DigitFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/FilterInterface.php [deleted file]
typo3/sysext/form/Classes/Filter/IntegerFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/LowerCaseFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/RegExpFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/RemoveXssFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/StripNewLinesFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/TitleCaseFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/TrimFilter.php [deleted file]
typo3/sysext/form/Classes/Filter/UpperCaseFilter.php [deleted file]
typo3/sysext/form/Classes/Hooks/ContentObjectHook.php [new file with mode: 0644]
typo3/sysext/form/Classes/Hooks/HandleIncomingFormValues.php [new file with mode: 0644]
typo3/sysext/form/Classes/Layout.php [deleted file]
typo3/sysext/form/Classes/Localization.php [deleted file]
typo3/sysext/form/Classes/Mvc/Controller/ControllerContext.php [new file with mode: 0644]
typo3/sysext/form/Classes/ObjectFactory.php [deleted file]
typo3/sysext/form/Classes/PostProcess/AbstractPostProcessor.php [new file with mode: 0644]
typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php
typo3/sysext/form/Classes/PostProcess/PostProcessor.php
typo3/sysext/form/Classes/PostProcess/PostProcessorInterface.php
typo3/sysext/form/Classes/PostProcess/RedirectPostProcessor.php
typo3/sysext/form/Classes/Request.php [deleted file]
typo3/sysext/form/Classes/Utility/CompatibilityLayerUtility.php [new file with mode: 0644]
typo3/sysext/form/Classes/Utility/FilterUtility.php [deleted file]
typo3/sysext/form/Classes/Utility/FormUtility.php
typo3/sysext/form/Classes/Utility/SessionUtility.php [new file with mode: 0644]
typo3/sysext/form/Classes/Utility/TypoScriptToJsonConverter.php
typo3/sysext/form/Classes/Utility/ValidatorUtility.php [deleted file]
typo3/sysext/form/Classes/Validation/AbstractValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/AlphabeticValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/AlphanumericValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/BetweenValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/DateValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/DigitValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/EmailValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/EqualsValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/FileAllowedTypesValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/FileMaximumSizeValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/FileMinimumSizeValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/FloatValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/GreaterThanValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/InArrayValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/IntegerValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/IpValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/LengthValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/LessthanValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/RegExpValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/RequiredValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/UriValidator.php [deleted file]
typo3/sysext/form/Classes/Validation/ValidatorInterface.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Additional/AdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Additional/LabelAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Additional/LegendAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/ConfirmationView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/AbstractElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/CheckboxElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/CheckboxGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/ContainerElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/FieldsetElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/FileuploadElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/OptgroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/OptionElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/RadioElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/RadioGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/SelectElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/TextareaElementView.php [deleted file]
typo3/sysext/form/Classes/View/Confirmation/Element/TextlineElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Additional/AdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Additional/ErrorAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Additional/LabelAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Additional/LegendAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Additional/MandatoryAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/AbstractElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/ButtonElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/CheckboxElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/CheckboxGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/ContainerElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/ContentElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/FieldsetElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/FileuploadElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/HeaderElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/HiddenElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/ImagebuttonElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/OptgroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/OptionElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/PasswordElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/RadioElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/RadioGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/ResetElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/SelectElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/SubmitElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/TextareaElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/TextblockElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/Element/TextlineElementView.php [deleted file]
typo3/sysext/form/Classes/View/Form/FormView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Additional/AdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Additional/LabelAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Additional/LegendAdditionalElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/AbstractElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/CheckboxElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/CheckboxGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/ContainerElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/FieldsetElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/FileuploadElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/HiddenElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/OptgroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/OptionElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/RadioElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/RadioGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/SelectElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/TextareaElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/Element/TextlineElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Html/HtmlView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/MailView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/AbstractElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/CheckboxElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/CheckboxGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/ContainerElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/FieldsetElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/FileuploadElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/HiddenElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/OptgroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/OptionElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/RadioElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/RadioGroupElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/SelectElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/TextareaElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/Element/TextlineElementView.php [deleted file]
typo3/sysext/form/Classes/View/Mail/Plain/PlainView.php [deleted file]
typo3/sysext/form/Classes/ViewHelpers/AggregateSelectOptionsViewHelper.php [new file with mode: 0644]
typo3/sysext/form/Classes/ViewHelpers/PlainMailViewHelper.php [new file with mode: 0644]
typo3/sysext/form/Classes/ViewHelpers/SelectViewHelper.php [new file with mode: 0644]
typo3/sysext/form/Configuration/PageTS/modWizards.ts [new file with mode: 0644]
typo3/sysext/form/Configuration/PageTSconfig/modWizards.ts [deleted file]
typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/form/Configuration/TypoScript/constants.txt [new file with mode: 0755]
typo3/sysext/form/Configuration/TypoScript/setup.txt
typo3/sysext/form/Resources/Private/Layouts/Default.html [new file with mode: 0755]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Html/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/PostProcessor/Mail/Plain/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Plain/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/ContainerElements/Checkboxgroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/ContainerElements/Fieldset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/ContainerElements/Form.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/ContainerElements/Radiogroup.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Button.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/ButtonTag.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Checkbox.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/ContentElement.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Header.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Hidden.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Imagebutton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Input.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/InputTypeButton.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Password.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Radio.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Reset.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Select.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Submit.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Textarea.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Textblock.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Textfield.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Upload.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Templates/Frontend/AfterProcess.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Templates/Frontend/Confirmation.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Templates/Frontend/Show.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Templates/PostProcessor/Mail/Compatibility/Html.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Templates/PostProcessor/Mail/Compatibility/Plain.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Templates/PostProcessor/Mail/Default/Html.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Templates/PostProcessor/Mail/Default/Plain.html [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Domain/Factory/TypoScriptFactoryTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Domain/Model/Attribute/AttributesAttributeTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Domain/Model/ConfigurationTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Filter/AlphabeticFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/AlphanumericFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/CurrencyFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/DigitFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/IntegerFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/LowerCaseFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/RegExpFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/RemoveXssFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/StripNewLinesFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/TitleCaseFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/TrimFilterTest.php
typo3/sysext/form/Tests/Unit/Filter/UpperCaseFilterTest.php
typo3/sysext/form/Tests/Unit/Fixtures/PostProcessorWithFormPrefixFixture.php
typo3/sysext/form/Tests/Unit/Fixtures/PostProcessorWithoutFormPrefixFixture.php
typo3/sysext/form/Tests/Unit/Fixtures/PostProcessorWithoutInterfaceFixture.php
typo3/sysext/form/Tests/Unit/PostProcess/MailPostProcessorTest.php
typo3/sysext/form/Tests/Unit/PostProcess/PostProcessorTest.php
typo3/sysext/form/Tests/Unit/Validation/AlphabeticValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/AlphanumericValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/BetweenValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/DateValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/DigitValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/EmailValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/EqualsValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/FileAllowedTypesValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/FileMaximumSizeValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/FileMinimumSizeValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/FloatValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/GreaterThanValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/Helper.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/InArrayValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/IntegerValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/IpValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/LengthValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/LessThanValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/RegExpValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/RequiredValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validation/UriValidatorTest.php [deleted file]
typo3/sysext/form/Tests/Unit/Validator/AbstractValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/AlphabeticValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/AlphanumericValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/BetweenValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/DateValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/DigitValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/EmailValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/EqualsValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/FileAllowedTypesValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/FileMaximumSizeValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/FileMinimumSizeValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/FloatValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/GreaterThanValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/InArrayValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/IntegerValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/IpValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/LengthValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/LessThanValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/RegExpValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/RequiredValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/Validator/UriValidatorTest.php [new file with mode: 0644]
typo3/sysext/form/Tests/Unit/View/Mail/Html/Element/AbstractElementViewTest.php [deleted file]
typo3/sysext/form/ext_emconf.php
typo3/sysext/form/ext_localconf.php
typo3/sysext/form/ext_tables.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst
new file mode 100644 (file)
index 0000000..8a79987
--- /dev/null
@@ -0,0 +1,32 @@
+=====================================================================
+Breaking: #69401 - Adopt form to support the Extbase/ Fluid MVC stack
+=====================================================================
+
+Description
+===========
+
+The postProcessor interface and the mail postProcessor have changed.
+
+Validators and filters have been moved to other folders and both class
+names and algorithms have changed.
+
+
+Impact
+======
+
+Own postProcessors, validators and filters will possibly fail with
+error.
+
+
+Affected Installations
+======================
+
+Installations with own postProcessors, validators and filters are
+affected.
+
+
+Migration
+=========
+
+Adopt own postProcessors, validators and filters to current
+implementation.
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst
new file mode 100644 (file)
index 0000000..e9149e2
--- /dev/null
@@ -0,0 +1,39 @@
+========================================================================
+Deprecation: #69401 - Adopt form to support the Extbase/ Fluid MVC stack
+========================================================================
+
+Description
+===========
+
+Form is now based on Extbase/ Fluid for frontend rendering. Therefore
+all TypoScript based layout settings have been deprecated. Using the
+following code is not recommended anymore:
+
+.. code-block:: [typoscript]
+
+       10 = FORM
+       10 {
+               layout {
+                       containerWrap = <div><elements /></div>
+                       elementWrap = <div><element /></div>
+               }
+       }
+
+Impact
+======
+
+All .layout TypoScript properties should not be used anymore. Backward
+compatibility algorithms will be removed with TYPO3 CMS 8.
+
+
+Affected Installations
+======================
+
+All installations using .layout TypoScript properties.
+
+
+Migration
+=========
+
+Get rid of .layout TypoScript properties and move to Fluid based
+templating.
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.rst
new file mode 100644 (file)
index 0000000..844961e
--- /dev/null
@@ -0,0 +1,106 @@
+====================================================================
+Feature: #69401 - Adopt form to support the Extbase/ Fluid MVC stack
+====================================================================
+
+Description
+===========
+
+Short summery
+-------------
+
+The form extension - including the custom data model, controller logic,
+property validation, views and templating - has been adopted to support
+the Extbase/ Fluid MVC stack. This allows better customization and
+control of the generated behavior and markup by simply modifying Fluid
+templates or utilizing own custom view helper logic. At the same time
+the rewrite must not break current setups, i.e. the frontend rendering
+must be as compatible as possible.
+
+Details
+-------
+
+Fluid Rendering
+^^^^^^^^^^^^^^^
+
+The rendering of the frontend output is based on Fluid. Form relies on
+the native Fluid viewhelpers of the core and ships 2 new viewhelpers
+for optimal rendering of the SELECT object including the support of
+OPTGROUP objects. Furthermore a viewhelper is included to optimize the
+output of text mails.
+
+To support existing setups a compatibility mode is introduced. The mode
+is activated by default. This has no impact on the rendering as long as
+no "old" TypoScript settings (like .layout =) are present. If old
+rendering settings are used a compatibility theme is loaded which
+guarantees maximal downward compatibility including all the different
+wrap-abilities like containerWrap and elementWrap.
+
+For new installations it is recommended to switch of the compatibility
+mode and use own Fluid templates to customize the output.
+
+For each form object and view a Fluid partial is available. There are 3
+views: the form itself (show), the confirmation page (confirmation) and
+the email (postProcessor/ mail). The patch allows to customize the
+frontend output for every single view, e.g. one can have a custom Fluid
+partial for the BUTTON object of the confirmation view.
+
+The partialRootPath can be overridden/ extended to customize the form
+objects on a global scope. Furthermore it is possible to set a partial
+path for each form element on a local scope.
+
+.. code-block:: [typoscript]
+
+       10 = BUTTON
+       10 {
+               label = My button
+               name = myButton
+               partialPath = FlatElements/MyButton
+       }
+
+The Fluid rendering would look for a MyButton.html located under the
+defined partialRootPath.
+
+In addition it is now possible to decide if an element should be
+rendered for a specific view. The visualisation can be adopted by using
+the TypoScript settings visibleInShowAction, visibleInConfirmationAction
+and visibleInMail. As an example, this is utilized to hide the FIELDSET
+object on the confirmation page which was the default behaviour in
+earlier versions of form.
+
+Extensibility
+^^^^^^^^^^^^^
+
+It is now possible to register custom form objects and attributes
+easily only by using TypoScript and Fluid. Form attributes can now be
+cObjects and use stdWrap. This is only possible if the form was not
+designed within the form wizard.
+
+Furthermore 2 new signal slots are implemented to allow the
+manipulation of the form objects and the submitted data.
+
+Validation
+^^^^^^^^^^
+
+The validators are now using the extbase property mapping validation
+process.
+
+Additional information
+^^^^^^^^^^^^^^^^^^^^^^
+
+The session handling was dropped since it was unstable (see #58765). Now
+form relies on the concepts of Extbase.
+
+The unit tests have been adopted to reflect the code changes.
+
+Future
+^^^^^^
+
+Further patches are needed to adopt the form wizard. The wizard still
+works as it used to be after applying this patch but it is not able to
+reflect the new features like choosing a partial path for a single
+element.
+
+Another patch will take care of the documentation.
+
+A few more patches will come which will fix some issues regarding the
+validators and filters.
\ No newline at end of file
diff --git a/typo3/sysext/form/Classes/Bootstrap.php b/typo3/sysext/form/Classes/Bootstrap.php
new file mode 100644 (file)
index 0000000..dd3ec7e
--- /dev/null
@@ -0,0 +1,122 @@
+<?php
+namespace TYPO3\CMS\Form;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
+use TYPO3\CMS\Form\Hooks\PageLayoutView\MailformPreviewRenderer;
+use TYPO3\CMS\Form\Hooks\ContentObjectHook;
+use TYPO3\CMS\Form\Domain\Property\TypeConverter\ArrayToValidationElementConverter;
+
+/**
+ * Bootstrapping EXT:form configuration & behavior
+ */
+class Bootstrap {
+
+       /**
+        * Gets registered element names that can be used
+        * in form's pseudo TypoScript to define form elements.
+        *
+        * @return array
+        */
+       static public function getRegisteredElementNames() {
+               return array(
+                       'BUTTON',
+                       'CHECKBOX',
+                       'CHECKBOXGROUP',
+                       'FIELDSET',
+                       'FILEUPLOAD',
+                       'HEADER',
+                       'HIDDEN',
+                       'IMAGEBUTTON',
+                       'OPTGROUP',
+                       'OPTION',
+                       'PASSWORD',
+                       'RADIO',
+                       'RADIOGROUP',
+                       'RESET',
+                       'SELECT',
+                       'SUBMIT',
+                       'TEXTAREA',
+                       'TEXTBLOCK',
+                       'TEXTLINE'
+               );
+       }
+
+       /**
+        * Initializes configuration.
+        */
+       static public function initializeConfiguration() {
+               // Apply PageTSconfig
+               ExtensionManagementUtility::addPageTSConfig(
+                       '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:form/Configuration/PageTS/modWizards.ts">'
+               );
+
+               // Backend view
+               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['mailform'] = MailformPreviewRenderer::class;
+
+               // Handling of cObjects "FORM" and "FORM_INT"
+               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'][] = array('FORM', ContentObjectHook::class);
+               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'][] = array('FORM_INT', ContentObjectHook::class);
+
+               // Extbase handling
+               ExtensionUtility::registerTypeConverter(
+                       ArrayToValidationElementConverter::class
+               );
+               ExtensionUtility::configurePlugin(
+                       'TYPO3.CMS.Form',
+                       'Form',
+                       array('Frontend' => 'show, confirmation, dispatchConfirmationButtonClick, process, afterProcess'),
+                       array('Frontend' => 'show, confirmation, dispatchConfirmationButtonClick, process, afterProcess')
+               );
+       }
+
+       /**
+        * Initializes settings.
+        */
+       static public function initializeSettings() {
+               // Register form wizard as backend module
+               ExtensionManagementUtility::addModulePath(
+                       'wizard_form',
+                       'EXT:form/Modules/Wizards/FormWizard/'
+               );
+
+               // Register static TypoScript resource
+               ExtensionManagementUtility::addStaticFile('form', 'Configuration/TypoScript/', 'Default TS');
+       }
+
+       /**
+        * Registers slots.
+        */
+       static public function registerSlots() {
+               $signalSlotDispatcher = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
+
+               $signalSlotDispatcher->connect(
+                       \TYPO3\CMS\Form\Domain\Builder\FormBuilder::class,
+                       'txFormHandleIncomingValues',
+                       \TYPO3\CMS\Form\Hooks\HandleIncomingFormValues::class,
+                       'handleIncomingFormValues'
+               );
+       }
+
+       /**
+        * @return \TYPO3\CMS\Extbase\Object\ObjectManager
+        */
+       static public function getObjectManager() {
+               return GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+       }
+
+}
\ No newline at end of file
diff --git a/typo3/sysext/form/Classes/Controller/FormController.php b/typo3/sysext/form/Classes/Controller/FormController.php
deleted file mode 100644 (file)
index ca80c0e..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Controller;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Main controller for Forms.  All requests come through this class
- * and are routed to the model and view layers for processing.
- */
-class FormController {
-
-       /**
-        * The TypoScript array
-        *
-        * @var array
-        */
-       protected $typoscript = array();
-
-       /**
-        * @var \TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory
-        */
-       protected $typoscriptFactory;
-
-       /**
-        * @var \TYPO3\CMS\Form\Localization
-        */
-       protected $localizationHandler;
-
-       /**
-        * @var \TYPO3\CMS\Form\Request
-        */
-       protected $requestHandler;
-
-       /**
-        * @var \TYPO3\CMS\Form\Layout
-        */
-       protected $layoutHandler;
-
-       /**
-        * @var \TYPO3\CMS\Form\Utility\ValidatorUtility
-        */
-       protected $validate;
-
-       /**
-        * Initialisation
-        *
-        * @param array $typoscript TS configuration for this cObject
-        * @return void
-        */
-       public function initialize(array $typoscript) {
-               $this->typoscriptFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::class);
-               $this->localizationHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Localization::class);
-               $this->layoutHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Layout::class);
-               $this->requestHandler = $this->typoscriptFactory->setRequestHandler($typoscript);
-               $this->validate = $this->typoscriptFactory->setRules($typoscript);
-               $this->typoscript = $typoscript;
-       }
-
-       /**
-        * Renders the application defined cObject FORM
-        * which overrides the TYPO3 default cObject FORM
-        *
-        * First we make a COA_INT out of it, because it does not need to be cached
-        * Then we send a FORM_INT to the COA_INT
-        * When this is read, it will call the FORM class again.
-        *
-        * It simply calls execute because this function name is not really descriptive
-        * but is needed by the core of TYPO3
-        *
-        * @param string $typoScriptObjectName Name of the object
-        * @param array $typoScript TS configuration for this cObject
-        * @param string $typoScriptKey A string label used for the internal debugging tracking.
-        * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject reference
-        * @return string HTML output
-        */
-       public function cObjGetSingleExt($typoScriptObjectName, array $typoScript, $typoScriptKey, \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject) {
-               $content = '';
-               if ($typoScriptObjectName === 'FORM' && !empty($typoScript['useDefaultContentObject'])) {
-                       $content = $contentObject->getContentObject($typoScriptObjectName)->render($typoScript);
-               } elseif ($typoScriptObjectName === 'FORM') {
-                       if ($contentObject->data['CType'] === 'mailform') {
-                               $bodytext = $contentObject->data['bodytext'];
-                               /** @var $typoScriptParser \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser */
-                               $typoScriptParser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
-                               $typoScriptParser->parse($bodytext);
-                               $mergedTypoScript = (array)$typoScriptParser->setup;
-                               \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($mergedTypoScript, (array)$typoScript);
-                               // Disables content elements since TypoScript is handled that could contain insecure settings:
-                               $mergedTypoScript[\TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory::PROPERTY_DisableContentElement] = TRUE;
-                       }
-                       $newTypoScript = array(
-                               '10' => 'FORM_INT',
-                               '10.' => is_array($mergedTypoScript) ? $mergedTypoScript : $typoScript,
-                       );
-                       $content = $contentObject->cObjGetSingle('COA_INT', $newTypoScript);
-                       // Only apply stdWrap to TypoScript that was NOT created by the wizard:
-                       if (isset($typoScript['stdWrap.'])) {
-                               $content = $contentObject->stdWrap($content, $typoScript['stdWrap.']);
-                       }
-               } elseif ($typoScriptObjectName === 'FORM_INT') {
-                       $this->initialize($typoScript);
-                       $content = $this->execute();
-               }
-               return $content;
-       }
-
-       /**
-        * Build the models and views and renders the output from the views
-        *
-        * @return string HTML Output
-        */
-       public function execute() {
-               // Form
-               if ($this->showForm()) {
-                       $content = $this->renderForm();
-               } elseif ($this->showConfirmation()) {
-                       $content = $this->renderConfirmation();
-               } else {
-                       $content = $this->doPostProcessing();
-               }
-               return $content;
-       }
-
-       /**
-        * Check if the form needs to be displayed
-        *
-        * This is TRUE when nothing has been submitted,
-        * when data has been submitted but the validation rules do not fit
-        * or when the user returns from the confirmation screen.
-        *
-        * @return bool TRUE when form needs to be shown
-        */
-       protected function showForm() {
-               $show = FALSE;
-               $submittedByPrefix = $this->requestHandler->getByMethod();
-               if (
-                       $submittedByPrefix === NULL ||
-                       !empty($submittedByPrefix) && !$this->validate->isValid() ||
-                       !empty($submittedByPrefix) && $this->validate->isValid() &&
-                       $this->requestHandler->getPost('confirmation-false', NULL) !== NULL
-               ) {
-                       $show = TRUE;
-               }
-               return $show;
-       }
-
-       /**
-        * Render the form
-        *
-        * @return string The form HTML
-        */
-       protected function renderForm() {
-               $layout = $this->typoscriptFactory->getLayoutFromTypoScript($this->typoscript['form.']);
-               $this->layoutHandler->setLayout($layout);
-               $this->requestHandler->destroySession();
-
-               $form = $this->typoscriptFactory->buildModelFromTyposcript($this->typoscript);
-               /** @var $view \TYPO3\CMS\Form\View\Form\FormView */
-               $view = GeneralUtility::makeInstance(\TYPO3\CMS\Form\View\Form\FormView::class, $form);
-               return $view->get();
-       }
-
-       /**
-        * Check if the confirmation message needs to be displayed
-        *
-        * This is TRUE when data has been submitted,
-        * the validation rules are valid,
-        * the confirmation screen has been configured in TypoScript
-        * and the confirmation screen has not been submitted
-        *
-        * @return bool TRUE when confirmation screen needs to be shown
-        */
-       protected function showConfirmation() {
-               $show = FALSE;
-               if (isset($this->typoscript['confirmation']) && $this->typoscript['confirmation'] == 1 && $this->requestHandler->getPost('confirmation-true', NULL) === NULL) {
-                       $show = TRUE;
-               }
-               return $show;
-       }
-
-       /**
-        * Render the confirmation screen
-        *
-        * Stores the submitted data in a session
-        *
-        * @return string The confirmation screen HTML
-        */
-       protected function renderConfirmation() {
-               $confirmationTyposcript = array();
-               if (isset($this->typoscript['confirmation.'])) {
-                       $confirmationTyposcript = $this->typoscript['confirmation.'];
-               }
-
-               $layout = $this->typoscriptFactory->getLayoutFromTypoScript($confirmationTyposcript);
-               $form = $this->typoscriptFactory->buildModelFromTyposcript($this->typoscript);
-
-               $this->layoutHandler->setLayout($layout);
-               $this->requestHandler->storeSession();
-               /** @var $view \TYPO3\CMS\Form\View\Confirmation\ConfirmationView */
-               $view = GeneralUtility::makeInstance(\TYPO3\CMS\Form\View\Confirmation\ConfirmationView::class, $form, $confirmationTyposcript);
-               return $view->get();
-       }
-
-       /**
-        * Do the post processing
-        *
-        * Destroys the session because it is not needed anymore
-        *
-        * @return string The post processing HTML
-        */
-       protected function doPostProcessing() {
-               $form = $this->typoscriptFactory->buildModelFromTyposcript($this->typoscript);
-               $postProcessorTypoScript = array();
-               if (isset($this->typoscript['postProcessor.'])) {
-                       $postProcessorTypoScript = $this->typoscript['postProcessor.'];
-               }
-               /** @var $postProcessor \TYPO3\CMS\Form\PostProcess\PostProcessor */
-               $postProcessor = GeneralUtility::makeInstance(\TYPO3\CMS\Form\PostProcess\PostProcessor::class, $form, $postProcessorTypoScript);
-               $content = $postProcessor->process();
-               $this->requestHandler->destroySession();
-               return $content;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Controller/FrontendController.php b/typo3/sysext/form/Classes/Controller/FrontendController.php
new file mode 100755 (executable)
index 0000000..86d3ed6
--- /dev/null
@@ -0,0 +1,363 @@
+<?php
+namespace TYPO3\CMS\Form\Controller;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
+use TYPO3\CMS\Form\Domain\Model\ValidationElement;
+use TYPO3\CMS\Form\Mvc\Controller\ControllerContext;
+use TYPO3\CMS\Form\Domain\Builder\FormBuilder;
+use TYPO3\CMS\Form\Domain\Builder\ValidationBuilder;
+use TYPO3\CMS\Form\Domain\Model\Configuration;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
+
+/**
+ * The form wizard controller
+ */
+class FrontendController extends ActionController {
+
+       /**
+        * @var FormBuilder
+        */
+       protected $formBuilder;
+
+       /**
+        * @var ValidationBuilder
+        */
+       protected $validationBuilder;
+
+       /**
+        * @var \TYPO3\CMS\Form\Utility\SessionUtility
+        */
+       protected $sessionUtility;
+
+       /**
+        * @var \TYPO3\CMS\Form\Utility\FormUtility
+        */
+       protected $formUtility;
+
+       /**
+        * The TypoScript array
+        *
+        * @var array
+        */
+       protected $typoscript = array();
+
+       /**
+        * TRUE if the validation of the form should be skipped
+        *
+        * @var boolean
+        */
+       protected $skipValidation = FALSE;
+
+       /**
+        * @var ControllerContext
+        */
+       protected $controllerContext;
+
+       /**
+        * @var Configuration
+        */
+       protected $configuration;
+
+       /**
+        * @param \TYPO3\CMS\Form\Utility\SessionUtility $sessionUtility
+        * @return void
+        */
+       public function injectSessionUtility(\TYPO3\CMS\Form\Utility\SessionUtility $sessionUtility) {
+               $this->sessionUtility = $sessionUtility;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Form\Utility\FormUtility $formUtility
+        * @return void
+        */
+       public function injectFormUtility(\TYPO3\CMS\Form\Utility\FormUtility $formUtility) {
+               $this->formUtility = $formUtility;
+       }
+
+       /**
+        * initialize action
+        *
+        * @return void
+        */
+       protected function initializeAction() {
+               $this->configuration = Configuration::create()->setTypoScript($this->settings['typoscript']);
+               $this->validationBuilder = ValidationBuilder::create($this->configuration);
+               $this->formBuilder = FormBuilder::create($this->configuration);
+               $this->formBuilder->setValidationBuilder($this->validationBuilder);
+               $this->typoscript = $this->settings['typoscript'];
+
+                       // uploaded file storage
+               $this->sessionUtility->initSession($this->configuration->getPrefix());
+                       // move the incoming "formPrefix" data to the $model argument
+                       // now we can validate the $model argument
+               if ($this->request->hasArgument($this->configuration->getPrefix())) {
+                       $this->skipValidation = FALSE;
+                       $argument = $this->request->getArgument($this->configuration->getPrefix());
+                       $this->request->setArgument('model', $argument);
+               } else {
+                       // If there are more forms at a page we have to skip
+                       // the validation of not submitted forms
+                       $this->skipValidation = TRUE;
+                       $this->request->setArgument('model', array());
+               }
+       }
+
+       /**
+        * initialize show action
+        *
+        * @return void
+        */
+       protected function initializeShowAction() {
+                       // set validation errors
+               $validationResults = $this->request->getOriginalRequestMappingResults()->forProperty('model');
+               if (!$validationResults->hasErrors()) {
+                               // If there are errors, the rules already build
+                               // but if there are errors, we need to build the rules here,
+                               // because of the mandatory message rendering
+                       $this->validationBuilder->buildRules();
+                       return;
+               }
+               $this->formBuilder->setValidationErrors($validationResults);
+       }
+
+       /**
+        * initialize the confirmation action
+        *
+        * @return void
+        */
+       protected function initializeConfirmationAction() {
+               $this->prepareValidations();
+       }
+
+       /**
+        * initialize the process action
+        *
+        * @return void
+        */
+       protected function initializeProcessAction() {
+               $this->prepareValidations();
+       }
+
+       /**
+        * Builds the controller context by extending
+        * the Extbase context with custom additions.
+        *
+        * @return ControllerContext
+        */
+       protected function buildControllerContext() {
+               $controllerContext = ControllerContext::extend(parent::buildControllerContext())
+                       ->setConfiguration($this->configuration);
+               $this->formBuilder->setControllerContext($controllerContext);
+               return $controllerContext;
+       }
+
+       /**
+        * Handles show action, presenting the actual form.
+        *
+        * @param \TYPO3\CMS\Form\Domain\Model\ValidationElement $incomingData
+        * @dontvalidate $incomingData
+        * @return void
+        */
+       public function showAction(ValidationElement $incomingData = NULL) {
+               if ($incomingData !== NULL) {
+                       $this->controllerContext->setValidationElement($incomingData);
+               }
+               $form = $this->formBuilder->buildModel();
+               if (
+                       $this->typoscript['confirmation']
+                       && (int)$this->typoscript['confirmation'] == 1
+               ) {
+                       $form->setAdditionalArgument('action', 'confirmation');
+               } else {
+                       $form->setAdditionalArgument('action', 'process');
+               }
+               $this->view->assign('model', $form);
+       }
+
+       /**
+        * Handles confirmation action, presenting the user submitted
+        * data again for final confirmation.
+        *
+        * @param \TYPO3\CMS\Form\Domain\Model\ValidationElement $model
+        * @return void
+        */
+       public function confirmationAction(ValidationElement $model) {
+               if (count($model->getIncomingFields()) === 0) {
+                       $this->sessionUtility->destroySession();
+                       $this->forward('show');
+               }
+               $this->controllerContext->setValidationElement($model);
+               $form = $this->formBuilder->buildModel();
+               // store uploaded files
+               $this->sessionUtility->storeSession();
+               $this->view->assign('model', $form);
+
+               $confirmationMessage = NULL;
+               $confirmationMessageType = NULL;
+               if (isset($this->typoscript['confirmation']['message.'])) {
+                       $confirmationMessage = $this->typoscript['confirmation']['message.'];
+                       $confirmationMessageType = $this->typoscript['confirmation']['message'];
+               }
+               $message = $this->renderConfirmationMessage(
+                       $confirmationMessage,
+                       $confirmationMessageType
+               );
+               $this->view->assign('message', $message);
+       }
+
+       /**
+        * action dispatchConfirmationButtonClick
+        *
+        * @param \TYPO3\CMS\Form\Domain\Model\ValidationElement $model
+        * @return void
+        */
+       public function dispatchConfirmationButtonClickAction(ValidationElement $model) {
+               if ($this->request->hasArgument('confirmation-true')) {
+                       $this->forward('process', NULL, NULL, array($this->configuration->getPrefix() => $this->request->getArgument('model')));
+               } else {
+                       $this->sessionUtility->destroySession();
+                       $this->forward('show', NULL, NULL, array('incomingData' => $this->request->getArgument('model')));
+               }
+       }
+
+       /**
+        * Handles process action, actually processing the user
+        * submitted data and forwarding it to post-processors
+        * (e.g. sending out mail messages).
+        *
+        * @param \TYPO3\CMS\Form\Domain\Model\ValidationElement $model
+        * @return void
+        */
+       public function processAction(ValidationElement $model) {
+               $this->controllerContext->setValidationElement($model);
+               $form = $this->formBuilder->buildModel();
+               $postProcessorTypoScript = array();
+               if (isset($this->typoscript['postProcessor.'])) {
+                       $postProcessorTypoScript = $this->typoscript['postProcessor.'];
+               }
+
+               /** @var $postProcessor \TYPO3\CMS\Form\PostProcess\PostProcessor */
+               $postProcessor = $this->objectManager->get(
+                       \TYPO3\CMS\Form\PostProcess\PostProcessor::class,
+                       $form, $postProcessorTypoScript
+               );
+               $postProcessor->setControllerContext($this->controllerContext);
+
+               // @todo What is happening here?
+               $content = $postProcessor->process();
+               $this->sessionUtility->destroySession();
+               $this->forward('afterProcess', NULL, NULL, array('postProcessorContent' => $content));
+       }
+
+       /**
+        * action after process
+        *
+        * @param string $postProcessorContent
+        * @return void
+        */
+       public function afterProcessAction($postProcessorContent) {
+               $this->view->assign('postProcessorContent', $postProcessorContent);
+       }
+
+       /**
+        * If the current form should be validated
+        * then set the dynamic validation
+        *
+        * @return void
+        */
+       protected function prepareValidations() {
+               if ($this->skipValidation || !$this->arguments->hasArgument('model')) {
+                       return;
+               }
+
+               $this->validationBuilder->buildRules($this->request->getArgument('model'));
+               $this->setDynamicValidation($this->validationBuilder->getRules());
+               $this->skipValidation = FALSE;
+       }
+
+       /**
+        * Sets the dynamic validation rules.
+        *
+        * @param array $toValidate
+        * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException
+        * @throws \TYPO3\CMS\Extbase\Validation\Exception\NoSuchValidatorException
+        */
+       protected function setDynamicValidation(array $toValidate = array()) {
+               // build custom validation chain
+               /** @var \TYPO3\CMS\Extbase\Validation\ValidatorResolver $validatorResolver */
+               $validatorResolver = $this->objectManager->get(\TYPO3\CMS\Extbase\Validation\ValidatorResolver::class);
+
+               /** @var \TYPO3\CMS\Form\Domain\Validator\ValidationElementValidator $modelValidator */
+               $modelValidator = $validatorResolver->createValidator(\TYPO3\CMS\Form\Domain\Validator\ValidationElementValidator::class);
+               foreach ($toValidate as $propertyName => $validations) {
+                       foreach ($validations as $validation) {
+                               if (empty($validation['validator'])) {
+                                       throw new \TYPO3\CMS\Extbase\Validation\Exception\NoSuchValidatorException('Invalid validate configuration for ' . $propertyName . ': Could not resolve class name for validator "' . $validation['validatorName'] . '".', 1441893777);
+                               }
+                               $modelValidator->addPropertyValidator($propertyName, $validation['validator']);
+                       }
+               }
+
+               if ($modelValidator->countPropertyValidators()) {
+                       /** @var \TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator $baseConjunctionValidator */
+                       $baseConjunctionValidator = $this->arguments->getArgument('model')->getValidator();
+                       if ($baseConjunctionValidator === NULL) {
+                               $baseConjunctionValidator = $validatorResolver->createValidator(\TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator::class);
+                               $this->arguments->getArgument('model')->setValidator($baseConjunctionValidator);
+                       }
+                       $baseConjunctionValidator->addValidator($modelValidator);
+               }
+       }
+
+       /**
+        * Render the message for the confirmation page
+        *
+        * @param mixed $message Message as string or TS
+        * @param NULL|string $type Name of the cObj
+        * @return string XHTML string containing the message
+        */
+       protected function renderConfirmationMessage($message = NULL, $type = NULL) {
+               if ($this->configuration->getContentElementRendering()) {
+                       if (
+                               $type !== NULL
+                               && $message !== NULL
+                       ) {
+                               $value = $message;
+                       } elseif ($message !== NULL) {
+                               $value = $message;
+                               $type = 'TEXT';
+                       } else {
+                               $value['wrap'] = '<p>|</p>';
+                               $value['value'] = LocalizationUtility::translate('tx_form_view_confirmation.message', 'form');
+                               $type = 'TEXT';
+                       }
+                       $message = $this->formUtility->renderContentObject(
+                               $type,
+                               $value
+                       );
+               } else {
+                       if (isset($this->typoscript['message.']['value'])) {
+                               $message = $this->typoscript['message.']['value'];
+                       } elseif (isset($this->typoscript['message.']['data'])) {
+                               $message = LocalizationUtility::translate($this->typoscript['message.']['data'], 'form');
+                       } else {
+                               $message = $this->typoscript['message'];
+                       }
+               }
+               return $message;
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Builder/ElementBuilder.php b/typo3/sysext/form/Classes/Domain/Builder/ElementBuilder.php
new file mode 100644 (file)
index 0000000..0fc507f
--- /dev/null
@@ -0,0 +1,504 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Builder;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\CMS\Form\Domain\Model\Element;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
+
+/**
+ * Builder for Element domain models.
+ */
+class ElementBuilder {
+
+       /**
+        * @param FormBuilder $formBuilder
+        * @param Element $element
+        * @param array $userDefinedTypoScript
+        * @return ElementBuilder
+        */
+       static public function create(FormBuilder $formBuilder, Element $element, array $userDefinedTypoScript) {
+               /** @var ElementBuilder $elementBuilder */
+               $elementBuilder = \TYPO3\CMS\Form\Bootstrap::getObjectManager()->get(ElementBuilder::class);
+               $elementBuilder->setFormBuilder($formBuilder);
+               $elementBuilder->setElement($element);
+               $elementBuilder->setUserConfiguredElementTyposcript($userDefinedTypoScript);
+               return $elementBuilder;
+       }
+
+       /**
+        * @var \TYPO3\CMS\Form\Utility\FormUtility
+        */
+       protected $formUtility;
+
+       /**
+        * @var \TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository
+        */
+       protected $typoScriptRepository;
+
+       /**
+        * @var array
+        */
+       protected $userConfiguredElementTyposcript = array();
+
+       /**
+        * @var array
+        */
+       protected $htmlAttributes = array();
+
+       /**
+        * @var array
+        */
+       protected $additionalArguments = array();
+
+       /**
+        * @var array
+        */
+       protected $wildcardPrefixes = array();
+
+       /**
+        * @var FormBuilder
+        */
+       protected $formBuilder;
+
+       /**
+        * @var Element
+        */
+       protected $element;
+
+       /**
+        * @param \TYPO3\CMS\Form\Utility\FormUtility $formUtility
+        * @return void
+        */
+       public function injectFormUtility(\TYPO3\CMS\Form\Utility\FormUtility $formUtility) {
+               $this->formUtility = $formUtility;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository $typoScriptRepository
+        * @return void
+        */
+       public function injectTypoScriptRepository(\TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository $typoScriptRepository) {
+               $this->typoScriptRepository = $typoScriptRepository;
+       }
+
+       /**
+        * @param FormBuilder $formBuilder
+        */
+       public function setFormBuilder(FormBuilder $formBuilder) {
+               $this->formBuilder = $formBuilder;
+       }
+
+       /**
+        * @param Element $element
+        */
+       public function setElement(Element $element) {
+               $this->element = $element;
+       }
+
+       /**
+        * Set the fluid partial path to the element
+        *
+        * @return void
+        */
+       public function setPartialPaths() {
+               $this->setElementPartialPath();
+       }
+
+       /**
+        * Set the fluid partial path to the element
+        *
+        * @return void
+        */
+       protected function setElementPartialPath() {
+               if (!isset($this->userConfiguredElementTyposcript['partialPath'])) {
+                       $partialPath = $this->typoScriptRepository->getDefaultFluidTemplate($this->element->getElementType());
+               } else {
+                       $partialPath = $this->userConfiguredElementTyposcript['partialPath'];
+                       unset($this->userConfiguredElementTyposcript['partialPath']);
+               }
+               $this->element->setPartialPath($partialPath);
+       }
+
+       /**
+        * Set the fluid partial path to the element
+        *
+        * @return void
+        */
+       public function setVisibility() {
+               $visibility = FALSE;
+               if ($this->formBuilder->getControllerAction() === 'show') {
+                       if (!isset($this->userConfiguredElementTyposcript['visibleInShowAction'])) {
+                               $visibility = (bool)$this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'visibleInShowAction');
+                       } else {
+                               $visibility = (bool)$this->userConfiguredElementTyposcript['visibleInShowAction'];
+                       }
+               } else if ($this->formBuilder->getControllerAction() === 'confirmation') {
+                       if (!isset($this->userConfiguredElementTyposcript['visibleInConfirmationAction'])) {
+                               $visibility = (bool)$this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'visibleInConfirmationAction');
+                       } else {
+                               $visibility = (bool)$this->userConfiguredElementTyposcript['visibleInConfirmationAction'];
+                       }
+               } else if ($this->formBuilder->getControllerAction() === 'process') {
+                       if (!isset($this->userConfiguredElementTyposcript['visibleInMail'])) {
+                               $visibility = (bool)$this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'visibleInMail');
+                       } else {
+                               $visibility = (bool)$this->userConfiguredElementTyposcript['visibleInMail'];
+                       }
+               }
+               $this->element->setShowElement($visibility);
+       }
+
+       /**
+        * Find all prefix-* attributes and return the
+        * found prefixs. Than delete them from the htmlAttributes array
+        *
+        * @return void
+        */
+       public function setHtmlAttributeWildcards() {
+               foreach ($this->htmlAttributes as $attributeName => $attributeValue) {
+                       if (strpos($attributeName, '-*') > 0) {
+                               $prefix = substr($attributeName, 0, -1);
+                               $this->wildcardPrefixes[] = $prefix;
+                               unset($this->htmlAttributes[$attributeName]);
+                       }
+               }
+       }
+
+       /**
+        * Overlay user defined html attribute values
+        * To determine whats a html attribute, the htmlAttributes
+        * array is used. If a html attribute value is found in userConfiguredElementTyposcript
+        * this value is set to htmlAttributes and removed from userConfiguredElementTyposcript.
+        *
+        * @return void
+        */
+       public function overlayUserdefinedHtmlAttributeValues() {
+               foreach ($this->htmlAttributes as $attributeName => $attributeValue) {
+                       $attributeNameWithoutDot = rtrim($attributeName, '.');
+                       if (
+                               isset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot])
+                               || isset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot . '.'])
+                       ) {
+                               $returnValue = $this->renderAttributeValue($attributeName, array());
+                               $attributeValue = $returnValue['attributeValue'];
+                               $this->htmlAttributes[$attributeNameWithoutDot] = $attributeValue;
+                               unset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot]);
+                       }
+               }
+
+                       // the prefix-* magic
+               $ignoreKeys = array();
+               foreach ($this->userConfiguredElementTyposcript as $attributeName => $attributeValue) {
+                               // ignore child elements
+                       if (
+                               MathUtility::canBeInterpretedAsInteger($attributeName)
+                               || isset($ignoreKeys[$attributeName])
+                       ) {
+                               $ignoreKeys[$attributeName . '.'] = TRUE;
+                               continue;
+                       }
+
+                       foreach ($this->wildcardPrefixes as $wildcardPrefix) {
+                               if (strpos($attributeName, $wildcardPrefix) !== 0) {
+                                       continue;
+                               }
+                               $attributeNameWithoutDot = rtrim($attributeName, '.');
+                               $returnValue = $this->renderAttributeValue($attributeName, $ignoreKeys);
+                               $attributeValue = $returnValue['attributeValue'];
+                               $ignoreKeys = $returnValue['ignoreKeys'];
+                               $this->htmlAttributes[$attributeNameWithoutDot] = $attributeValue;
+                               unset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot]);
+                               break;
+                       }
+               }
+
+       }
+
+       /**
+        * If fixedHtmlAttributeValues are defined for this element
+        * then overwrite the html attribute value
+        *
+        * @return void
+        */
+       public function overlayFixedHtmlAttributeValues() {
+               $fixedHtmlAttributeValues = $this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'fixedHtmlAttributeValues.');
+               if (is_array($fixedHtmlAttributeValues)) {
+                       foreach ($fixedHtmlAttributeValues as $attributeName => $attributeValue) {
+                               $this->htmlAttributes[$attributeName] = $attributeValue;
+                       }
+               }
+       }
+
+       /**
+        * Move htmlAttributes to additionalArguments that must be passed
+        * as a view helper argument
+        *
+        * @return void
+        */
+       public function moveHtmlAttributesToAdditionalArguments() {
+               $htmlAttributesUsedByTheViewHelperDirectly = $this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'htmlAttributesUsedByTheViewHelperDirectly.');
+               if (is_array($htmlAttributesUsedByTheViewHelperDirectly)) {
+                       foreach ($htmlAttributesUsedByTheViewHelperDirectly as $attributeName) {
+                               if (array_key_exists($attributeName, $this->htmlAttributes)) {
+                                       $this->additionalArguments[$attributeName] = $this->htmlAttributes[$attributeName];
+                                       unset($this->htmlAttributes[$attributeName]);
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Set the viewhelper default arguments in the additionalArguments array
+        *
+        * @return void
+        */
+       public function setViewHelperDefaulArgumentsToAdditionalArguments() {
+               $viewHelperDefaulArguments = $this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'viewHelperDefaulArguments.');
+               if (is_array($viewHelperDefaulArguments)) {
+                       foreach ($viewHelperDefaulArguments as $viewHelperDefaulArgumentName => $viewHelperDefaulArgumentValue) {
+                               $this->additionalArguments[$viewHelperDefaulArgumentName] = $viewHelperDefaulArgumentValue;
+                       }
+               }
+               unset($this->userConfiguredElementTyposcript['viewHelperDefaulArguments']);
+       }
+
+       /**
+        * Move all userdefined properties to the additionalArguments
+        * array. Ignore the child elements
+        *
+        * @return void
+        */
+       public function moveAllOtherUserdefinedPropertiesToAdditionalArguments() {
+               $ignoreKeys = array();
+               foreach ($this->userConfiguredElementTyposcript as $attributeName => $attributeValue) {
+                               // ignore child elements
+                       if (
+                               MathUtility::canBeInterpretedAsInteger($attributeName)
+                               || isset($ignoreKeys[$attributeName])
+                               || $attributeName == 'postProcessor.'
+                               || $attributeName == 'rules.'
+                               || $attributeName == 'filters.'
+                               || $attributeName == 'layout'
+                       ) {
+                               $ignoreKeys[$attributeName . '.'] = TRUE;
+                               continue;
+                       }
+
+                       if ($this->formBuilder->getConfiguration()->getCompatibility()) {
+                               $returnValue = $this->formBuilder->getCompatibilityService()->remapOldAttributes(
+                                       $this->element->getElementType(),
+                                       $attributeName,
+                                       $this->additionalArguments,
+                                       $this->userConfiguredElementTyposcript
+                               );
+                               $attributeName = $returnValue['attributeName'];
+                               $this->additionalArguments = $returnValue['additionalArguments'];
+                               $this->userConfiguredElementTyposcript = $returnValue['userConfiguredElementTyposcript'];
+                       }
+
+                       $attributeNameWithoutDot = rtrim($attributeName, '.');
+                       $returnValue = $this->renderAttributeValue($attributeName, $ignoreKeys);
+                       $attributeValue = $returnValue['attributeValue'];
+                       $ignoreKeys = $returnValue['ignoreKeys'];
+                       $this->additionalArguments[$attributeNameWithoutDot] = $attributeValue;
+                       unset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot]);
+               }
+                       // remove "stdWrap." from "additionalArguments" on
+                       // the FORM Element
+               if (
+                       !$this->formBuilder->getConfiguration()->getContentElementRendering()
+                       && $this->element->getElementType() == 'FORM'
+               ) {
+                       unset($this->additionalArguments['stdWrap']);
+                       unset($this->additionalArguments['stdWrap.']);
+               }
+       }
+
+       /**
+        * Set the name and id attribute
+        *
+        * @return array
+        */
+       public function setNameAndId() {
+               if (
+                       $this->element->getParentElement()
+                       && (int)$this->typoScriptRepository->getModelConfigurationByScope($this->element->getParentElement()->getElementType(), 'childsInerhitName') == 1
+               ) {
+                       $this->htmlAttributes['name'] = $this->element->getParentElement()->getName();
+                       $this->htmlAttributes['multiple'] = '1';
+                       $name = $this->sanitizeNameAttribute($this->userConfiguredElementTyposcript['name']);
+                       $this->element->setName($name);
+               } else {
+                       $this->htmlAttributes['name'] = $this->sanitizeNameAttribute($this->htmlAttributes['name']);
+                       $this->element->setName($this->htmlAttributes['name']);
+               }
+               $this->htmlAttributes['id'] = $this->sanitizeIdAttribute($this->htmlAttributes['id']);
+               $this->element->setId($this->htmlAttributes['id']);
+       }
+
+       /**
+        * Render a attribute value
+        * Try to render it as content element if allowed
+        * Take care about short synthax like label.data = LLL:EXT: ...
+        * Try to translate label.data = LLL: ... stuff even if content
+        * elemet rendering is disabled
+        *
+        * @param string $attributeName
+        * @param array $ignoreKeys
+        * @return string
+        */
+       protected function renderAttributeValue($attributeName = '', array $ignoreKeys) {
+               $attributeNameWithoutDot = rtrim($attributeName, '.');
+               if (
+                       $this->formBuilder->getConfiguration()->getContentElementRendering()
+                       && isset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot . '.'])
+               ) {
+                       if ($attributeName !== $attributeNameWithoutDot) {
+                               $this->userConfiguredElementTyposcript[$attributeNameWithoutDot] = 'TEXT';
+                       }
+                       $attributeValue = $this->formUtility->renderContentObject(
+                               $this->userConfiguredElementTyposcript[$attributeNameWithoutDot],
+                               $this->userConfiguredElementTyposcript[$attributeNameWithoutDot . '.']
+                       );
+                       $ignoreKeys[$attributeNameWithoutDot . '.'] = TRUE;
+                       unset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot . '.']);
+               } else {
+                       if (isset($this->userConfiguredElementTyposcript[$attributeName]['value'])) {
+                               $attributeValue = $this->userConfiguredElementTyposcript[$attributeName]['value'];
+                       } elseif (isset($this->userConfiguredElementTyposcript[$attributeName]['data'])) {
+                               $attributeValue = LocalizationUtility::translate($this->userConfiguredElementTyposcript[$attributeName]['data'], 'form');
+                       } else {
+                               $attributeValue = $this->userConfiguredElementTyposcript[$attributeNameWithoutDot];
+                       }
+               }
+               return array(
+                       'attributeValue' => $attributeValue,
+                       'ignoreKeys' => $ignoreKeys,
+               );
+       }
+
+       /**
+        * If the name is not defined it is automatically generated
+        * using the following syntax: id-{element_counter}
+        * The name attribute will be transformed if it contains some
+        * non allowed characters:
+        * - spaces are changed into hyphens
+        * - remove all characters except a-z A-Z 0-9 _ -
+        *
+        * @param string $name
+        * @return string
+        */
+       public function sanitizeNameAttribute($name) {
+               $name = $this->formUtility->sanitizeNameAttribute($name);
+               if (empty($name)) {
+                       $name = 'id-' . $this->element->getElementCounter();
+               }
+               return $name;
+       }
+
+       /**
+        * If the id is not defined it is automatically generated
+        * using the following syntax: field-{element_counter}
+        * The id attribute will be transformed if it contains some
+        * non allowed characters:
+        * - spaces are changed into hyphens
+        * - if the id start with a integer then transform it to field-{integer}
+        * - remove all characters expect a-z A-Z 0-9 _ - : .
+        *
+        * @param string $id
+        * @return string
+        */
+       protected function sanitizeIdAttribute($id) {
+               $id = $this->formUtility->sanitizeIdAttribute($id);
+               if (empty($id)) {
+                       $id = 'field-' . $this->element->getElementCounter();
+               }
+               return $id;
+       }
+
+       /**
+        * Get the current html attributes
+        *
+        * @return array
+        */
+       public function getHtmlAttributes() {
+               return $this->htmlAttributes;
+       }
+
+       /**
+        * Set the current html attributes
+        *
+        * @param array $htmlAttributes
+        */
+       public function setHtmlAttributes(array $htmlAttributes) {
+               $this->htmlAttributes = $htmlAttributes;
+       }
+
+       /**
+        * Get the current additional arguments
+        *
+        * @return array
+        */
+       public function getAdditionalArguments() {
+               return $this->additionalArguments;
+       }
+
+       /**
+        * Set the current additional arguments
+        *
+        * @param array $additionalArguments
+        */
+       public function setAdditionalArguments(array $additionalArguments) {
+               $this->additionalArguments = $additionalArguments;
+       }
+
+       /**
+        * Get the current wildcard prefixes
+        *
+        * @return array
+        */
+       public function getWildcardPrefixes() {
+               return $this->wildcardPrefixes;
+       }
+
+       /**
+        * Set the current wildcard prefixes
+        *
+        * @param array $wildcardPrefixes
+        */
+       public function setWildcardPrefixes(array $wildcardPrefixes) {
+               $this->wildcardPrefixes = $wildcardPrefixes;
+       }
+
+       /**
+        * Get the current Element
+        *
+        * @return array
+        */
+       public function getUserConfiguredElementTyposcript() {
+               return $this->userConfiguredElementTyposcript;
+       }
+
+       /**
+        * Set the current Element
+        *
+        * @param array $userConfiguredElementTyposcript
+        */
+       public function setUserConfiguredElementTyposcript(array $userConfiguredElementTyposcript) {
+               $this->userConfiguredElementTyposcript = $userConfiguredElementTyposcript;
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Builder/FormBuilder.php b/typo3/sysext/form/Classes/Domain/Builder/FormBuilder.php
new file mode 100644 (file)
index 0000000..6ec1db1
--- /dev/null
@@ -0,0 +1,601 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Builder;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\TypoScript\TemplateService;
+use TYPO3\CMS\Form\Domain\Model\Element;
+use TYPO3\CMS\Form\Domain\Model\ValidationElement;
+use TYPO3\CMS\Form\Utility\CompatibilityLayerUtility;
+use TYPO3\CMS\Form\Mvc\Controller\ControllerContext;
+use TYPO3\CMS\Form\Domain\Model\Configuration;
+
+/**
+ * TypoScript factory for form
+ *
+ * Takes the incoming TypoScript and adds all the necessary form objects
+ * according to the configuration.
+ */
+class FormBuilder {
+
+       /**
+        * @var string
+        */
+       const COMPATIBILITY_THEME_NAME = 'Compatibility';
+
+       /**
+        * @param Configuration $configuration
+        * @return FormBuilder
+        */
+       static public function create(Configuration $configuration) {
+               /** @var FormBuilder $formBuilder */
+               $formBuilder = \TYPO3\CMS\Form\Bootstrap::getObjectManager()->get(FormBuilder::class);
+               $formBuilder->setConfiguration($configuration);
+               return $formBuilder;
+       }
+
+       /**
+        * @var \TYPO3\CMS\Form\Utility\FormUtility
+        */
+       protected $formUtility;
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Service\TypoScriptService
+        */
+       protected $typoScriptService;
+
+       /**
+        * @var \TYPO3\CMS\Form\Utility\CompatibilityLayerUtility
+        */
+       protected $compatibilityService;
+
+       /**
+        * @var ValidationBuilder
+        */
+       protected $validationBuilder;
+
+       /**
+        * @var \TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository
+        */
+       protected $typoScriptRepository;
+
+       /**
+         * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
+         */
+       protected $signalSlotDispatcher;
+
+       /**
+        * @var \TYPO3\CMS\Form\Utility\SessionUtility
+        */
+       protected $sessionUtility;
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Object\ObjectManager
+        */
+       protected $objectManager;
+
+       /**
+        * @var integer
+        */
+       protected $elementCounter = 0;
+
+       /**
+        * @var NULL|\TYPO3\CMS\Extbase\Error\Result
+        */
+       protected $validationErrors = NULL;
+
+       /**
+        * @var Configuration;
+        */
+       protected $configuration;
+
+       /**
+        * @var ControllerContext
+        */
+       protected $controllerContext;
+
+       /**
+        * @param \TYPO3\CMS\Form\Utility\FormUtility $formUtility
+        * @return void
+        */
+       public function injectFormUtility(\TYPO3\CMS\Form\Utility\FormUtility $formUtility) {
+               $this->formUtility = $formUtility;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Service\TypoScriptService $typoScriptService
+        * @return void
+        */
+       public function injectTypoScriptService(\TYPO3\CMS\Extbase\Service\TypoScriptService $typoScriptService) {
+               $this->typoScriptService = $typoScriptService;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository $typoScriptRepository
+        * @return void
+        */
+       public function injectTypoScriptRepository(\TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository $typoScriptRepository) {
+               $this->typoScriptRepository = $typoScriptRepository;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
+        * @return void
+        */
+       public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher) {
+               $this->signalSlotDispatcher = $signalSlotDispatcher;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Form\Utility\SessionUtility $sessionUtility
+        * @return void
+        */
+       public function injectSessionUtility(\TYPO3\CMS\Form\Utility\SessionUtility $sessionUtility) {
+               $this->sessionUtility = $sessionUtility;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager
+        * @return void
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * Creates this object.
+        */
+       public function __construct() {
+               $this->compatibilityService = CompatibilityLayerUtility::create($this);
+       }
+
+       /**
+        * @return Configuration
+        */
+       public function getConfiguration() {
+               return $this->configuration;
+       }
+
+       /**
+        * @param Configuration $configuration
+        */
+       public function setConfiguration(Configuration $configuration) {
+               $this->configuration = $configuration;
+       }
+
+       /**
+        * @return ControllerContext
+        */
+       public function getControllerContext() {
+               return $this->controllerContext;
+       }
+
+       /**
+        * @param ControllerContext $controllerContext
+        */
+       public function setControllerContext(ControllerContext $controllerContext) {
+               $this->controllerContext = $controllerContext;
+       }
+
+       /**
+        * @return CompatibilityLayerUtility
+        */
+       public function getCompatibilityService() {
+               return $this->compatibilityService;
+       }
+
+       /**
+        * @param CompatibilityLayerUtility $compatibilityService
+        */
+       public function setCompatibilityService(CompatibilityLayerUtility $compatibilityService) {
+               $this->compatibilityService = $compatibilityService;
+       }
+
+       /**
+        * @return ValidationBuilder
+        */
+       public function getValidationBuilder() {
+               return $this->validationBuilder;
+       }
+
+       /**
+        * @param ValidationBuilder $validationBuilder
+        */
+       public function setValidationBuilder(ValidationBuilder $validationBuilder) {
+               $this->validationBuilder = $validationBuilder;
+       }
+
+       /**
+        * Build model from TypoScript
+        * Needed if more than one form exist at a page
+        *
+        * @return NULL|\TYPO3\CMS\Form\Domain\Model\Element The form object containing the child elements
+        */
+       public function buildModel() {
+               $userConfiguredFormTypoScript = $this->configuration->getTypoScript();
+
+               /**
+                * The layout handling for the postProcessor is no longer supported
+                **/
+               if ($this->configuration->getCompatibility()) {
+                       /* use the compatibility theme whenever if a layout is defined */
+                       if (
+                               isset($userConfiguredFormTypoScript['layout.'])
+                               || isset($userConfiguredFormTypoScript['confirmation.']['layout.'])
+                       ) {
+                               $this->configuration->setThemeName(static::COMPATIBILITY_THEME_NAME);
+                       }
+                       if ($this->getControllerAction() === 'show') {
+                               $this->compatibilityService->setGlobalLayoutConfiguration($userConfiguredFormTypoScript);
+                               unset($userConfiguredFormTypoScript['layout.']);
+                       } else if ($this->getControllerAction() === 'confirmation') {
+                               $this->compatibilityService->setGlobalLayoutConfiguration($userConfiguredFormTypoScript['confirmation.']);
+                               unset($userConfiguredFormTypoScript['confirmation.']['layout.']);
+                       }
+               }
+
+               $form = $this->createElementObject();
+               $this->reviveElement($form, $userConfiguredFormTypoScript, 'FORM');
+               $form->setThemeName($this->configuration->getThemeName());
+               return $form;
+       }
+
+       /**
+        * Create a element
+        *
+        * @return \TYPO3\CMS\Form\Domain\Model\Element
+        */
+       protected function createElementObject() {
+               $this->elementCounter++;
+               $element = GeneralUtility::makeInstance(Element::class);
+               return $element;
+       }
+
+       /**
+        * Revive the domain model of the accordant element.
+        *
+        * @param Element $element
+        * @param array $userConfiguredElementTypoScript The configuration array
+        * @param string $elementType The element type (e.g BUTTON)
+        * @return void
+        */
+       protected function reviveElement(Element $element, array $userConfiguredElementTypoScript, $elementType = '') {
+               // @todo Check $userConfiguredElementTypoScript
+
+               $element->setElementType($elementType);
+               $element->setElementCounter($this->elementCounter);
+
+               $elementBuilder = ElementBuilder::create($this, $element, $userConfiguredElementTypoScript);
+               $elementBuilder->setPartialPaths();
+               $elementBuilder->setVisibility();
+
+               if ($element->getElementType() == 'CONTENTELEMENT') {
+                       $attributeValue = '';
+                       if ($this->configuration->getContentElementRendering()) {
+                               $attributeValue = $this->formUtility->renderContentObject(
+                                       $userConfiguredElementTypoScript['cObj'],
+                                       $userConfiguredElementTypoScript['cObj.']
+                               );
+                       }
+                       $element->setAdditionalArguments(array(
+                               'content' => $attributeValue,
+                       ));
+                       /* use the compatibility theme whenever if a layout is defined */
+                       if ($this->configuration->getCompatibility()) {
+                               $this->compatibilityService->setElementLayouts($element, $userConfiguredElementTypoScript);
+                               if (isset($userConfiguredElementTypoScript['layout'])) {
+                                       $this->configuration->setThemeName(static::COMPATIBILITY_THEME_NAME);
+                                       unset($userConfiguredElementTypoScript['layout']);
+                               }
+                       }
+               } else {
+                       $this->setAttributes($elementBuilder, $element, $userConfiguredElementTypoScript);
+                       $userConfiguredElementTypoScript = $elementBuilder->getUserConfiguredElementTypoScript();
+                       $this->setValidationMessages($element);
+                       /* use the compatibility theme whenever if a layout is defined */
+                       if ($this->configuration->getCompatibility()) {
+                               $this->compatibilityService->setElementLayouts($element, $userConfiguredElementTypoScript);
+                               if (isset($userConfiguredElementTypoScript['layout'])) {
+                                       $this->configuration->setThemeName(static::COMPATIBILITY_THEME_NAME);
+                                       unset($userConfiguredElementTypoScript['layout']);
+                               }
+                       }
+                       $this->signalSlotDispatcher->dispatch(
+                               __CLASS__,
+                               'txFormAfterElementCreation',
+                               array($element, $this)
+                       );
+                               // create all child elements
+                       $this->setChildElementsByIntegerKey($element, $userConfiguredElementTypoScript);
+               }
+       }
+
+       /**
+        * Rendering of a "numerical array" of Form objects from TypoScript
+        * Creates new object for each element found
+        *
+        * @param Element $element
+        * @param array $userConfiguredElementTypoScript The configuration array
+        * @return void
+        * @throws \InvalidArgumentException
+        */
+       protected function setChildElementsByIntegerKey(Element $element, array $userConfiguredElementTypoScript) {
+               if (is_array($userConfiguredElementTypoScript)) {
+                       $keys = TemplateService::sortedKeyList($userConfiguredElementTypoScript);
+                       foreach ($keys as $key) {
+                               if (
+                                       (int)$key
+                                       && strpos($key, '.') === FALSE
+                               ) {
+                                       $elementType = $userConfiguredElementTypoScript[$key];
+                                       if (isset($userConfiguredElementTypoScript[$key . '.'])) {
+                                               $concreteChildElementTypoScript = $userConfiguredElementTypoScript[$key . '.'];
+                                       } else {
+                                               $concreteChildElementTypoScript = array();
+                                       }
+                                       $this->distinguishElementType($element, $concreteChildElementTypoScript, $elementType);
+                               }
+                       }
+               } else {
+                       throw new \InvalidArgumentException('Container element with id=' . $element->getElementCounter() . ' has no configuration which means no children.', 1333754854);
+               }
+       }
+
+       /**
+        * Create and add element by type.
+        * If its not a registered form element
+        * try to render it as contentelement with the internal elementType
+        * CONTENTELEMENT
+        *
+        * @param Element $element
+        * @param array $userConfiguredElementTypoScript The configuration array
+        * @param string $elementType The element type (e.g BUTTON)
+        * @return void
+        */
+       protected function distinguishElementType(Element $element, array $userConfiguredElementTypoScript, $elementType = '') {
+               if (in_array($elementType, $this->typoScriptRepository->getRegisteredElementTypes())) {
+                       $this->addChildElement($element, $userConfiguredElementTypoScript, $elementType);
+               } elseif ($this->configuration->getContentElementRendering()) {
+                       $contentObject = array(
+                               'cObj' => $elementType,
+                               'cObj.' => $userConfiguredElementTypoScript
+                       );
+                       $this->addChildElement($element, $contentObject, 'CONTENTELEMENT');
+               }
+       }
+
+       /**
+        * Add child object to this element
+        *
+        * @param Element $element
+        * @param array $userConfiguredElementTypoScript The configuration array
+        * @param string $elementType The element type (e.g BUTTON)
+        * @return void
+        */
+       protected function addChildElement(Element $element, array $userConfiguredElementTypoScript, $elementType = '') {
+               $childElement = $this->createElementObject();
+               $childElement->setParentElement($element);
+               $element->addChildElement($childElement);
+               $this->reviveElement($childElement, $userConfiguredElementTypoScript, $elementType);
+       }
+
+       /**
+        * Set the htmlAttributes and the additionalAttributes
+        * Remap htmlAttributes to additionalAttributes if needed
+        *
+        * @param ElementBuilder $elementBuilder
+        * @param Element $element
+        * @return void
+        */
+       protected function setAttributes(ElementBuilder $elementBuilder, Element $element) {
+               $htmlAttributes = $this->typoScriptRepository->getModelDefinedHtmlAttributes($element->getElementType());
+               $elementBuilder->setHtmlAttributes($htmlAttributes);
+               $elementBuilder->setHtmlAttributeWildcards();
+               $elementBuilder->overlayUserdefinedHtmlAttributeValues();
+               $elementBuilder->setNameAndId();
+               $elementBuilder->overlayFixedHtmlAttributeValues();
+               // remove all NULL values
+               $htmlAttributes = array_filter($elementBuilder->getHtmlAttributes());
+
+               $elementBuilder->setHtmlAttributes($htmlAttributes);
+               $elementBuilder->moveHtmlAttributesToAdditionalArguments();
+               $elementBuilder->setViewHelperDefaulArgumentsToAdditionalArguments();
+               $elementBuilder->moveAllOtherUserdefinedPropertiesToAdditionalArguments();
+               $htmlAttributes = $elementBuilder->getHtmlAttributes();
+               $userConfiguredElementTypoScript = $elementBuilder->getUserConfiguredElementTypoScript();
+               $additionalArguments = $elementBuilder->getAdditionalArguments();
+               $element->setHtmlAttributes($htmlAttributes);
+               $additionalArguments = $this->typoScriptService->convertTypoScriptArrayToPlainArray($additionalArguments);
+               $additionalArguments['prefix'] = $this->configuration->getPrefix();
+               $element->setAdditionalArguments($additionalArguments);
+               $this->handleIncomingValues($element, $userConfiguredElementTypoScript);
+               // needed if confirmation page is enabled
+               if (
+                       $this->sessionUtility->getSessionData($element->getName())
+                       && $element->getAdditionalArgument('uploadedFiles') === NULL
+               ) {
+                       $element->setAdditionalArgument('uploadedFiles', $this->sessionUtility->getSessionData($element->getName()));
+               }
+       }
+
+       /**
+        * Handles the incoming form data
+        *
+        * @param Element $element
+        * @param array $userConfiguredElementTypoScript
+        * @return array
+        */
+       protected function handleIncomingValues(Element $element, array $userConfiguredElementTypoScript) {
+               if (!$this->getIncomingData()) {
+                       return;
+               }
+               $elementName = $element->getName();
+               if ($element->getHtmlAttribute('value') !== NULL) {
+                       $modelValue = $element->getHtmlAttribute('value');
+               } else {
+                       $modelValue = $element->getAdditionalArgument('value');
+               }
+
+               if ($this->getIncomingData()->getIncomingField($elementName) !== NULL) {
+                               /* filter values and set it back to incoming fields */
+                               /* remove xss everytime */
+                       $userConfiguredElementTypoScript['filters.'][-1] = 'removexss';
+                       $keys = TemplateService::sortedKeyList($userConfiguredElementTypoScript['filters.']);
+                       foreach ($keys as $key) {
+                               $class = $userConfiguredElementTypoScript['filters.'][$key];
+                               if (
+                                       (int)$key
+                                       && strpos($key, '.') === FALSE
+                               ) {
+                                       $filterArguments = $userConfiguredElementTypoScript['filters.'][$key . '.'];
+                                       $filterClassName = $this->typoScriptRepository->getRegisteredClassName((string)$class, 'registeredFilters');
+                                       if ($filterClassName !== NULL) {
+                                                       // toDo: handel array values
+                                               if (is_string($this->getIncomingData()->getIncomingField($elementName))) {
+                                                       if (is_null($filterArguments)) {
+                                                               $filter = $this->objectManager->get($filterClassName);
+                                                       } else {
+                                                               $filter = $this->objectManager->get($filterClassName, $filterArguments);
+                                                       }
+                                                       if ($filter) {
+                                                               $value = $filter->filter($this->getIncomingData()->getIncomingField($elementName));
+                                                               $this->getIncomingData()->setIncomingField($elementName, $value);
+                                                       } else {
+                                                               throw new \RuntimeException('Class "' . $filterClassName . '" could not be loaded.');
+                                                       }
+                                               }
+                                       } else {
+                                               throw new \RuntimeException('Class "' . $filterClassName . '" not registered via TypoScript.');
+                                       }
+                               }
+                       }
+
+                       if ($element->getHtmlAttribute('value') !== NULL) {
+                               $element->setHtmlAttribute('value', $this->getIncomingData()->getIncomingField($elementName));
+                       } else {
+                               $element->setAdditionalArgument('value', $this->getIncomingData()->getIncomingField($elementName));
+                       }
+               }
+               $this->signalSlotDispatcher->dispatch(
+                       __CLASS__,
+                       'txFormHandleIncomingValues',
+                       array(
+                               $element,
+                               $this->getIncomingData(),
+                               $modelValue,
+                               $this
+                       )
+               );
+       }
+
+       /**
+        * Set the rendered mandatrory message
+        * and the validation error message if available
+        *
+        * @param Element $element
+        * @return void
+        */
+       protected function setValidationMessages(Element $element) {
+               $elementName = $element->getName();
+               $mandatoryMessages = $this->validationBuilder->getMandatoryValidationMessagesByElementName($elementName);
+               $element->setMandatoryValidationMessages($mandatoryMessages);
+               if (
+                       $this->getValidationErrors()
+                       && $this->getValidationErrors()->forProperty($elementName)->hasErrors()
+               ) {
+                       /** @var \TYPO3\CMS\Extbase\Error\Error[] $errors */
+                       $errors = $this->getValidationErrors()->forProperty($elementName)->getErrors();
+                       $errorMessages = array();
+                       foreach ($errors as $error) {
+                               $errorMessages[] = $error->getMessage();
+                       }
+                       $element->setValidationErrorMessages($errorMessages);
+               }
+       }
+
+       /**
+        * Return the form prefix
+        *
+        * @return string
+        */
+       public function getFormPrefix() {
+               return $this->configuration->getPrefix();
+       }
+
+       /**
+        * TRUE if the content element rendering should be disabled.
+        *
+        * @return boolean
+        */
+       public function getDisableContentElementRendering() {
+               return !$this->configuration->getContentElementRendering();
+       }
+
+       /**
+        * TRUE if the content element rendering should be disabled.
+        *
+        * @return string
+        */
+       public function getControllerAction() {
+               return $this->controllerContext->getRequest()->getControllerActionName();
+       }
+
+       /**
+        * If TRUE form try to respect the layout settings
+        *
+        * @return bool
+        */
+       public function getCompatibilityMode() {
+               return $this->configuration->getCompatibility();
+       }
+
+       /**
+        * Get the incoming flat form data
+        *
+        * @return ValidationElement
+        */
+       public function getIncomingData() {
+               return $this->controllerContext->getValidationElement();
+       }
+
+       /**
+        * Set the validation errors
+        *
+        * @param \TYPO3\CMS\Extbase\Error\Result $validationErrors
+        * @return void
+        */
+       public function setValidationErrors(\TYPO3\CMS\Extbase\Error\Result $validationErrors) {
+               $this->validationErrors = $validationErrors;
+       }
+
+       /**
+        * Get the validation errors
+        *
+        * @return NULL|\TYPO3\CMS\Extbase\Error\Result
+        */
+       public function getValidationErrors() {
+               return $this->validationErrors;
+       }
+
+       /**
+        * Get the current element counter
+        *
+        * @return integer
+        */
+       public function getElementCounter() {
+               return $this->elementCounter;
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Builder/ValidationBuilder.php b/typo3/sysext/form/Classes/Domain/Builder/ValidationBuilder.php
new file mode 100644 (file)
index 0000000..7ac4c07
--- /dev/null
@@ -0,0 +1,230 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Builder;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\TypoScript\TemplateService;
+use TYPO3\CMS\Form\Domain\Model\Configuration;
+use TYPO3\CMS\Form\Domain\Validator\AbstractValidator;
+
+/**
+ * Parse and hole all the validation rules
+ */
+class ValidationBuilder {
+
+       /**
+        * @param Configuration $configuration
+        * @return ValidationBuilder
+        */
+       static public function create(Configuration $configuration) {
+               /** @var ValidationBuilder $validationBuilder */
+               $validationBuilder = \TYPO3\CMS\Form\Bootstrap::getObjectManager()->get(ValidationBuilder::class);
+               $validationBuilder->setConfiguration($configuration);
+               return $validationBuilder;
+       }
+
+       /**
+        * @var array|array[]
+        */
+       protected $rules = array();
+
+       /**
+        * @var string
+        */
+       protected $formPrefix = '';
+
+       /**
+        * @var \TYPO3\CMS\Extbase\Object\ObjectManager
+        */
+       protected $objectManager;
+
+       /**
+        * @var \TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository
+        */
+       protected $typoScriptRepository;
+
+       /**
+        * @var \TYPO3\CMS\Form\Utility\FormUtility
+        */
+       protected $formUtility;
+
+       /**
+        * @var Configuration
+        */
+       protected $configuration;
+
+       /**
+        * @param \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager
+        * @return void
+        */
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager) {
+               $this->objectManager = $objectManager;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository $typoScriptRepository
+        * @return void
+        */
+       public function injectTypoScriptRepository(\TYPO3\CMS\Form\Domain\Repository\TypoScriptRepository $typoScriptRepository) {
+               $this->typoScriptRepository = $typoScriptRepository;
+       }
+
+       /**
+        * @param \TYPO3\CMS\Form\Utility\FormUtility $formUtility
+        * @return void
+        */
+       public function injectFormUtility(\TYPO3\CMS\Form\Utility\FormUtility $formUtility) {
+               $this->formUtility = $formUtility;
+       }
+
+       /**
+        * @param Configuration $configuration
+        */
+       public function setConfiguration(Configuration $configuration) {
+               $this->configuration = $configuration;
+       }
+
+       /**
+        * Build validation rules from typoscript.
+        * The old breakOnError property are no longer supported
+        *
+        * @param array $rawArgument
+        * @return void
+        */
+       public function buildRules(array $rawArgument = array()) {
+               $userConfiguredFormTyposcript = $this->configuration->getTypoScript();
+               $rulesTyposcript = isset($userConfiguredFormTyposcript['rules.']) ? $userConfiguredFormTyposcript['rules.'] : NULL;
+               $this->rules[$this->configuration->getPrefix()] = array();
+               if (is_array($rulesTyposcript)) {
+                       $keys = TemplateService::sortedKeyList($rulesTyposcript);
+                       foreach ($keys as $key) {
+                               $ruleName = $rulesTyposcript[$key];
+                               $validatorClassName = $this->typoScriptRepository->getRegisteredClassName($ruleName, 'registeredValidators');
+                               if ($validatorClassName === NULL) {
+                                       throw new \RuntimeException('Class "' . $validatorClassName . '" not registered via typoscript.');
+                               }
+                               if (
+                                       (int)$key
+                                       && strpos($key, '.') === FALSE
+                               ) {
+                                       $ruleArguments = $rulesTyposcript[$key . '.'];
+                                       $fieldName = $this->formUtility->sanitizeNameAttribute($ruleArguments['element']);
+                                               // remove unsupported validator options
+                                       $validatorOptions = $ruleArguments;
+                                       $validatorOptions['errorMessage'] = array($ruleArguments['error.'], $ruleArguments['error']);
+                                       $keysToRemove = array_flip(array(
+                                               'breakOnError',
+                                               'message',
+                                               'message.',
+                                               'error',
+                                               'error.',
+                                               'showMessage',
+                                       ));
+                                       $validatorOptions = array_diff_key($validatorOptions, $keysToRemove);
+
+                                       // Instantiate the validator to check if all required options are assigned
+                                       // and to use the validator message rendering function to pre-render the mandatory message
+                                       /** @var AbstractValidator $validator */
+                                       $validator = $this->objectManager->get($validatorClassName, $validatorOptions);
+
+                                       if ($validator instanceof AbstractValidator) {
+                                               $validator->setConfiguration($this->configuration);
+                                               $validator->setRawArgument($rawArgument);
+                                               $mandatoryMessage = $validator->renderMessage($ruleArguments['message.'], $ruleArguments['message']);
+
+                                               $this->rules[$this->configuration->getPrefix()][$fieldName][] = array(
+                                                       'validator' => $validator,
+                                                       'validatorName' => $validatorClassName,
+                                                       'validatorOptions' => $validatorOptions,
+                                                       'mandatoryMessage' => $mandatoryMessage
+                                               );
+                                       } else {
+                                               throw new \RuntimeException('Class "' . $validatorClassName . '" could not be loaded.');
+                                       }
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Set all validation rules
+        *
+        * @param array $rules
+        * @return void
+        */
+       public function setRules(array $rules) {
+               $this->rules = $rules[$this->configuration->getPrefix()];
+       }
+
+       /**
+        * Get all validation rules
+        *
+        * @return array
+        */
+       public function getRules() {
+               return $this->rules[$this->configuration->getPrefix()];
+       }
+
+       /**
+        * Set a validation rule
+        *
+        * @param string $key
+        * @param array $rule
+        * @return void
+        */
+       public function setRulesByElementName($key = '', array $rule = array()) {
+               $this->rules[$this->configuration->getPrefix()][$key] = $rule;
+       }
+
+       /**
+        * Get a validation rule by key
+        *
+        * @param string $key
+        * @return NULL|array
+        */
+       public function getRulesByElementName($key = '') {
+               if (isset($this->rules[$this->configuration->getPrefix()][$key])) {
+                       return $this->rules[$this->configuration->getPrefix()][$key];
+               }
+               return NULL;
+       }
+
+       /**
+        * Remove a validation rule by key
+        *
+        * @param string $key
+        * @return void
+        */
+       public function removeRule($key = '') {
+               unset($this->rules[$this->configuration->getPrefix()][$key]);
+       }
+
+       /**
+        * Get all mandatory validation messages for a element
+        *
+        * @param string $key
+        * @return array
+        */
+       public function getMandatoryValidationMessagesByElementName($key = '') {
+               $mandatroryMessages = array();
+               if ($this->getRulesByElementName($key)) {
+                       $rules = $this->getRulesByElementName($key);
+                       foreach ($rules as $rule) {
+                               $mandatroryMessages[] = $rule['mandatoryMessage'];
+                       }
+               }
+               return $mandatroryMessages;
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php b/typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php
deleted file mode 100644 (file)
index bbc2e01..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Factory;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\TimeTracker\TimeTracker;
-use TYPO3\CMS\Core\TypoScript\TemplateService;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Form\Domain\Model\Element\AbstractElement;
-use TYPO3\CMS\Form\ObjectFactory;
-
-/**
- * Typoscript factory for form
- *
- * Takes the incoming Typoscipt and adds all the necessary form objects
- * according to the configuration.
- */
-class TypoScriptFactory implements \TYPO3\CMS\Core\SingletonInterface {
-
-       /**
-        * @var string
-        */
-       const PROPERTY_DisableContentElement = 'disableContentElement';
-
-       /**
-        * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
-        */
-       protected $localContentObject;
-
-       /**
-        * @var bool
-        */
-       protected $disableContentElement = FALSE;
-
-       /**
-        * @var TimeTracker
-        */
-       protected $timeTracker;
-
-       /**
-        * @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
-        */
-       protected $frontendController;
-
-       public function __construct() {
-               $this->timeTracker = $GLOBALS['TT'];
-               $this->frontendController = $GLOBALS['TSFE'];
-       }
-
-       /**
-        * Build model from Typoscript
-        *
-        * @param array $typoscript Typoscript containing all configuration
-        * @return \TYPO3\CMS\Form\Domain\Model\Form The form object containing the child elements
-        */
-       public function buildModelFromTyposcript(array $typoscript) {
-               if (isset($typoscript[self::PROPERTY_DisableContentElement])) {
-                       $this->setDisableContentElement($typoscript[self::PROPERTY_DisableContentElement]);
-               }
-               $this->setLayoutHandler($typoscript);
-               $form = $this->createElement('form', $typoscript);
-               return $form;
-       }
-
-       /**
-        * Disables the content element.
-        *
-        * @param bool $disableContentElement
-        * @return void
-        */
-       public function setDisableContentElement($disableContentElement) {
-               $this->disableContentElement = (bool)$disableContentElement;
-       }
-
-       /**
-        * Rendering of a "numerical array" of Form objects from TypoScript
-        * Creates new object for each element found
-        *
-        * @param AbstractElement $parentElement Parent model object
-        * @param array $typoscript Configuration array
-        * @return void
-        * @throws \InvalidArgumentException
-        */
-       public function getChildElementsByIntegerKey(AbstractElement $parentElement, array $typoscript) {
-               if (is_array($typoscript)) {
-                       $keys = TemplateService::sortedKeyList($typoscript);
-                       foreach ($keys as $key) {
-                               $class = $typoscript[$key];
-                               if ((int)$key && strpos($key, '.') === FALSE) {
-                                       if (isset($typoscript[$key . '.'])) {
-                                               $elementArguments = $typoscript[$key . '.'];
-                                       } else {
-                                               $elementArguments = array();
-                                       }
-                                       $this->setElementType($parentElement, $class, $elementArguments);
-                               }
-                       }
-               } else {
-                       throw new \InvalidArgumentException('Container element with id=' . $parentElement->getElementId() . ' has no configuration which means no children.', 1333754854);
-               }
-       }
-
-       /**
-        * Create and add element by type.
-        * This can be a derived Typoscript object by "<",
-        * a form element, or a regular Typoscript object.
-        *
-        * @param AbstractElement $parentElement The parent for the new element
-        * @param string $class Classname for the element
-        * @param array $arguments Configuration array
-        * @return void
-        */
-       public function setElementType(AbstractElement $parentElement, $class, array $arguments) {
-               if (in_array($class, \TYPO3\CMS\Form\Utility\FormUtility::getInstance()->getFormObjects())) {
-                       $this->addElement($parentElement, $class, $arguments);
-               } elseif ($this->disableContentElement === FALSE) {
-                       if ($class[0] === '<') {
-                               $key = trim(substr($class, 1));
-                               /** @var $typoscriptParser \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser */
-                               $typoscriptParser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
-                               $oldArguments = $arguments;
-                               list($class, $arguments) = $typoscriptParser->getVal($key, $this->frontendController->tmpl->setup);
-                               if (is_array($oldArguments) && !empty($oldArguments)) {
-                                       $arguments = array_replace_recursive($arguments, $oldArguments);
-                               }
-                               $this->timeTracker->incStackPointer();
-                               $contentObject = array(
-                                       'cObj' => $class,
-                                       'cObj.' => $arguments
-                               );
-                               $this->addElement($parentElement, 'content', $contentObject);
-                               $this->timeTracker->decStackPointer();
-                       } else {
-                               $contentObject = array(
-                                       'cObj' => $class,
-                                       'cObj.' => $arguments
-                               );
-                               $this->addElement($parentElement, 'content', $contentObject);
-                       }
-               }
-       }
-
-       /**
-        * Add child object to this element
-        *
-        * @param AbstractElement $parentElement Parent model object
-        * @param string $class Type of element
-        * @param array $arguments Configuration array
-        * @return void
-        */
-       public function addElement(AbstractElement $parentElement, $class, array $arguments = array()) {
-               $element = $this->createElement($class, $arguments);
-               if (method_exists($parentElement, 'addElement')) {
-                       $parentElement->addElement($element);
-               }
-       }
-
-       /**
-        * Create element by loading class
-        * and instantiating the object
-        *
-        * @param string $class Type of element
-        * @param array $arguments Configuration array
-        * @return AbstractElement
-        * @throws \InvalidArgumentException
-        */
-       public function createElement($class, array $arguments = array()) {
-               $class = strtolower((string)$class);
-               if ($class === 'form') {
-                       $className = 'TYPO3\\CMS\\Form\\Domain\\Model\\' . ucfirst($class);
-               } else {
-                       $className = 'TYPO3\\CMS\\Form\\Domain\\Model\\Element\\' . ucfirst($class) . 'Element';
-               }
-               /* @var $object AbstractElement */
-               $object = ObjectFactory::createFormObject($className);
-               if ($object->getElementType() === AbstractElement::ELEMENT_TYPE_CONTENT) {
-                       $object->setData($arguments['cObj'], $arguments['cObj.']);
-               } elseif ($object->getElementType() === AbstractElement::ELEMENT_TYPE_PLAIN) {
-                       /* @var $object \TYPO3\CMS\Form\Domain\Model\Element\AbstractPlainElement */
-                       $object->setProperties($arguments);
-               } elseif ($object->getElementType() === AbstractElement::ELEMENT_TYPE_FORM) {
-                       $object->setData($arguments['data']);
-                       $this->reconstituteElement($object, $arguments);
-               } else {
-                       throw new \InvalidArgumentException('Element type "' . $object->getElementType() . '" is not supported.', 1333754878);
-               }
-               return $object;
-       }
-
-       /**
-        * Reconstitutes the domain model of the accordant element.
-        *
-        * @param AbstractElement $element
-        * @param array $arguments Configuration array
-        * @return void
-        */
-       protected function reconstituteElement(AbstractElement $element, array $arguments = array()) {
-               if (isset($arguments['value.'])) {
-                       $cObj = $this->getLocalContentObject();
-                       $arguments['value'] = $cObj->stdWrap($arguments['value'], $arguments['value.']);
-               }
-
-               $this->setAttributes($element, $arguments);
-               $this->setAdditionals($element, $arguments);
-               if (isset($arguments['filters.'])) {
-                       $this->setFilters($element, $arguments['filters.']);
-               }
-               $element->setLayout($arguments['layout']);
-               $element->setValue($arguments['value']);
-               $element->setName($arguments['name']);
-               $element->setMessagesFromValidation();
-               $element->setErrorsFromValidation();
-               $element->checkFilterAndSetIncomingDataFromRequest();
-               $this->getChildElementsByIntegerKey($element, $arguments);
-       }
-
-       /**
-        * Set the attributes
-        *
-        * @param AbstractElement $element Model object
-        * @param array $arguments Arguments
-        * @return void
-        * @throws \RuntimeException
-        * @throws \InvalidArgumentException
-        */
-       public function setAttributes(AbstractElement $element, array $arguments) {
-               if ($element->hasAllowedAttributes()) {
-                       $attributes = $element->getAllowedAttributes();
-                       $mandatoryAttributes = $element->getMandatoryAttributes();
-                       foreach ($attributes as $attribute => $value) {
-                               if (isset($arguments[$attribute]) || isset($arguments[$attribute . '.']) || in_array($attribute, $mandatoryAttributes) || !empty($value)) {
-                                       if ((string)$arguments[$attribute] !== '') {
-                                               $value = $arguments[$attribute];
-                                       } elseif (!empty($arguments[($attribute . '.')])) {
-                                               $value = $arguments[$attribute . '.'];
-                                       }
-                                       try {
-                                               $element->setAttribute($attribute, $value);
-                                       } catch (\Exception $exception) {
-                                               throw new \RuntimeException('Cannot call user function for attribute ' . ucfirst($attribute), 1333754904);
-                                       }
-                               }
-                       }
-               } else {
-                       throw new \InvalidArgumentException('The element with id=' . $element->getElementId() . ' has no default attributes set.', 1333754925);
-               }
-       }
-
-       /**
-        * Set the additionals from Element Typoscript configuration
-        *
-        * @param AbstractElement $element Model object
-        * @param array $arguments Arguments
-        * @return void
-        * @throws \RuntimeException
-        * @throws \InvalidArgumentException
-        */
-       public function setAdditionals(AbstractElement $element, array $arguments) {
-               if (!empty($arguments)) {
-                       if ($element->hasAllowedAdditionals()) {
-                               $additionals = $element->getAllowedAdditionals();
-                               foreach ($additionals as $additional) {
-                                       if (isset($arguments[$additional . '.']) || isset($arguments[$additional])) {
-                                               if (isset($arguments[$additional]) && isset($arguments[$additional . '.'])) {
-                                                       $value = $arguments[$additional . '.'];
-                                                       $type = $arguments[$additional];
-                                               } elseif (isset($arguments[$additional . '.'])) {
-                                                       $value = $arguments[$additional . '.'];
-                                                       $type = 'TEXT';
-                                               } else {
-                                                       $value['value'] = $arguments[$additional];
-                                                       $type = 'TEXT';
-                                               }
-                                               try {
-                                                       $element->setAdditional($additional, $type, $value);
-                                               } catch (\Exception $exception) {
-                                                       throw new \RuntimeException('Cannot call user function for additional ' . ucfirst($additional), 1333754941);
-                                               }
-                                       }
-                                       if (isset($arguments['layout.'][$additional]) && $element->additionalIsSet($additional)) {
-                                               $layout = $arguments['layout.'][$additional];
-                                               $element->setAdditionalLayout($additional, $layout);
-                                       }
-                               }
-                       } else {
-                               throw new \InvalidArgumentException('The element with id=' . $element->getElementId() . ' has no additionals set.', 1333754962);
-                       }
-               }
-       }
-
-       /**
-        * Add the filters according to the settings in the Typoscript array
-        *
-        * @param AbstractElement $element Model object
-        * @param array $arguments TypoScript
-        * @return void
-        */
-       protected function setFilters(AbstractElement $element, array $arguments) {
-               $keys = TemplateService::sortedKeyList($arguments);
-               foreach ($keys as $key) {
-                       $class = $arguments[$key];
-                       if ((int)$key && strpos($key, '.') === FALSE) {
-                               $filterArguments = $arguments[$key . '.'];
-                               $filter = $element->makeFilter($class, $filterArguments);
-                               $element->addFilter($filter);
-                       }
-               }
-       }
-
-       /**
-        * Set the layout handler
-        *
-        * @param array $typoscript TypoScript
-        * @return \TYPO3\CMS\Form\Layout The layout handler
-        */
-       public function setLayoutHandler(array $typoscript) {
-               /** @var $layoutHandler \TYPO3\CMS\Form\Layout */
-               $layoutHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Layout::class);
-               $layoutHandler->setLayout($this->getLayoutFromTypoScript($typoscript));
-               return $layoutHandler;
-       }
-
-       /**
-        * Gets the layout that is configured in TypoScript
-        * If no layout is defined, it returns an empty array to use the default.
-        *
-        * @param array $typoscript The TypoScript configuration
-        * @return array $layout The layout but with respecting its TypoScript configuration
-        */
-       public function getLayoutFromTypoScript($typoscript) {
-               return !empty($typoscript['layout.']) ? $typoscript['layout.'] : array();
-       }
-
-       /**
-        * Set the request handler
-        *
-        * @param array $typoscript TypoScript
-        * @return \TYPO3\CMS\Form\Request The request handler
-        */
-       public function setRequestHandler($typoscript) {
-               $prefix = isset($typoscript['prefix']) ? $typoscript['prefix'] : '';
-               $method = isset($typoscript['method']) ? $typoscript['method'] : '';
-               /** @var $requestHandler \TYPO3\CMS\Form\Request */
-               $requestHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Request::class);
-               // singleton
-               $requestHandler->setPrefix($prefix);
-               $requestHandler->setMethod($method);
-               $requestHandler->storeFiles();
-               return $requestHandler;
-       }
-
-       /**
-        * Set the validation rules
-        *
-        * Makes the validation object and adds rules to it
-        *
-        * @param array $typoscript TypoScript
-        * @return \TYPO3\CMS\Form\Utility\ValidatorUtility The validation object
-        */
-       public function setRules(array $typoscript) {
-               $rulesTyposcript = isset($typoscript['rules.']) ? $typoscript['rules.'] : NULL;
-               /** @var $rulesClass \TYPO3\CMS\Form\Utility\ValidatorUtility */
-               $rulesClass = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Utility\ValidatorUtility::class, $rulesTyposcript);
-               // singleton
-               if (is_array($rulesTyposcript)) {
-                       $keys = TemplateService::sortedKeyList($rulesTyposcript);
-                       foreach ($keys as $key) {
-                               $class = $rulesTyposcript[$key];
-                               if ((int)$key && strpos($key, '.') === FALSE) {
-                                       $elementArguments = $rulesTyposcript[$key . '.'];
-                                       $rule = $rulesClass->createRule($class, $elementArguments);
-                                       $rule->setFieldName($elementArguments['element']);
-                                       $breakOnError = isset($elementArguments['breakOnError']) ? $elementArguments['breakOnError'] : FALSE;
-                                       $rulesClass->addRule($rule, $elementArguments['element'], $breakOnError);
-                               }
-                       }
-               }
-               return $rulesClass;
-       }
-
-       /**
-        * Gets the local content object.
-        *
-        * @return \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
-        */
-       protected function getLocalContentObject() {
-               if (!isset($this->localContentObject)) {
-                       $this->localContentObject = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
-               }
-               return $this->localContentObject;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/AbstractFilter.php b/typo3/sysext/form/Classes/Domain/Filter/AbstractFilter.php
new file mode 100644 (file)
index 0000000..1f530fe
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Abstract class for filters.
+ */
+abstract class AbstractFilter {
+
+       protected function convertCase($value, $case) {
+               $frontendController = $this->getTypoScriptFrontendController();
+               return $this->getCharsetConverter()->conv_case(
+                       $frontendController->renderCharset,
+                       $value,
+                       $case
+               );
+       }
+
+       /**
+        * @return \TYPO3\CMS\Core\Charset\CharsetConverter
+        */
+       protected function getCharsetConverter() {
+               return $this->getTypoScriptFrontendController()->csConvObj;
+       }
+
+       /**
+        * @return \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
+        */
+       protected function getTypoScriptFrontendController() {
+               return $GLOBALS['TSFE'];
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/AlphabeticFilter.php b/typo3/sysext/form/Classes/Domain/Filter/AlphabeticFilter.php
new file mode 100644 (file)
index 0000000..64c0e53
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Alphabetic filter
+ */
+class AlphabeticFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Allow whitespace
+        *
+        * @var bool
+        */
+       protected $allowWhiteSpace;
+
+       /**
+        * Constructor
+        *
+        * @param array $arguments Filter configuration
+        */
+       public function __construct($arguments = array()) {
+               $this->setAllowWhiteSpace($arguments['allowWhiteSpace']);
+       }
+
+       /**
+        * Allow white space in the submitted value
+        *
+        * @param bool $allowWhiteSpace True if allowed
+        * @return void
+        */
+       public function setAllowWhiteSpace($allowWhiteSpace = TRUE) {
+               $this->allowWhiteSpace = (bool)$allowWhiteSpace;
+       }
+
+       /**
+        * Return filtered value
+        * Remove all but alphabetic characters
+        * Allow whitespace by choice
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               $whiteSpace = $this->allowWhiteSpace ? '\\s' : '';
+               $pattern = '/[^\pL' . $whiteSpace . ']/u';
+               return preg_replace($pattern, '', (string)$value);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/AlphanumericFilter.php b/typo3/sysext/form/Classes/Domain/Filter/AlphanumericFilter.php
new file mode 100644 (file)
index 0000000..64e5db0
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Alphanumeric filter
+ */
+class AlphanumericFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Allow whitespace
+        *
+        * @var bool
+        */
+       protected $allowWhiteSpace;
+
+       /**
+        * Constructor
+        *
+        * @param array $arguments Filter configuration
+        */
+       public function __construct($arguments = array()) {
+               $this->setAllowWhiteSpace($arguments['allowWhiteSpace']);
+       }
+
+       /**
+        * Allow white space in the submitted value
+        *
+        * @param bool $allowWhiteSpace True if allowed
+        * @return void
+        */
+       public function setAllowWhiteSpace($allowWhiteSpace = TRUE) {
+               $this->allowWhiteSpace = (bool)$allowWhiteSpace;
+       }
+
+       /**
+        * Return filtered value
+        * Remove all but alphabetic and numeric characters
+        * Allow whitespace by choice
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               $whiteSpace = $this->allowWhiteSpace ? '\\s' : '';
+               $pattern = '/[^\pL\d' . $whiteSpace . ']/u';
+               return preg_replace($pattern, '', (string)$value);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/CurrencyFilter.php b/typo3/sysext/form/Classes/Domain/Filter/CurrencyFilter.php
new file mode 100644 (file)
index 0000000..11f363d
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Currency filter
+ */
+class CurrencyFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Separator between group of thousands
+        * Mostly dot, comma or whitespace
+        *
+        * @var string
+        */
+       protected $decimalsPoint;
+
+       /**
+        * Separator between group of thousands
+        * Mostly dot, comma or whitespace
+        *
+        * @var string
+        */
+       protected $thousandSeparator;
+
+       /**
+        * Constructor
+        *
+        * @param array $arguments Filter configuration
+        */
+       public function __construct($arguments = array()) {
+               $this->setDecimalsPoint($arguments['decimalPoint']);
+               $this->setThousandSeparator($arguments['thousandSeparator']);
+       }
+
+       /**
+        * Set the decimal point character
+        *
+        * @param string $decimalsPoint Character used for decimal point
+        * @return void
+        */
+       public function setDecimalsPoint($decimalsPoint = '.') {
+               if (empty($decimalsPoint)) {
+                       $this->decimalsPoint = '.';
+               } else {
+                       $this->decimalsPoint = (string)$decimalsPoint;
+               }
+       }
+
+       /**
+        * Set the thousand separator character
+        *
+        * @param string $thousandSeparator Character used for thousand separator
+        * @return void
+        */
+       public function setThousandSeparator($thousandSeparator = ',') {
+               if (empty($thousandSeparator)) {
+                       $this->thousandSeparator = ',';
+               } elseif ($thousandSeparator === 'space') {
+                       $this->thousandSeparator = ' ';
+               } elseif ($thousandSeparator === 'none') {
+                       $this->thousandSeparator = '';
+               } else {
+                       $this->thousandSeparator = (string)$thousandSeparator;
+               }
+       }
+
+       /**
+        * Change to float with 2 decimals
+        * Change the dot to comma if requested
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               $value = (double) ((string)$value);
+               return number_format($value, 2, $this->decimalsPoint, $this->thousandSeparator);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/DigitFilter.php b/typo3/sysext/form/Classes/Domain/Filter/DigitFilter.php
new file mode 100644 (file)
index 0000000..9219b44
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Digit filter
+ */
+class DigitFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Return filtered value
+        * Remove all but digits
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               $pattern = '/[^0-9]/';
+               return preg_replace($pattern, '', (string)$value);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/FilterInterface.php b/typo3/sysext/form/Classes/Domain/Filter/FilterInterface.php
new file mode 100644 (file)
index 0000000..2ec49a0
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Interface for filters
+ */
+interface FilterInterface {
+
+       /**
+        * Return filtered value
+        *
+        * @param mixed $value
+        * @return mixed
+        */
+       public function filter($value);
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/IntegerFilter.php b/typo3/sysext/form/Classes/Domain/Filter/IntegerFilter.php
new file mode 100644 (file)
index 0000000..faab26b
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Integer filter
+ */
+class IntegerFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Cast to integer
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               return (int)((string)$value);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/LowerCaseFilter.php b/typo3/sysext/form/Classes/Domain/Filter/LowerCaseFilter.php
new file mode 100644 (file)
index 0000000..2d1b2b4
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Lowercase filter
+ */
+class LowerCaseFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Convert alphabetic characters to lowercase
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               return $this->convertCase($value, 'toLower');
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/RegExpFilter.php b/typo3/sysext/form/Classes/Domain/Filter/RegExpFilter.php
new file mode 100644 (file)
index 0000000..5cd68a2
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Regular expression filter
+ */
+class RegExpFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Regular expression for filter
+        *
+        * @var bool
+        */
+       protected $regularExpression;
+
+       /**
+        * Constructor
+        *
+        * @param array $arguments Filter configuration
+        */
+       public function __construct(array $arguments = array()) {
+               $this->setRegularExpression($arguments['expression']);
+       }
+
+       /**
+        * Set the regular expression
+        *
+        * @param string $expression The regular expression
+        * @return void
+        */
+       public function setRegularExpression($expression) {
+               $this->regularExpression = (string)$expression;
+       }
+
+       /**
+        * Return filtered value
+        * Remove all characters found in regular expression
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               return preg_replace($this->regularExpression, '', (string)$value);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/RemoveXssFilter.php b/typo3/sysext/form/Classes/Domain/Filter/RemoveXssFilter.php
new file mode 100644 (file)
index 0000000..a62a3d0
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Remove Cross Site Scripting filter
+ */
+class RemoveXssFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Return filtered value
+        * Removes potential XSS code from the input string.
+        *
+        * Using an external class by Travis Puderbaugh <kallahar@quickwired.com>
+        *
+        * @param string $value Unfiltered value
+        * @return string The filtered value
+        */
+       public function filter($value) {
+               $value = stripslashes($value);
+               $value = html_entity_decode($value, ENT_QUOTES);
+               $filteredValue = GeneralUtility::removeXSS($value);
+               return $filteredValue;
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/StripNewLinesFilter.php b/typo3/sysext/form/Classes/Domain/Filter/StripNewLinesFilter.php
new file mode 100644 (file)
index 0000000..7754e98
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Strip new lines filter
+ */
+class StripNewLinesFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Strip newlines
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               return str_replace(array(CRLF, LF, CR), ' ', (string)$value);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/TitleCaseFilter.php b/typo3/sysext/form/Classes/Domain/Filter/TitleCaseFilter.php
new file mode 100644 (file)
index 0000000..868b302
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Title filter
+ */
+class TitleCaseFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Convert alphabetic characters to title case
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               $lower = $this->convertCase($value, 'toLower');
+               return ucwords($lower);
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/TrimFilter.php b/typo3/sysext/form/Classes/Domain/Filter/TrimFilter.php
new file mode 100644 (file)
index 0000000..fe23a06
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Trim filter
+ */
+class TrimFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Characters used by trim filter
+        *
+        * @var string
+        */
+       protected $characterList;
+
+       /**
+        * Constructor
+        *
+        * @param array $arguments Filter configuration
+        */
+       public function __construct(array $arguments = array()) {
+               $this->setCharacterList($arguments['characterList']);
+       }
+
+       /**
+        * Set the characters that need to be stripped from the
+        * beginning or the end of the input,
+        * in addition to the default trim characters
+        *
+        * @param string $characterList
+        * @return void
+        */
+       public function setCharacterList($characterList) {
+               $this->characterList = $characterList;
+       }
+
+       /**
+        * Return filtered value
+        * Strip characters from the beginning and the end
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               if ($this->characterList === NULL) {
+                       return trim((string)$value);
+               } else {
+                       return trim((string)$value, $this->characterList);
+               }
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Filter/UpperCaseFilter.php b/typo3/sysext/form/Classes/Domain/Filter/UpperCaseFilter.php
new file mode 100644 (file)
index 0000000..c316b6b
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+namespace TYPO3\CMS\Form\Domain\Filter;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Uppercase filter
+ */
+class UpperCaseFilter extends AbstractFilter implements FilterInterface {
+
+       /**
+        * Convert alphabetic characters to uppercase
+        *
+        * @param string $value
+        * @return string
+        */
+       public function filter($value) {
+               return $this->convertCase($value, 'toUpper');
+       }
+
+}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Additional/AbstractAdditionalElement.php b/typo3/sysext/form/Classes/Domain/Model/Additional/AbstractAdditionalElement.php
deleted file mode 100644 (file)
index a5ac7aa..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Additional;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Abstract for additional
- */
-abstract class AbstractAdditionalElement {
-
-       /**
-        * Additional value
-        *
-        * @var string
-        */
-       protected $value;
-
-       /**
-        * Additional type
-        *
-        * @var string
-        */
-       protected $type;
-
-       /**
-        * Additional layout
-        *
-        * @var string
-        */
-       protected $layout;
-
-       /**
-        * The content object
-        *
-        * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
-        */
-       protected $localCobj;
-
-       /**
-        * Constructor
-        *
-        * @param string $type Type of the object
-        * @param mixed $value Value of the object
-        */
-       public function __construct($type, $value) {
-               /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer localCobj */
-               $this->localCobj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
-               $this->value = $value;
-               $this->type = $type;
-       }
-
-       /**
-        * Get the layout string
-        *
-        * @return string XML string
-        */
-       public function getLayout() {
-               return $this->layout;
-       }
-
-       /**
-        * Set the layout
-        *
-        * @param string $layout XML string
-        * @return void
-        */
-       public function setLayout($layout) {
-               $this->layout = (string)$layout;
-       }
-
-       /**
-        * Returns the value of the object
-        *
-        * @return string
-        */
-       abstract public function getValue();
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Additional/AdditionalAdditionalElement.php b/typo3/sysext/form/Classes/Domain/Model/Additional/AdditionalAdditionalElement.php
deleted file mode 100644 (file)
index cbfad67..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Additional;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-use TYPO3\CMS\Form\ObjectFactory;
-
-/**
- * Additional elements for FORM object
- */
-class AdditionalAdditionalElement {
-
-       /**
-        * Array with the additional objects of the element
-        *
-        * @var array
-        */
-       protected $additional = array();
-
-       /**
-        * Add an additional object to the additional array
-        *
-        * @param string $class Name of the additional
-        * @param mixed $value Typoscript configuration to construct value
-        * @param string $type Typoscript content object
-        * @return AdditionalAdditionalElement
-        */
-       public function addAdditional($class, $type, $value) {
-               $class = strtolower((string)$class);
-               $className = 'TYPO3\\CMS\\Form\\Domain\\Model\\Additional\\' . ucfirst($class) . 'AdditionalElement';
-               $this->additional[$class] = ObjectFactory::createFormObject($className, $type, $value);
-               return $this;
-       }
-
-       /**
-        * Get the additional array of the object
-        *
-        * @return array Additionals of the object
-        */
-       public function getAdditional() {
-               return $this->additional;
-       }
-
-       /**
-        * Get a specific additional object by using the key
-        *
-        * @param string $key Key of the additional
-        * @return \TYPO3\CMS\Form\Domain\Model\Additional\AbstractAdditionalElement The additional object
-        */
-       public function getAdditionalObjectByKey($key) {
-               return $this->additional[$key];
-       }
-
-       /**
-        * Check if an additional is set.
-        * Returns TRUE if set, FALSE if not set.
-        *
-        * @param string $key Name of the additional
-        * @return bool
-        */
-       public function additionalIsSet($key) {
-               return isset($this->additional[$key]);
-       }
-
-       /**
-        * Set the layout for an additional
-        *
-        * @param string $key Key for the additional
-        * @param string $layout XML string
-        * @return void
-        */
-       public function setLayout($key, $layout) {
-               $this->getAdditionalObjectByKey($key)->setLayout($layout);
-       }
-
-       /**
-        * Get a specific additional value by using the key
-        *
-        * @param string $key Key of the additional
-        * @return string The value of the additional
-        */
-       public function getValue($key) {
-               return $this->getAdditionalObjectByKey($key)->getValue();
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Additional/ErrorAdditionalElement.php b/typo3/sysext/form/Classes/Domain/Model/Additional/ErrorAdditionalElement.php
deleted file mode 100644 (file)
index c7557fb..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Additional;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Additional 'error'
- */
-class ErrorAdditionalElement extends \TYPO3\CMS\Form\Domain\Model\Additional\AbstractAdditionalElement {
-
-       /**
-        * Return the value of the object
-        *
-        * @return string
-        */
-       public function getValue() {
-               $errors = array();
-               foreach ($this->value as $error) {
-                       $errors[] = $this->localCobj->cObjGetSingle($this->type, $error);
-               }
-               $value = implode(' - ', $errors);
-               return $value;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Additional/LabelAdditionalElement.php b/typo3/sysext/form/Classes/Domain/Model/Additional/LabelAdditionalElement.php
deleted file mode 100644 (file)
index 9386e92..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Additional;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Additional 'label'
- */
-class LabelAdditionalElement extends \TYPO3\CMS\Form\Domain\Model\Additional\AbstractAdditionalElement {
-
-       /**
-        * Return the value of the object
-        *
-        * @return string
-        */
-       public function getValue() {
-               $value = $this->localCobj->cObjGetSingle($this->type, $this->value);
-               return $value;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Additional/LegendAdditionalElement.php b/typo3/sysext/form/Classes/Domain/Model/Additional/LegendAdditionalElement.php
deleted file mode 100644 (file)
index 324c52f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Additional;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Additional 'legend'
- */
-class LegendAdditionalElement extends \TYPO3\CMS\Form\Domain\Model\Additional\AbstractAdditionalElement {
-
-       /**
-        * Return the value of the object
-        *
-        * @return string
-        */
-       public function getValue() {
-               $additional = $this->localCobj->cObjGetSingle($this->type, $this->value);
-               return $additional;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Additional/MandatoryAdditionalElement.php b/typo3/sysext/form/Classes/Domain/Model/Additional/MandatoryAdditionalElement.php
deleted file mode 100644 (file)
index 0862662..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Additional;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Additional 'mandatory'
- */
-class MandatoryAdditionalElement extends \TYPO3\CMS\Form\Domain\Model\Additional\AbstractAdditionalElement {
-
-       /**
-        * Return the value of the object
-        *
-        * @return array
-        */
-       public function getValue() {
-               $messages = array();
-               foreach ($this->value as $message) {
-                       $messages[] = $this->localCobj->cObjGetSingle($this->type, $message);
-               }
-               $value = implode(' - ', $messages);
-               return $value;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/AbstractAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/AbstractAttribute.php
deleted file mode 100644 (file)
index e5f7cf7..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Abstract for attribute objects
- */
-abstract class AbstractAttribute {
-
-       /**
-        * The value of the attribute
-        *
-        * @var array
-        */
-       protected $value;
-
-       /**
-        * Internal Id of the element
-        *
-        * @var int
-        */
-       protected $elementId;
-
-       /**
-        * The content object
-        *
-        * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
-        */
-       protected $localCobj;
-
-       /**
-        * Constructor
-        *
-        * @param string $value Attribute value
-        * @param int $elementId
-        * @return AbstractAttribute
-        */
-       public function __construct($value, $elementId) {
-               /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer localCobj */
-               $this->localCobj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
-               $this->setValue($value);
-               $this->elementId = (int)$elementId;
-       }
-
-       /**
-        * Set the value
-        *
-        * @param string $value The value to set
-        * @return void
-        */
-       public function setValue($value) {
-               if (is_string($value) === FALSE) {
-                       $value = '';
-               }
-               $this->value = $value;
-       }
-
-       /**
-        * Gets the accordant attribute value.
-        *
-        * @return string
-        */
-       abstract public function getValue();
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/AcceptAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/AcceptAttribute.php
deleted file mode 100644 (file)
index 5b2e653..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'accept'
- */
-class AcceptAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'accept'.
-        * Used with the elements 'form', 'input'
-        * Case Insensitive
-        *
-        * This attribute specifies a comma-separated list of content types
-        * that a server processing this form will handle correctly.
-        * User agents may use this information to filter out non-conforming files
-        * when prompting a user to select files to be sent to the server (cf. the INPUT element when type="file").
-        * RFC2045: For a complete list, see http://www.iana.org/assignments/media-types/
-        *
-        * @todo Perhaps we once can add a list of all content-types to TYPO3
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = (string)$this->value;
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/AcceptCharsetAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/AcceptCharsetAttribute.php
deleted file mode 100644 (file)
index 3dcd548..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'acceptcharset'
- */
-class AcceptCharsetAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'accept-charset'.
-        * Used with the element 'form'
-        * Case Insensitive
-        *
-        * This attribute specifies the list of character encodings for input data
-        * that is accepted by the server processing this form.
-        * The value is a space- and/or comma-delimited list of charset values.
-        * The client must interpret this list as an exclusive-or list, i.e.,
-        * the server is able to accept any single character encoding per entity received.
-        *
-        * The default value for this attribute is the reserved string "UNKNOWN".
-        * User agents may interpret this value as the character encoding that was
-        * used to transmit the document containing this FORM element.
-        *
-        * RFC2045: For a complete list, see http://www.iana.org/assignments/character-sets/
-        *
-        * @todo Perhaps we once can add a list of all character-sets to TYPO3
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = (string)$this->value;
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/AccesskeyAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/AccesskeyAttribute.php
deleted file mode 100644 (file)
index a86bbb1..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'accesskey'
- */
-class AccesskeyAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'accesskey'.
-        * Used with the element 'button, input, label, legend, textarea'
-        * Not subject to case changes
-        *
-        * This attribute assigns an access key to an element.
-        * An access key is a single character from the document character set.
-        * Note. Authors should consider the input method of the expected reader
-        * when specifying an accesskey.
-        *
-        * Pressing an access key assigned to an element gives focus to the element.
-        * The action that occurs when an element receives focus depends on the element.
-        * For example, when a user activates a link defined by the A element,
-        * the user agent generally follows the link. When a user activates a radio
-        * button, the user agent changes the value of the radio button.
-        * When the user activates a text field, it allows input, etc.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = (string)$this->value;
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/ActionAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/ActionAttribute.php
deleted file mode 100644 (file)
index c381d5e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'action'
- */
-class ActionAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'action'
-        * Used with the element 'form'
-        * Lower case
-        *
-        * This attribute specifies a form processing agent.
-        * User agent behavior for a value other than an HTTP URI is undefined.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $value = $this->value;
-               if (empty($value)) {
-                       $value = $GLOBALS['TSFE']->id;
-               }
-               $attribute = $this->localCobj->getTypoLink_URL($value);
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/AltAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/AltAttribute.php
deleted file mode 100644 (file)
index eab1874..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'alt'
- */
-class AltAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'alt'
-        * Used with the element 'input'
-        * Case sensitive
-        *
-        * For user agents that cannot display images, forms, or applets,
-        * this attribute specifies alternate text. The language of the alternate
-        * text is specified by the lang attribute.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = (string)$this->value;
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php
deleted file mode 100644 (file)
index a6e7523..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Form\ObjectFactory;
-
-/**
- * Attribute class for the form elements
- */
-class AttributesAttribute {
-
-       /**
-        * The attributes of the element
-        *
-        * @var array
-        */
-       protected $attributes = array();
-
-       /**
-        * Internal Id of the element
-        *
-        * @var int
-        */
-       protected $elementId;
-
-       /**
-        * The content object
-        *
-        * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
-        */
-       protected $localCobj;
-
-       /**
-        * Constructor
-        *
-        * @param int $elementId The ID of the element
-        * @return AttributesAttribute
-        */
-       public function __construct($elementId) {
-               $this->elementId = (int)$elementId;
-               $this->localCobj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
-               $this->localizationHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Localization::class);
-               $this->requestHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Form\Request::class);
-       }
-
-       /**
-        * Add an attribute object to the attribute array
-        *
-        * @param string $class Name of the attribute
-        * @param mixed $value Typoscript configuration to construct value
-        * @return \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute
-        */
-       public function addAttribute($class, $value) {
-               $class = strtolower((string)$class);
-               $className = 'TYPO3\\CMS\\Form\\Domain\\Model\\Attribute\\' . ucfirst($class) . 'Attribute';
-               $this->attributes[$class] = ObjectFactory::createFormObject($className, $value, $this->elementId);
-               return $this;
-       }
-
-       /**
-        * Remove an attribute object from the attribute array
-        *
-        * @param string $class Name of the attribute
-        * @return \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute
-        */
-       public function removeAttribute($class) {
-               unset($this->attributes[$class]);
-               return $this;
-       }
-
-       /**
-        * Get the attributes of the object
-        *
-        * @return \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute[] Attributes objects
-        */
-       public function getAttributes() {
-               return $this->attributes;
-       }
-
-       /**
-        * Get a specific attribute object by using the key
-        *
-        * @param string $key Key of the attribute
-        * @return \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute The attribute object
-        */
-       public function getAttributeObjectByKey($key) {
-               return $this->attributes[$key];
-       }
-
-       /**
-        * Add an attribute object to the attribute array
-        *
-        * @param string $key The name of the attribute
-        * @param \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute $attributeObject The attribute object
-        * @return void
-        */
-       public function setAttribute($key, $attributeObject) {
-               $this->attributes[$key] = (object) $attributeObject;
-       }
-
-       /**
-        * Returns TRUE if attribute is set
-        *
-        * @param string $key The name of the attribute
-        * @return bool
-        */
-       public function hasAttribute($key) {
-               return isset($this->attributes[$key]);
-       }
-
-       /**
-        * Set the value of a specific attribute object
-        *
-        * @param $key string Name of the object
-        * @param $value string The value
-        * @return void
-        */
-       public function setValue($key, $value) {
-               $this->getAttributeObjectByKey($key)->setValue($value);
-       }
-
-       /**
-        * Get a specific attribute value by using the key
-        *
-        * @param string $key Key of the attribute
-        * @return string The content of the attribute
-        */
-       public function getValue($key) {
-               if ($this->hasAttribute($key)) {
-                       return $this->getAttributeObjectByKey($key)->getValue();
-               } else {
-                       return '';
-               }
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/CheckedAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/CheckedAttribute.php
deleted file mode 100644 (file)
index 09d1163..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'checked'
- */
-class CheckedAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'checked'
-        * Used with the element 'input' only if type attribute has the value
-        * 'radio, checkbox'
-        * Case insensitive
-        *
-        * When the type attribute has the value "radio" or "checkbox",
-        * this boolean attribute specifies that the button is on.
-        * User agents must ignore this attribute for other control types.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = '';
-               if (((int)$this->value === 1 || (bool)$this->value === TRUE) || strtolower((string)$this->value === 'checked')) {
-                       $attribute = 'checked';
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/ClassAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/ClassAttribute.php
deleted file mode 100644 (file)
index ec6029e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'class'
- */
-class ClassAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'class'.
-        * Used with all elements
-        * Case Sensitive
-        *
-        * This attribute assigns a class name or set of class names to an element.
-        * Any number of elements may be assigned the same class name or names.
-        * Multiple class names must be separated by white space characters.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = (string)$this->value;
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/ColsAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/ColsAttribute.php
deleted file mode 100644 (file)
index 35f277e..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'cols'
- */
-class ColsAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'cols'.
-        * Used with the element 'textarea'
-        * Not subject to case changes, because it's an integer
-        *
-        * This attribute specifies the visible width in average character widths.
-        * Users should be able to enter longer lines than this,
-        * so user agents should provide some means to scroll through the contents
-        * of the control when the contents extend beyond the visible area.
-        * User agents may wrap visible text lines to keep long lines visible
-        * without the need for scrolling.
-        *
-        * @return int Attribute value
-        */
-       public function getValue() {
-               $value = (int)$this->value;
-               if ($value <= 0) {
-                       $attribute = 40;
-               } else {
-                       $attribute = $value;
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/DirAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/DirAttribute.php
deleted file mode 100644 (file)
index faa27ac..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'dir'
- */
-class DirAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'dir'.
-        * Used with all elements
-        * Case Insensitive
-        *
-        * This attribute specifies the base direction of directionally neutral text
-        * (i.e., text that doesn't have inherent directionality as defined in
-        * [UNICODE]) in an element's content and attribute values.
-        * It also specifies the directionality of tables. Possible values:
-        *
-        * LTR: Left-to-right text or table.
-        * RTL: Right-to-left text or table.
-        *
-        * In addition to specifying the language of a document with the lang
-        * attribute, authors may need to specify the base directionality
-        * (left-to-right or right-to-left) of portions of a document's text,
-        * of table structure, etc. This is done with the dir attribute.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = '';
-               $value = strtolower((string)$this->value);
-               if ($value == 'ltr' || $value == 'rtl') {
-                       $attribute = $value;
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/DisabledAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/DisabledAttribute.php
deleted file mode 100644 (file)
index 1cf9d18..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'disabled'
- */
-class DisabledAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'disabled'.
-        * Used with the elements button, input, optgroup, option, select & textarea
-        * Case Insensitive
-        *
-        * When set for a form control, this boolean attribute disables the control
-        * for user input.
-        *
-        * When set, the disabled attribute has the following effects on an element:
-        * Disabled controls do not receive focus.
-        * Disabled controls are skipped in tabbing navigation.
-        * Disabled controls cannot be successful.
-        *
-        * This attribute is inherited but local declarations override the inherited value.
-        *
-        * How disabled elements are rendered depends on the user agent.
-        * For example, some user agents "gray out" disabled menu items,
-        * button labels, etc.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = '';
-               if (((int)$this->value === 1 || (bool)$this->value === TRUE) || strtolower((string)$this->value) === 'disabled') {
-                       $attribute = 'disabled';
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/EnctypeAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/EnctypeAttribute.php
deleted file mode 100644 (file)
index e3061d6..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'enctype'
- */
-class EnctypeAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'enctype'.
-        * Used with the element 'form'
-        * Case Insensitive
-        *
-        * This attribute specifies the content type used to submit the form to the
-        * server (when the value of method is "post"). The default value for this
-        * attribute is "application/x-www-form-urlencoded".
-        * The value "multipart/form-data" should be used in combination with the
-        * INPUT element, type="file".
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $value = trim(strtolower((string)$this->value));
-               if ($value === 'application/x-www-form-urlencoded') {
-                       $attribute = $value;
-               } else {
-                       $attribute = 'multipart/form-data';
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/IdAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/IdAttribute.php
deleted file mode 100644 (file)
index 84821bf..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'id'
- */
-class IdAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'id'.
-        * Used with all elements
-        * Case Sensitive
-        *
-        * This attribute assigns an id to an element.
-        * This id must be unique in a document.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $value = (string)$this->value;
-               if (empty($value)) {
-                       $value = $this->elementId;
-                       if (is_integer($value)) {
-                               $value = 'field-' . $value;
-                       }
-               }
-               // Change spaces into hyphens
-               $attribute = preg_replace('/\\s/', '-', $value);
-               // Change first non-letter to field-
-               if (preg_match('/^([^a-zA-Z]{1})/', $attribute)) {
-                       $attribute = 'field-' . $attribute;
-               }
-               // Remove non-word characters
-               $attribute = preg_replace('/([^a-zA-Z0-9_:\\-\\.]*)/', '', $attribute);
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/LabelAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/LabelAttribute.php
deleted file mode 100644 (file)
index 5c8acd8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'label'
- */
-class LabelAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Defines the label usage of the linked document.
-        * Used with optgroup and option
-        * Case Sensitive
-        *
-        * This attribute allows authors to specify a shorter label for an option
-        * than the content of the OPTION element. When specified, user agents
-        * should use the value of this attribute
-        * rather than the content of the OPTION element as the option label.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = (string)$this->value;
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/LangAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/LangAttribute.php
deleted file mode 100644 (file)
index e4404d0..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'lang'
- */
-class LangAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'lang'.
-        * Used with all elements
-        * Case Insensitive
-        *
-        * This attribute specifies the base language of an element's attribute
-        * values and text content. The default value of this attribute is unknown.
-        *
-        * Briefly, language codes consist of a primary code
-        * and a possibly empty series of subcodes:
-        *
-        * language-code = primary-code ( "-" subcode )
-        *
-        * Here are some sample language codes:
-        * "en": English
-        * "en-US": the U.S. version of English.
-        * "en-cockney": the Cockney version of English.
-        * "i-navajo": the Navajo language spoken by some Native Americans.
-        * "x-klingon": The primary tag "x" indicates an experimental language tag
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = (string)$this->value;
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/MaxlengthAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/MaxlengthAttribute.php
deleted file mode 100644 (file)
index 846fa91..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'maxlength'
- */
-class MaxlengthAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'maxlength'.
-        * Used with element 'input'
-        * Not subject to case changes, because it's an integer
-        *
-        * When the type attribute has the value "text" or "password",
-        * this attribute specifies the maximum number of characters
-        * the user may enter. This number may exceed the specified size,
-        * in which case the user agent should offer a scrolling mechanism.
-        * The default value for this attribute is an unlimited number.
-        *
-        * @return int Attribute value
-        */
-       public function getValue() {
-               $value = (int)$this->value;
-               if ($value <= 0) {
-                       $attribute = 40;
-               } else {
-                       $attribute = $value;
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/MethodAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/MethodAttribute.php
deleted file mode 100644 (file)
index 6620e28..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'method'
- */
-class MethodAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Sets the attribute 'method'.
-        * Used with element 'form'
-        * Case Insensitive
-        *
-        * This attribute specifies which HTTP method will be used
-        * to submit the form data set.
-        * Possible (case-insensitive) values are "get" (the default) and "post".
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $value = strtolower((string)$this->value);
-               if ($value == 'post' || $value == 'get') {
-                       $attribute = $value;
-               } else {
-                       $attribute = 'post';
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/MultipleAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/MultipleAttribute.php
deleted file mode 100644 (file)
index 1cfab99..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'multiple'
- */
-class MultipleAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'multiple'.
-        * Used with element 'select'
-        * Case Insensitive
-        *
-        * If set, this boolean attribute allows multiple selections.
-        * If not set, the SELECT element only permits single selections.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = '';
-               if (((int)$this->value === 1 || (bool)$this->value === TRUE) || strtolower((string)$this->value) === 'multiple') {
-                       $attribute = 'multiple';
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/NameAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/NameAttribute.php
deleted file mode 100644 (file)
index c102dfd..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'name'
- */
-class NameAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Addition to the name value
-        *
-        * @var string
-        */
-       protected $addition;
-
-       /**
-        * TRUE if value is expected without prefix
-        *
-        * @var bool
-        */
-       protected $returnValueWithoutPrefix = FALSE;
-
-       /**
-        * Return the name attribute without the prefix
-        *
-        * @return string
-        */
-       public function getValueWithoutPrefix() {
-               $value = (string)$this->value;
-               // Change spaces into hyphens
-               $value = preg_replace('/\\s/', '-', $value);
-               // Remove non-word characters
-               $value = preg_replace('/[^a-zA-Z0-9_\\-]+/', '', $value);
-               if (empty($value)) {
-                       $value = $this->elementId;
-               }
-               return $value;
-       }
-
-       /**
-        * Gets the attribute 'name'.
-        * Used with all elements
-        * Case Insensitive
-        *
-        * This attribute names the element so that it may be referred to
-        * from style sheets or scripts.
-        *
-        * Note: This attribute has been included for backwards compatibility.
-        * Applications should use the id attribute to identify elements.
-        * This does not apply for form objects, only the form tag
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $value = $this->getValueWithoutPrefix();
-               if ($this->returnValueWithoutPrefix === FALSE) {
-                       $requestHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Form\Request::class);
-                       $attribute = $requestHandler->getPrefix() . '[' . $value . ']' . $this->addition;
-               } else {
-                       $attribute = $value;
-               }
-               return $attribute;
-       }
-
-       /**
-        * Sets an additional string which will be added to the name
-        * This is necessarry in some cases like a multiple select box
-        *
-        * @param string $addition The additional string
-        * @return \TYPO3\CMS\Form\Domain\Model\Attribute\NameAttribute
-        */
-       public function setAddition($addition) {
-               $this->addition = (string)$addition;
-               return $this;
-       }
-
-       /**
-        * TRUE if element is not allowed to use a prefix
-        * This is the case with the <form> tag
-        *
-        * @param bool $parameter
-        * @return void
-        */
-       public function setReturnValueWithoutPrefix($parameter) {
-               $this->returnValueWithoutPrefix = (bool)$parameter;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/PlaceholderAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/PlaceholderAttribute.php
deleted file mode 100755 (executable)
index aae4855..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/**
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'placeholder'
- */
-class PlaceholderAttribute extends AbstractAttribute {
-
-       /**
-        * Gets the attribute 'placeholder'.
-        * Used with textline element
-        *
-        * This attribute assigns a placeholder to an element.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               return (string)$this->value;
-       }
-
-       /**
-        * Set the value
-        *
-        * @param mixed $value The value to set
-        * @return void
-        */
-       public function setValue($value) {
-               if (is_string($value)) {
-                       $this->value = $value;
-               } elseif (is_array($value)) {
-                       $this->value = $this->localCobj->cObjGetSingle('TEXT', $value);
-               } else {
-                       $this->value = '';
-               }
-       }
-}
\ No newline at end of file
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/ReadonlyAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/ReadonlyAttribute.php
deleted file mode 100644 (file)
index 53504b7..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'readonly'
- */
-class ReadonlyAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'readonly'.
-        * Used with the elements input and textarea
-        * Case Insensitive
-        *
-        * When set for a form control, this boolean attribute prohibits changes
-        * to the control.
-        *
-        * The readonly attribute specifies whether the control may be modified by the user.
-        *
-        * When set, the readonly attribute has the following effects on an element:
-        * Read-only elements receive focus but cannot be modified by the user.
-        * Read-only elements are included in tabbing navigation.
-        * Read-only elements may be successful.
-        *
-        * How read-only elements are rendered depends on the user agent.
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = '';
-               if (((int)$this->value === 1 || (bool)$this->value === TRUE) || strtolower((string)$this->value) === 'readonly') {
-                       $attribute = 'readonly';
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/RowsAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/RowsAttribute.php
deleted file mode 100644 (file)
index 1d46cf4..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'rows'
- */
-class RowsAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'rows'.
-        * Used with the element 'textarea'
-        * Not subject to case changes, because it's an integer
-        *
-        * This attribute specifies the number of visible text lines.
-        * Users should be able to enter more lines than this,
-        * so user agents should provide some means to scroll
-        * through the contents of the control when the contents extend
-        * beyond the visible area.
-        *
-        * @return int Attribute value
-        */
-       public function getValue() {
-               $value = (int)$this->value;
-               if ($value <= 0) {
-                       $attribute = 80;
-               } else {
-                       $attribute = $value;
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/SelectedAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/SelectedAttribute.php
deleted file mode 100644 (file)
index 57601e3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'selected'
- */
-class SelectedAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'selected'
-        * Used with the element 'option'
-        * Case insensitive
-        *
-        * @return string Attribute value
-        */
-       public function getValue() {
-               $attribute = '';
-               if (((int)$this->value === 1 || (bool)$this->value === TRUE) || strtolower((string)$this->value) === 'selected') {
-                       $attribute = 'selected';
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/SizeAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/SizeAttribute.php
deleted file mode 100644 (file)
index 5170e16..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-namespace TYPO3\CMS\Form\Domain\Model\Attribute;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Attribute 'size'
- */
-class SizeAttribute extends \TYPO3\CMS\Form\Domain\Model\Attribute\AbstractAttribute {
-
-       /**
-        * Gets the attribute 'size'.
-        * Used with the element 'input'
-        * Not subject to case changes, because it's an integer
-        *
-        * This attribute tells the user agent the initial width of the control.
-        * The width is given in pixels except when type attribute
-        * has the value "text" or "password".
-        * In that case, its value refers to the (int) number of characters.
-        *
-        * @return int Attribute value
-        */
-       public function getValue() {
-               $value = (int)$this->value;
-               if ($value <= 0) {
-                       $attribute = 40;
-               } else {
-                       $attribute = $value;
-               }
-               return $attribute;
-       }
-
-}
diff --git a/typo3/sysext/form/Classes/Domain/Model/Attribute/SrcAttribute.php b/typo3/sysext/form/Classes/Domain/Model/Attribute/SrcAttribute.php
deleted file mode 100644 (file)
index c6497fb..0000000