‪TYPO3CMS  ‪main
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 (protected readonly ModuleTemplateFactory $moduleTemplateFactory, protected readonly PageRenderer $pageRenderer, protected readonly IconFactory $iconFactory, protected DatabaseService $databaseService,)
 
- ‪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)
 
 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 ()
 
 processRequest (RequestInterface $request)
 
 addFlashMessage (string $messageBody, string $messageTitle='', ContextualFeedbackSeverity $severity=ContextualFeedbackSeverity::OK, bool $storeInSession=true)
 
 throwStatus (int $statusCode, string $statusMessage='', ?string $content=null)
 

Protected Member Functions

 indexAction (int $page=1, string $searchTerm='')
 
 initializeCreateAction ()
 
 createAction (string $formName, string $templatePath, string $prototypeName, string $savePath)
 
 initializeDuplicateAction ()
 
 duplicateAction (string $formName, string $formPersistenceIdentifier, string $savePath)
 
 initializeReferencesAction ()
 
 referencesAction (string $formPersistenceIdentifier)
 
 deleteAction (string $formPersistenceIdentifier)
 
 getAccessibleFormStorageFolders ()
 
 getFormManagerAppInitialData ()
 
 getAvailableFormDefinitions (string $searchTerm='')
 
 valueContainsSearchTerm (string $value, string $searchTerm)
 
 getProcessedReferencesRows (string $persistenceIdentifier)
 
 isValidTemplatePath (string $prototypeName, string $templatePath)
 
 initializeModuleTemplate (ServerRequestInterface $request, int $page, string $searchTerm)
 
 convertFormNameToIdentifier (string $formName)
 
 getRecord (string $table, int $uid)
 
 getRecordTitle (string $table, array $row, bool $prep=false)
 
 getModuleUrl (string $moduleName, array $urlParameters=[])
 
 getBackendUser ()
 
 getLanguageService ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 initializeAction ()
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
 renderAssetsForRequest (RequestInterface $request)
 
 resolveActionMethodName ()
 
 callActionMethod (RequestInterface $request)
 
 resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
 errorAction ()
 
 addErrorFlashMessage ()
 
 getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
 getFlattenedValidationErrorMessage ()
 
 getFlashMessageQueue (string $identifier=null)
 
 redirect (?string $actionName, ?string $controllerName=null, ?string $extensionName=null, ?array $arguments=null, ?int $pageUid=null, $_=null, int $statusCode=303)
 
 redirectToUri (string|UriInterface $uri, $_=null, int $statusCode=303)
 
 addBaseUriIfNecessary (string $uri)
 
 mapRequestArgumentsToControllerArguments ()
 
 htmlResponse (string $html=null)
 
 jsonResponse (string $json=null)
 

Protected Attributes

const JS_MODULE_NAMES = ['app', 'viewModel']
 
int $limit = 20
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Form\Controller\AbstractBackendController
array $formSettings
 
FormPersistenceManagerInterface $formPersistenceManager
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
ResponseFactoryInterface $responseFactory
 
StreamFactoryInterface $streamFactory
 
ReflectionService $reflectionService
 
HashService $hashService
 
ViewInterface $view
 
string $defaultViewObjectName = TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
RequestInterface $request
 
UriBuilder $uriBuilder
 
array $settings
 
ValidatorResolver $validatorResolver
 
Arguments $arguments
 
ConfigurationManagerInterface $configurationManager
 

Detailed Description

The form manager controller

Scope: backend

Definition at line 52 of file FormManagerController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Form\Controller\FormManagerController::__construct ( protected readonly ModuleTemplateFactory  $moduleTemplateFactory,
protected readonly PageRenderer  $pageRenderer,
protected readonly IconFactory  $iconFactory,
protected DatabaseService  $databaseService 
)

Definition at line 58 of file FormManagerController.php.

Member Function Documentation

◆ convertFormNameToIdentifier()

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

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

Definition at line 528 of file FormManagerController.php.

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

◆ createAction()

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

◆ deleteAction()

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

Delete a formDefinition identified by the $formPersistenceIdentifier.

Exceptions
PersistenceManagerException

Definition at line 282 of file FormManagerController.php.

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

◆ duplicateAction()

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

Duplicates a given formDefinition and redirects to the Form Editor

Exceptions
PersistenceManagerException

Definition at line 195 of file FormManagerController.php.

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

◆ getAccessibleFormStorageFolders()

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

Return a list of all accessible file mountpoints.

Only registered mount points from persistenceManager.allowedFileMounts are listed. This list will be reduced by the configured mount points for the current backend user.

Definition at line 323 of file FormManagerController.php.

References TYPO3\CMS\Webhooks\Message\$identifier.

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

◆ getAvailableFormDefinitions()

TYPO3\CMS\Form\Controller\FormManagerController::getAvailableFormDefinitions ( string  $searchTerm = '')
protected

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

Definition at line 374 of file FormManagerController.php.

References TYPO3\CMS\Form\Controller\FormManagerController\valueContainsSearchTerm().

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

◆ getBackendUser()

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

Definition at line 564 of file FormManagerController.php.

References $GLOBALS.

◆ getFormManagerAppInitialData()

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

◆ getLanguageService()

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

◆ getModuleUrl()

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

◆ getProcessedReferencesRows()

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

◆ getRecord()

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

Wrapper used for unit testing.

Definition at line 542 of file FormManagerController.php.

References TYPO3\CMS\Webhooks\Message\$uid.

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

◆ getRecordTitle()

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

Wrapper used for unit testing.

Definition at line 550 of file FormManagerController.php.

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

◆ indexAction()

◆ initializeCreateAction()

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

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

Definition at line 114 of file FormManagerController.php.

◆ initializeDuplicateAction()

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

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

Definition at line 185 of file FormManagerController.php.

◆ initializeModuleTemplate()

◆ initializeReferencesAction()

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

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

Definition at line 249 of file FormManagerController.php.

◆ isValidTemplatePath()

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 formManager.selectablePrototypesConfiguration.[('identifier': $prototypeName)].newFormTemplates.[('templatePath': $templatePath)]

Definition at line 457 of file FormManagerController.php.

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

◆ referencesAction()

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

Show references to this persistence identifier

Exceptions
PersistenceManagerException

Definition at line 259 of file FormManagerController.php.

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

◆ valueContainsSearchTerm()

TYPO3\CMS\Form\Controller\FormManagerController::valueContainsSearchTerm ( string  $value,
string  $searchTerm 
)
protected

Member Data Documentation

◆ $limit

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

Definition at line 56 of file FormManagerController.php.

◆ JS_MODULE_NAMES

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

Definition at line 54 of file FormManagerController.php.