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

Public Member Functions

 __construct (ModuleTemplateFactory $moduleTemplateFactory, PageRenderer $pageRenderer, IconFactory $iconFactory, DatabaseService $databaseService)
 
ResponseInterface indexAction (int $page=1)
 
 initializeCreateAction ()
 
ResponseInterface createAction (string $formName, string $templatePath, string $prototypeName, string $savePath)
 
 initializeDuplicateAction ()
 
ResponseInterface duplicateAction (string $formName, string $formPersistenceIdentifier, string $savePath)
 
 initializeReferencesAction ()
 
ResponseInterface referencesAction (string $formPersistenceIdentifier)
 
 deleteAction (string $formPersistenceIdentifier)
 
- ‪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
 injectResponseFactory (ResponseFactoryInterface $responseFactory)
 
 injectStreamFactory (StreamFactoryInterface $streamFactory)
 
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectSignalSlotDispatcher (Dispatcher $signalSlotDispatcher)
 
 injectValidatorResolver (ValidatorResolver $validatorResolver)
 
 injectViewResolver (ViewResolverInterface $viewResolver)
 
 injectReflectionService (ReflectionService $reflectionService)
 
 injectHashService (HashService $hashService)
 
 injectMvcPropertyMappingConfigurationService (MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 injectPropertyMapper (PropertyMapper $propertyMapper)
 
 injectInternalFlashMessageService (FlashMessageService $flashMessageService)
 
 injectInternalExtensionService (ExtensionService $extensionService)
 
 initializeControllerArgumentsBaseValidators ()
 
ResponseInterface processRequest (RequestInterface $request)
 
ControllerContext getControllerContext ()
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=AbstractMessage::OK, $storeInSession=true)
 
never forward ($actionName, $controllerName=null, $extensionName=null, array $arguments=null)
 
never throwStatus ($statusCode, $statusMessage=null, $content=null)
 

Protected Member Functions

array getAccessibleFormStorageFolders ()
 
array getFormManagerAppInitialData ()
 
array getAvailableFormDefinitions ()
 
array getProcessedReferencesRows (string $persistenceIdentifier)
 
bool isValidTemplatePath (string $prototypeName, string $templatePath)
 
 initializeModuleTemplate (ServerRequestInterface $request)
 
string convertFormNameToIdentifier (string $formName)
 
array null getRecord (string $table, int $uid)
 
string getRecordTitle (string $table, array $row, bool $prep=false)
 
string getModuleUrl (string $moduleName, array $urlParameters=[])
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Form\Controller\AbstractBackendController
 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 (RequestInterface $request)
 
ViewInterface resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
array getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
ResponseInterface errorAction ()
 
 addErrorFlashMessage ()
 
string bool getErrorFlashMessage ()
 
ResponseInterface null forwardToReferringRequest ()
 
string getFlattenedValidationErrorMessage ()
 
 getFlashMessageQueue (string $identifier=null)
 
ControllerContext buildControllerContext ()
 
never redirect ($actionName, $controllerName=null, $extensionName=null, array $arguments=null, $pageUid=null, $_=null, $statusCode=303)
 
never redirectToUri ($uri, $_=null, $statusCode=303)
 
string addBaseUriIfNecessary ($uri)
 
 mapRequestArgumentsToControllerArguments ()
 
ResponseInterface htmlResponse (string $html=null)
 
ResponseInterface jsonResponse (string $json=null)
 

Protected Attributes

const JS_MODULE_NAMES = ['app', 'viewModel']
 
ModuleTemplateFactory $moduleTemplateFactory
 
PageRenderer $pageRenderer
 
IconFactory $iconFactory
 
DatabaseService $databaseService
 
int $limit = 20
 
- ‪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
ResponseFactoryInterface $responseFactory
 
StreamFactoryInterface $streamFactory
 
TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
HashService $hashService
 
ViewInterface $view
 
string $defaultViewObjectName = TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
Request $request
 
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
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
 
ControllerContext $controllerContext
 
ConfigurationManagerInterface $configurationManager
 

Detailed Description

The form manager controller

