WIP Implement referrer form finisher
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Form;
|
||||
|
||||
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
||||
|
||||
class AddReferrerFinisher extends AbstractFinisher
|
||||
{
|
||||
protected function executeInternal()
|
||||
{
|
||||
$referrer = 'FooBarBaz';
|
||||
|
||||
$field = $this->finisherContext
|
||||
->getFormRuntime()
|
||||
->getFormDefinition()
|
||||
->getPageByIndex(0)
|
||||
->createElement('referrer', 'Text');
|
||||
|
||||
$field->setDefaultValue($referrer);
|
||||
$field->setDataType('string');
|
||||
$field->setLabel('Referrer');
|
||||
|
||||
$this->finisherContext->getFinisherVariableProvider()->add(
|
||||
$this->shortFinisherIdentifier,
|
||||
'referrer',
|
||||
$referrer
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,16 @@
|
||||
@import "EXT:form/Configuration/TypoScript/setup.typoscript"
|
||||
@import 'EXT:form/Configuration/TypoScript/setup.typoscript'
|
||||
@import 'EXT:form_element_linked_checkbox/Configuration/TypoScript/setup.typoscript'
|
||||
|
||||
plugin.tx_form.view {
|
||||
templateRootPaths.10 = EXT:ep_theme/Resources/Private/Templates/Form/
|
||||
}
|
||||
|
||||
plugin.tx_form.settings.yamlConfigurations {
|
||||
100 = EXT:ep_theme/Configuration/Forms/FormSetup.yaml
|
||||
1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml
|
||||
1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersFrontend.yaml
|
||||
}
|
||||
|
||||
module.tx_form.settings.yamlConfigurations {
|
||||
100 = EXT:ep_theme/Configuration/Forms/FormSetup.yaml
|
||||
1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml
|
||||
1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersBackend.yaml
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
TYPO3:
|
||||
CMS:
|
||||
Form:
|
||||
prototypes:
|
||||
standard:
|
||||
formElementsDefinition:
|
||||
Form:
|
||||
formEditor:
|
||||
editors:
|
||||
900:
|
||||
selectOptions:
|
||||
1000:
|
||||
value: 'BpnApiFinisher'
|
||||
label: 'BusPro Finisher'
|
||||
1100:
|
||||
value: 'AddReferrerFinisher'
|
||||
label: 'Referrer Finisher'
|
||||
propertyCollections:
|
||||
finishers:
|
||||
1000:
|
||||
identifier: 'BpnApiFinisher'
|
||||
editors:
|
||||
__inheritances:
|
||||
10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin'
|
||||
100:
|
||||
label: 'BusPro Finisher'
|
||||
110:
|
||||
identifier: 'mapping'
|
||||
templateName: 'Inspector-TextEditor'
|
||||
label: 'Mapping'
|
||||
propertyPath: 'options.mapping'
|
||||
propertyValidators:
|
||||
10: 'NotEmpty'
|
||||
1100:
|
||||
identifier: 'AddReferrerFinisher'
|
||||
editors:
|
||||
__inheritances:
|
||||
10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin'
|
||||
100:
|
||||
label: 'Referrer Finisher'
|
||||
|
||||
finishersDefinition:
|
||||
BpnApiFinisher:
|
||||
formEditor:
|
||||
iconIdentifier: 'form-finisher'
|
||||
predefinedDefaults:
|
||||
options:
|
||||
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,street:text-3,zipCode:text-4,city:text-5,phone:telephone-1'
|
||||
AddReferrerFinisher:
|
||||
formEditor:
|
||||
iconIdentifier: 'form-finisher'
|
||||
@@ -0,0 +1,19 @@
|
||||
TYPO3:
|
||||
CMS:
|
||||
Form:
|
||||
prototypes:
|
||||
standard:
|
||||
finishersDefinition:
|
||||
BpnApiFinisher:
|
||||
implementationClassName: 'EP\EpTheme\Form\BpnApiFinisher'
|
||||
formEditor:
|
||||
label: 'BusPro Finisher'
|
||||
options:
|
||||
identifier: 'BpnApiFinisher'
|
||||
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,street:text-3,zipCode:text-4,city:text-5,phone:telephone-1'
|
||||
AddReferrerFinisher:
|
||||
implementationClassName: 'EP\EpTheme\Form\AddReferrerFinisher'
|
||||
formEditor:
|
||||
label: 'Referrer Finisher'
|
||||
options:
|
||||
identifier: 'AddReferrerFinisher'
|
||||
@@ -0,0 +1,23 @@
|
||||
TYPO3:
|
||||
CMS:
|
||||
Form:
|
||||
persistenceManager:
|
||||
allowedExtensionPaths:
|
||||
10: EXT:ep_theme/Resources/Private/Forms/
|
||||
prototypes:
|
||||
standard:
|
||||
formElementsDefinition:
|
||||
Form:
|
||||
renderingOptions:
|
||||
templateRootPaths:
|
||||
1505042810: 'EXT:ep_theme/Resources/Private/Templates/Form/'
|
||||
partialRootPaths:
|
||||
1505042810: 'EXT:ep_theme/Resources/Private/Partials/Form/'
|
||||
layoutRootPaths:
|
||||
1505042810: 'EXT:ep_theme/Resources/Private/Layouts/Form/'
|
||||
contactform:
|
||||
__inheritances:
|
||||
10: 'TYPO3.CMS.Form.prototypes.standard'
|
||||
applicationform:
|
||||
__inheritances:
|
||||
10: 'TYPO3.CMS.Form.prototypes.standard'
|
||||
Reference in New Issue
Block a user