‪TYPO3CMS  9.5
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\AbstractController 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 (\TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface $formPersistenceManager)
 
 initializeObject ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 injectCacheService (\TYPO3\CMS\Extbase\Service\CacheService $cacheService)
 
 injectMvcPropertyMappingConfigurationService (\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 processRequest (\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\AbstractController
 injectSignalSlotDispatcher (\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher)
 
 injectValidatorResolver (\TYPO3\CMS\Extbase\Validation\ValidatorResolver $validatorResolver)
 
ControllerContext getControllerContext ()
 
 __construct ()
 
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=\TYPO3\CMS\Core\Messaging\AbstractMessage::OK, $storeInSession=true)
 
bool canProcessRequest (\TYPO3\CMS\Extbase\Mvc\RequestInterface $request)
 
 forward ($actionName, $controllerName=null, $extensionName=null, array $arguments=null)
 
 throwStatus ($statusCode, $statusMessage=null, $content=null)
 
 initializeControllerArgumentsBaseValidators ()
 

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 transformMultiValueElementsForFormEditor (array $formDefinition, array $multiValueProperties)
 
array filterEmptyArrays (array $array)
 
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
 renderAssetsForRequest ($request)
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
string resolveActionMethodName ()
 
 callActionMethod ()
 
 emitBeforeCallActionMethodSignal (array $preparedArguments)
 
ViewInterface resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
array getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
mixed resolveViewObjectName ()
 
 initializeView (ViewInterface $view)
 
 initializeAction ()
 
string errorAction ()
 
 clearCacheOnError ()
 
 addErrorFlashMessage ()
 
string getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
string getFlattenedValidationErrorMessage ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\AbstractController
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

BackendTemplateView $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
 
ViewInterface $view
 
string $namespacesViewObjectNamePattern = '@vendor\@extension\View\@controller\@action@format'
 
array $viewFormatToObjectNameMap = array( )
 
string $defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
TYPO3 CMS Extbase Mvc Request $request
 
TYPO3 CMS Extbase Mvc Response $response
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\AbstractController
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
 
string $extensionName
 
array $settings
 
TYPO3 CMS Extbase Mvc RequestInterface $request
 
TYPO3 CMS Extbase Mvc ResponseInterface $response
 
TYPO3 CMS Extbase Validation ValidatorResolver $validatorResolver
 
TYPO3 CMS Extbase Mvc Controller Arguments $arguments
 
array $supportedRequestTypes = array( \TYPO3\CMS\Extbase\Mvc\Request::class )
 
TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
 
ConfigurationManagerInterface $configurationManager
 

Additional Inherited Members

- ‪Static Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
static array getActionMethodParameters ($objectManager)
 

Detailed Description

The form editor controller

Scope: backend

Definition at line 46 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 244 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 589 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 621 of file FormEditorController.php.

References $GLOBALS.

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

◆ getFormDefinitionConversionService()

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

Definition at line 611 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 275 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 631 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 641 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 156 of file FormEditorController.php.

◆ 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 221 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 168 of file FormEditorController.php.

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

◆ transformFormDefinitionForFormEditor()

◆ transformMultiValueElementsForFormEditor()

array TYPO3\CMS\Form\Controller\FormEditorController::transformMultiValueElementsForFormEditor ( array  $formDefinition,
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
array$multiValueProperties
Returns
‪array

Definition at line 547 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

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

Default View Container

Definition at line 53 of file FormEditorController.php.

◆ $prototypeConfiguration

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

Definition at line 57 of file FormEditorController.php.