TYPO3 CMS  TYPO3_8-7
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\AbstractController TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface

Public Member Functions

 injectDatabaseService (\TYPO3\CMS\Form\Service\DatabaseService $databaseService)
 
 indexAction ()
 
 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)
 
- 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)
 
 getControllerContext ()
 
 __construct ()
 
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=\TYPO3\CMS\Core\Messaging\AbstractMessage::OK, $storeInSession=true)
 
 canProcessRequest (\TYPO3\CMS\Extbase\Mvc\RequestInterface $request)
 
 processRequest (\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 
 forward ($actionName, $controllerName=null, $extensionName=null, array $arguments=null)
 
 throwStatus ($statusCode, $statusMessage=null, $content=null)
 

Protected Member Functions

 getAccessibleFormStorageFolders ()
 
 getFormManagerAppInitialData ()
 
 getAvailableFormDefinitions ()
 
 getProcessedReferencesRows (string $persistenceIdentifier)
 
 isValidTemplatePath (string $prototypeName, string $templatePath)
 
 convertFormNameToIdentifier (string $formName)
 
 getRecord (string $table, int $uid)
 
 getRecordTitle (string $table, array $row, bool $prep=false)
 
 getModuleUrl (string $moduleName, array $urlParameters=[])
 
 getBackendUser ()
 
 getLanguageService ()
 
 getPageRenderer ()
 
- Protected Member Functions inherited from TYPO3\CMS\Form\Controller\AbstractBackendController
 resolveResourcePaths (array $resourcePaths)
 
- Protected Member Functions inherited from TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 renderAssetsForRequest ($request)
 
 initializeActionMethodArguments ()
 
 resolveActionMethodName ()
 
 emitBeforeCallActionMethodSignal (array $preparedArguments)
 
 setViewConfiguration (ViewInterface $view)
 
 getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
 resolveViewObjectName ()
 
 initializeView (ViewInterface $view)
 
 initializeAction ()
 
 errorAction ()
 
 clearCacheOnError ()
 
 addErrorFlashMessage ()
 
 getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
 getFlattenedValidationErrorMessage ()
 
- Protected Member Functions inherited from TYPO3\CMS\Extbase\Mvc\Controller\AbstractController
 redirect ($actionName, $controllerName=null, $extensionName=null, array $arguments=null, $pageUid=null, $delay=0, $statusCode=303)
 
 redirectToUri ($uri, $delay=0, $statusCode=303)
 
 addBaseUriIfNecessary ($uri)
 

Protected Attributes

 $databaseService
 
 $defaultViewObjectName = BackendTemplateView::class
 
- Protected Attributes inherited from TYPO3\CMS\Form\Controller\AbstractBackendController
 $formSettings
 
 $formPersistenceManager
 
- Protected Attributes inherited from TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 $reflectionService
 
 $cacheService
 
 $view = null
 
 $namespacesViewObjectNamePattern = '@vendor\@extension\View\@controller\@action@format'
 
 $viewFormatToObjectNameMap = []
 
 $defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class
 
 $actionMethodName = 'indexAction'
 
 $errorMethodName = 'errorAction'
 
 $mvcPropertyMappingConfigurationService
 
 $request
 
 $response
 
- Protected Attributes inherited from TYPO3\CMS\Extbase\Mvc\Controller\AbstractController
 $signalSlotDispatcher
 
 $objectManager
 
 $uriBuilder
 
 $extensionName
 
 $settings
 
 $request
 
 $response
 
 $validatorResolver
 
 $arguments
 
 $supportedRequestTypes = [\TYPO3\CMS\Extbase\Mvc\Request::class]
 
 $controllerContext
 
 $configurationManager
 

Additional Inherited Members

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

Detailed Description

The form manager controller

Scope: backend

Definition at line 41 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.

Parameters
string$formName
Returns
string

Definition at line 512 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 
)

◆ deleteAction()

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

◆ duplicateAction()

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$formPersistenceIdentifierpersistence identifier of the form to duplicate
string$savePath

Definition at line 180 of file FormManagerController.php.

References $GLOBALS, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$response, TYPO3\CMS\Form\Controller\FormManagerController\convertFormNameToIdentifier(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ getAccessibleFormStorageFolders()

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 listet. This is list will be reduced by the configured mountpoints for the current backend user.

Returns
array

Definition at line 305 of file FormManagerController.php.

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

◆ getAvailableFormDefinitions()

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 359 of file FormManagerController.php.

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

◆ getBackendUser()

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

Returns the current BE user.

Returns
BackendUserAuthentication

Definition at line 561 of file FormManagerController.php.

References $GLOBALS.

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

◆ getFormManagerAppInitialData()

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

◆ getLanguageService()

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

Returns the Language Service

Returns
LanguageService

Definition at line 571 of file FormManagerController.php.

References $GLOBALS.

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

◆ getModuleUrl()

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 551 of file FormManagerController.php.

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

◆ getPageRenderer()

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

Returns the page renderer

Returns
PageRenderer

Definition at line 581 of file FormManagerController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

◆ getProcessedReferencesRows()

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

Returns an array with informations about the references for a formDefinition identified by $persistenceIdentifier.

Parameters
string$persistenceIdentifier
Returns
array
Exceptions

Definition at line 391 of file FormManagerController.php.

References TYPO3\CMS\Form\Controller\FormManagerController\getModuleUrl(), TYPO3\CMS\Form\Controller\FormManagerController\getRecord(), TYPO3\CMS\Form\Controller\FormManagerController\getRecordTitle(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

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

◆ getRecord()

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 526 of file FormManagerController.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

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.

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

Definition at line 539 of file FormManagerController.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle().

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 91 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 167 of file FormManagerController.php.

◆ initializeReferencesAction()

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

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

Definition at line 232 of file FormManagerController.php.

◆ injectDatabaseService()

TYPO3\CMS\Form\Controller\FormManagerController::injectDatabaseService ( \TYPO3\CMS\Form\Service\DatabaseService  $databaseService)
Parameters
\TYPO3\CMS\Form\Service\DatabaseService$databaseService

Definition at line 53 of file FormManagerController.php.

References TYPO3\CMS\Form\Controller\FormManagerController\$databaseService.

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

Parameters
string$prototypeName
string$templatePath
Returns
bool

Definition at line 438 of file FormManagerController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\AbstractController\$extensionName, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$request, TYPO3\CMS\Backend\Template\Components\ButtonBar\BUTTON_POSITION_LEFT, TYPO3\CMS\Form\Controller\FormManagerController\getBackendUser(), TYPO3\CMS\Core\Utility\GeneralUtility\getFileAbsFileName(), TYPO3\CMS\Form\Controller\FormManagerController\getLanguageService(), TYPO3\CMS\Form\Controller\FormManagerController\getModuleUrl(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

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

◆ referencesAction()

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

Show references to this persistence identifier

Parameters
string$formPersistenceIdentifierpersistence identifier of the form to duplicate

Definition at line 243 of file FormManagerController.php.

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

Member Data Documentation

◆ $databaseService

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

◆ $defaultViewObjectName

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

Definition at line 63 of file FormManagerController.php.