‪TYPO3CMS  10.4
TYPO3\CMS\Form\Controller\FormEditorController Class Reference
Inheritance diagram for TYPO3\CMS\Form\Controller\FormEditorController:
TYPO3\CMS\Form\Controller\AbstractBackendController TYPO3\CMS\Extbase\Mvc\Controller\ActionController TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface

Public Member Functions

 indexAction (string $formPersistenceIdentifier, string $prototypeName=null)
 
 initializeSaveFormAction ()
 
 saveFormAction (string $formPersistenceIdentifier, FormDefinitionArray $formDefinition)
 
string renderFormPageAction (FormDefinitionArray $formDefinition, int $pageIndex, string $prototypeName=null)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Form\Controller\AbstractBackendController
 injectFormPersistenceManager (FormPersistenceManagerInterface $formPersistenceManager)
 
 initializeObject ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectSignalSlotDispatcher (Dispatcher $signalSlotDispatcher)
 
 injectValidatorResolver (ValidatorResolver $validatorResolver)
 
 injectViewResolver (ViewResolverInterface $viewResolver)
 
 injectReflectionService (ReflectionService $reflectionService)
 
 injectCacheService (CacheService $cacheService)
 
 injectHashService (HashService $hashService)
 
 injectMvcPropertyMappingConfigurationService (MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 initializeControllerArgumentsBaseValidators ()
 
 processRequest (RequestInterface $request, ResponseInterface $response)
 
ControllerContext getControllerContext ()
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=AbstractMessage::OK, $storeInSession=true)
 
bool canProcessRequest (RequestInterface $request)
 
 forward ($actionName, $controllerName=null, $extensionName=null, array $arguments=null)
 
 throwStatus ($statusCode, $statusMessage=null, $content=null)
 

Protected Member Functions

SiteLanguage buildFakeSiteLanguage (int $pageId, int $languageId)
 
array getInsertRenderablesPanelConfiguration (array $formElementsDefinition)
 
array getFormEditorDefinitions ()
 
 registerDocheaderButtons ()
 
string renderFormEditorTemplates (array $formEditorDefinitions)
 
array transformFormDefinitionForFormEditor (array $formDefinition)
 
array transformMultiValuePropertiesForFormEditor (array $formDefinition, string $identifierProperty, array $multiValueProperties)
 
array filterEmptyArrays (array $array)
 
array migrateTranslationFileOptions (array $formDefinition)
 
array migrateEmailFinisherRecipients (array $formDefinition)
 
array migrateEmailFormatOption (array $formDefinition)
 
FormDefinitionConversionService getFormDefinitionConversionService ()
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 
PageRenderer getPageRenderer ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Form\Controller\AbstractBackendController
array resolveResourcePaths (array $resourcePaths)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 initializeView (ViewInterface $view)
 
 initializeAction ()
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
 renderAssetsForRequest ($request)
 
string resolveActionMethodName ()
 
 callActionMethod ()
 
 emitBeforeCallActionMethodSignal (array $preparedArguments)
 
ViewInterface resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
array getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
string errorAction ()
 
 clearCacheOnError ()
 
 addErrorFlashMessage ()
 
string getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
string getFlattenedValidationErrorMessage ()
 
TYPO3 CMS Extbase Mvc Controller ControllerContext buildControllerContext ()
 
 redirect ($actionName, $controllerName=null, $extensionName=null, array $arguments=null, $pageUid=null, $delay=0, $statusCode=303)
 
 redirectToUri ($uri, $delay=0, $statusCode=303)
 
string addBaseUriIfNecessary ($uri)
 
 mapRequestArgumentsToControllerArguments ()
 

Protected Attributes

string $defaultViewObjectName = BackendTemplateView::class
 
array $prototypeConfiguration
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Form\Controller\AbstractBackendController
array $formSettings
 