Scope: backend

Definition at line 52 of file FormManagerController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ convertFormNameToIdentifier()

string TYPO3\CMS\Form\Controller\FormManagerController::convertFormNameToIdentifier ( string  $formName)
protected

Returns a form identifier which is the lower cased form name.

Parameters
string$formName
Returns
‪string

Definition at line 553 of file FormManagerController.php.

Referenced by TYPO3\CMS\Form\Controller\FormManagerController\createAction(), and TYPO3\CMS\Form\Controller\FormManagerController\duplicateAction().

◆ createAction()

ResponseInterface TYPO3\CMS\Form\Controller\FormManagerController::createAction ( string  $formName,
string  $templatePath,
string  $prototypeName,
string  $savePath 
)

Creates a new Form and redirects to the Form Editor

Parameters
string$formName
string$templatePath
string$prototypeName
string$savePath
Returns
‪ResponseInterface
Exceptions
FormException
PersistenceManagerException

Definition at line 143 of file FormManagerController.php.

References $GLOBALS, TYPO3\CMS\Form\Controller\FormManagerController\convertFormNameToIdentifier(), TYPO3\CMS\Form\Controller\FormManagerController\isValidTemplatePath(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\jsonResponse().

◆ deleteAction()

TYPO3\CMS\Form\Controller\FormManagerController::deleteAction ( string  $formPersistenceIdentifier)

Delete a formDefinition identified by the $formPersistenceIdentifier.

Parameters
string$formPersistenceIdentifier‪persistence identifier to delete
Exceptions
PersistenceManagerException

Definition at line 314 of file FormManagerController.php.

References $GLOBALS, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addFlashMessage(), TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\redirect().

◆ duplicateAction()

ResponseInterface TYPO3\CMS\Form\Controller\FormManagerController::duplicateAction ( string  $formName,
string  $formPersistenceIdentifier,
string  $savePath 
)

Duplicates a given formDefinition and redirects to the Form Editor

Parameters
string$formName
string$formPersistenceIdentifier‪persistence identifier of the form to duplicate
string$savePath
Returns
‪ResponseInterface
Exceptions
PersistenceManagerException

Definition at line 220 of file FormManagerController.php.

References $GLOBALS, TYPO3\CMS\Form\Controller\FormManagerController\convertFormNameToIdentifier(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\jsonResponse().

◆ getAccessibleFormStorageFolders()

array TYPO3\CMS\Form\Controller\FormManagerController::getAccessibleFormStorageFolders ( )
protected

Return a list of all accessible file mountpoints.

Only registered mountpoints from TYPO3.CMS.Form.persistenceManager.allowedFileMounts are listed. This list will be reduced by the configured mountpoints for the current backend user.

Returns
‪array

Definition at line 357 of file FormManagerController.php.

Referenced by TYPO3\CMS\Form\Controller\FormManagerController\getFormManagerAppInitialData().

◆ getAvailableFormDefinitions()

array TYPO3\CMS\Form\Controller\FormManagerController::getAvailableFormDefinitions ( )
protected

List all formDefinitions which can be loaded through t form persistence manager. Enrich this data by a reference counter.

Returns
‪array

Definition at line 411 of file FormManagerController.php.

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

◆ getBackendUser()

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

Returns the current BE user.

Returns
‪BackendUserAuthentication

Definition at line 607 of file FormManagerController.php.

References $GLOBALS.

◆ getFormManagerAppInitialData()

array TYPO3\CMS\Form\Controller\FormManagerController::getFormManagerAppInitialData ( )
protected

Returns the json encoded data which is used by the form editor JavaScript app.

Returns
‪array

Definition at line 385 of file FormManagerController.php.

References TYPO3\CMS\Form\Controller\FormManagerController\getAccessibleFormStorageFolders(), and TYPO3\CMS\Core\Utility\ArrayUtility\reIndexNumericArrayKeysRecursive().

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

◆ getLanguageService()

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

◆ getModuleUrl()

string TYPO3\CMS\Form\Controller\FormManagerController::getModuleUrl ( string  $moduleName,
array  $urlParameters = [] 
)
protected

Wrapper used for unit testing.

Parameters
string$moduleName
array$urlParameters
Returns
‪string

Definition at line 596 of file FormManagerController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$uriBuilder.

Referenced by TYPO3\CMS\Form\Controller\FormManagerController\getProcessedReferencesRows().

◆ getProcessedReferencesRows()

array TYPO3\CMS\Form\Controller\FormManagerController::getProcessedReferencesRows ( string  $persistenceIdentifier)
protected

◆ getRecord()

array null TYPO3\CMS\Form\Controller\FormManagerController::getRecord ( string  $table,
int  $uid 
)
protected

Wrapper used for unit testing.

Parameters
string$table
int$uid
Returns
‪array|null

Definition at line 571 of file FormManagerController.php.

Referenced by TYPO3\CMS\Form\Controller\FormManagerController\getProcessedReferencesRows().

◆ getRecordTitle()

string TYPO3\CMS\Form\Controller\FormManagerController::getRecordTitle ( string  $table,
array  $row,
bool  $prep = false 
)
protected

Wrapper used for unit testing.

Parameters
string$table
array$row
bool$prep
Returns
‪string

Definition at line 584 of file FormManagerController.php.

Referenced by TYPO3\CMS\Form\Controller\FormManagerController\getProcessedReferencesRows().

◆ indexAction()

◆ initializeCreateAction()

TYPO3\CMS\Form\Controller\FormManagerController::initializeCreateAction ( )

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

Definition at line 126 of file FormManagerController.php.

◆ initializeDuplicateAction()

TYPO3\CMS\Form\Controller\FormManagerController::initializeDuplicateAction ( )

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

Definition at line 205 of file FormManagerController.php.

◆ initializeModuleTemplate()

◆ initializeReferencesAction()

TYPO3\CMS\Form\Controller\FormManagerController::initializeReferencesAction ( )

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

Definition at line 276 of file FormManagerController.php.

◆ isValidTemplatePath()

bool TYPO3\CMS\Form\Controller\FormManagerController::isValidTemplatePath ( string  $prototypeName,
string  $templatePath 
)
protected

Check if a given $templatePath for a given $prototypeName is valid and accessible.

Valid template paths has to be configured within TYPO3.CMS.Form.formManager.selectablePrototypesConfiguration.[('identifier': $prototypeName)].newFormTemplates.[('templatePath': $templatePath)]

Parameters
string$prototypeName
string$templatePath
Returns
‪bool

Definition at line 490 of file FormManagerController.php.

Referenced by TYPO3\CMS\Form\Controller\FormManagerController\createAction().

◆ referencesAction()

ResponseInterface TYPO3\CMS\Form\Controller\FormManagerController::referencesAction ( string  $formPersistenceIdentifier)

Show references to this persistence identifier

Parameters
string$formPersistenceIdentifier‪persistence identifier of the form to duplicate
Returns
‪ResponseInterface
Exceptions
PersistenceManagerException

Definition at line 289 of file FormManagerController.php.

References TYPO3\CMS\Form\Controller\FormManagerController\getProcessedReferencesRows(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\jsonResponse().

Member Data Documentation

◆ $databaseService

DatabaseService TYPO3\CMS\Form\Controller\FormManagerController::$databaseService
protected

◆ $iconFactory

IconFactory TYPO3\CMS\Form\Controller\FormManagerController::$iconFactory
protected

◆ $limit

int TYPO3\CMS\Form\Controller\FormManagerController::$limit = 20
protected

Definition at line 61 of file FormManagerController.php.

◆ $moduleTemplateFactory

ModuleTemplateFactory TYPO3\CMS\Form\Controller\FormManagerController::$moduleTemplateFactory
protected

◆ $pageRenderer

PageRenderer TYPO3\CMS\Form\Controller\FormManagerController::$pageRenderer
protected

◆ JS_MODULE_NAMES

const TYPO3\CMS\Form\Controller\FormManagerController::JS_MODULE_NAMES = ['app', 'viewModel']
protected

Definition at line 54 of file FormManagerController.php.