TYPO3 CMS Form Mvc Persistence FormPersistenceManagerInterface $formPersistenceManager
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
TYPO3 CMS Extbase Service CacheService $cacheService
 
HashService $hashService
 
ViewInterface $view
 
string $defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
TYPO3 CMS Extbase Mvc Request $request
 
TYPO3 CMS Extbase Mvc Response $response
 
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
 
array $settings
 
TYPO3 CMS Extbase Validation ValidatorResolver $validatorResolver
 
TYPO3 CMS Extbase Mvc Controller Arguments $arguments
 
array $supportedRequestTypes = array( Request::class )
 
TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
 
ConfigurationManagerInterface $configurationManager
 

Detailed Description

The form editor controller

Scope: backend

Definition at line 52 of file FormEditorController.php.

Member Function Documentation

◆ buildFakeSiteLanguage()

SiteLanguage TYPO3\CMS\Form\Controller\FormEditorController::buildFakeSiteLanguage ( int  $pageId,
int  $languageId 
)
protected

Build a SiteLanguage object to render the form preview with a specific language.

Parameters
int$pageId
int$languageId
Returns
‪SiteLanguage

Definition at line 238 of file FormEditorController.php.

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\renderFormPageAction().

◆ filterEmptyArrays()

array TYPO3\CMS\Form\Controller\FormEditorController::filterEmptyArrays ( array  $array)
protected

Remove keys from an array if the key value is an empty array

Parameters
array$array
Returns
‪array

Definition at line 625 of file FormEditorController.php.

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor().

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Form\Controller\FormEditorController::getBackendUser ( )
protected

Returns the current BE user.

Returns
‪BackendUserAuthentication

Definition at line 777 of file FormEditorController.php.

References $GLOBALS.

◆ getFormDefinitionConversionService()

FormDefinitionConversionService TYPO3\CMS\Form\Controller\FormEditorController::getFormDefinitionConversionService ( )
protected
Returns
‪FormDefinitionConversionService

Definition at line 767 of file FormEditorController.php.

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor().

◆ getFormEditorDefinitions()

array TYPO3\CMS\Form\Controller\FormEditorController::getFormEditorDefinitions ( )
protected

◆ getInsertRenderablesPanelConfiguration()

array TYPO3\CMS\Form\Controller\FormEditorController::getInsertRenderablesPanelConfiguration ( array  $formElementsDefinition)
protected

Prepare the formElements.*.formEditor section from the YAML settings. Sort all formElements into groups and add additional data.

Parameters
array$formElementsDefinition
Returns
‪array

Definition at line 269 of file FormEditorController.php.

References TYPO3\CMS\Form\Service\TranslationService\getInstance(), and TYPO3\CMS\Form\Service\TranslationService\translateValuesRecursive().

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\renderFormEditorTemplates().

◆ getLanguageService()

LanguageService TYPO3\CMS\Form\Controller\FormEditorController::getLanguageService ( )
protected

Returns the language service

Returns
‪LanguageService

Definition at line 787 of file FormEditorController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\registerDocheaderButtons().

◆ getPageRenderer()

PageRenderer TYPO3\CMS\Form\Controller\FormEditorController::getPageRenderer ( )
protected

Returns the page renderer

Returns
‪PageRenderer

Definition at line 797 of file FormEditorController.php.

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\indexAction().

◆ indexAction()

◆ initializeSaveFormAction()

TYPO3\CMS\Form\Controller\FormEditorController::initializeSaveFormAction ( )

Initialize the save action. This action uses the Fluid JsonView::class as view.

Definition at line 150 of file FormEditorController.php.

◆ migrateEmailFinisherRecipients()

array TYPO3\CMS\Form\Controller\FormEditorController::migrateEmailFinisherRecipients ( array  $formDefinition)
protected

Migrate single recipient options to their list successors

Parameters
array$formDefinition
Returns
‪array

Definition at line 695 of file FormEditorController.php.

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor().

◆ migrateEmailFormatOption()

array TYPO3\CMS\Form\Controller\FormEditorController::migrateEmailFormatOption ( array  $formDefinition)
protected

Migrate email "format" option to "addHtmlPart"

Parameters
array$formDefinition
Returns
‪array
Deprecated:
‪since v10 and will be removed in TYPO3 v11

Definition at line 744 of file FormEditorController.php.

References TYPO3\CMS\Form\Domain\Finishers\EmailFinisher\FORMAT_PLAINTEXT.

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor().

◆ migrateTranslationFileOptions()

array TYPO3\CMS\Form\Controller\FormEditorController::migrateTranslationFileOptions ( array  $formDefinition)
protected

Migrate singular "translationFile" options to plural "translationFiles"

Parameters
array$formDefinition
Returns
‪array
Deprecated:
‪since v10 and will be removed in TYPO3 v11

Definition at line 651 of file FormEditorController.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\getValueByPath(), TYPO3\CMS\Core\Utility\ArrayUtility\removeByPath(), and TYPO3\CMS\Core\Utility\ArrayUtility\setValueByPath().

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor().

◆ registerDocheaderButtons()

◆ renderFormEditorTemplates()

string TYPO3\CMS\Form\Controller\FormEditorController::renderFormEditorTemplates ( array  $formEditorDefinitions)
protected

◆ renderFormPageAction()

string TYPO3\CMS\Form\Controller\FormEditorController::renderFormPageAction ( FormDefinitionArray  $formDefinition,
int  $pageIndex,
string  $prototypeName = null 
)

Render a page from the formDefinition which was build by the form editor. Use the frontend rendering and set the form framework to preview mode.

Parameters
FormDefinitionArray$formDefinition
int$pageIndex
string$prototypeName
Returns
‪string

Definition at line 215 of file FormEditorController.php.

References TYPO3\CMS\Form\Controller\FormEditorController\buildFakeSiteLanguage().

◆ saveFormAction()

TYPO3\CMS\Form\Controller\FormEditorController::saveFormAction ( string  $formPersistenceIdentifier,
FormDefinitionArray  $formDefinition 
)

Save a formDefinition which was build by the form editor.

Parameters
string$formPersistenceIdentifier
FormDefinitionArray$formDefinition

Definition at line 162 of file FormEditorController.php.

References $GLOBALS, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$response, and TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor().

◆ transformFormDefinitionForFormEditor()

◆ transformMultiValuePropertiesForFormEditor()

array TYPO3\CMS\Form\Controller\FormEditorController::transformMultiValuePropertiesForFormEditor ( array  $formDefinition,
string  $identifierProperty,
array  $multiValueProperties 
)
protected

Some data needs a transformation before it can be used by the form editor. This rules for multivalue elements like select elements. To ensure the right sorting if the data goes into javascript, we need to do transformations:

[ '5' => '5', '4' => '4', '3' => '3' ]

This method transform this into:

[ [ _label => '5' _value => 5 ], [ _label => '4' _value => 4 ], [ _label => '3' _value => 3 ], ]

Parameters
array$formDefinition
string$identifierProperty
array$multiValueProperties
Returns
‪array

Definition at line 569 of file FormEditorController.php.

References $output, TYPO3\CMS\Core\Utility\ArrayUtility\getValueByPath(), TYPO3\CMS\Core\Utility\ArrayUtility\isValidPath(), and TYPO3\CMS\Core\Utility\ArrayUtility\setValueByPath().

Referenced by TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor().

Member Data Documentation

◆ $defaultViewObjectName

string TYPO3\CMS\Form\Controller\FormEditorController::$defaultViewObjectName = BackendTemplateView::class
protected

Default View Container

Definition at line 59 of file FormEditorController.php.

◆ $prototypeConfiguration

array TYPO3\CMS\Form\Controller\FormEditorController::$prototypeConfiguration
protected

Definition at line 63 of file FormEditorController.php.