‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Controller\SimpleDataHandlerController Class Reference

Public Member Functions

ResponseInterface mainAction (ServerRequestInterface $request)
 
 processAjaxRequest (ServerRequestInterface $request)
 

Protected Member Functions

 init (ServerRequestInterface $request)
 
 initializeClipboard (ServerRequestInterface $request)
 
 processRequest ()
 
 setPasteCmd (Clipboard $clipboard)
 
 setDeleteCmd (Clipboard $clipboard)
 
 getBackendUser ()
 

Protected Attributes

array $flags
 
array $data
 
array $cmd
 
array $mirror
 
string $cacheCmd
 
string $redirect
 
array $CB
 
TYPO3 CMS Core DataHandling DataHandler $tce
 

Detailed Description

Script Class, creating object of \TYPO3\CMS\Core\DataHandling\DataHandler and sending the posted data to the object.

Used by many smaller forms/links in TYPO3, including the QuickEdit module. Is not used by FormEngine though (main form rendering script) - that uses the same class (DataHandler) but makes its own initialization (to save the redirect request). For all other cases than FormEngine it is recommended to use this script for submitting your editing forms - but the best solution in any case would probably be to link your application to FormEngine, that will give you easy form-rendering as well.

Definition at line 42 of file SimpleDataHandlerController.php.

Member Function Documentation

◆ getBackendUser()

TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::getBackendUser ( )
protected

◆ init()

TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::init ( ServerRequestInterface  $request)
protected

◆ initializeClipboard()

TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::initializeClipboard ( ServerRequestInterface  $request)
protected

◆ mainAction()

ResponseInterface TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::mainAction ( ServerRequestInterface  $request)

Injects the request object for the current request or subrequest As this controller goes only through the processRequest() method, it just redirects to the given URL afterwards.

Parameters
ServerRequestInterface$request‪the current request
Returns
‪ResponseInterface the response with the content

Definition at line 100 of file SimpleDataHandlerController.php.

References TYPO3\CMS\Backend\Controller\SimpleDataHandlerController\init(), TYPO3\CMS\Backend\Controller\SimpleDataHandlerController\initializeClipboard(), and TYPO3\CMS\Backend\Controller\SimpleDataHandlerController\processRequest().

◆ processAjaxRequest()

TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::processAjaxRequest ( ServerRequestInterface  $request)

◆ processRequest()

TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::processRequest ( )
protected

◆ setDeleteCmd()

TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::setDeleteCmd ( Clipboard  $clipboard)
protected

◆ setPasteCmd()

TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::setPasteCmd ( Clipboard  $clipboard)
protected

Applies the proper paste configuration to $this->cmd

The reference ($this->CB['paste']) has following format: [tablename]:[paste-uid]. Tablename is the name of the table from which elements on the current clipboard is pasted with the 'pid' paste-uid. No tablename means that all items on the clipboard (non-files) are pasted. This requires paste-uid to be positive though. so 'tt_content:-3' means 'paste tt_content elements on the clipboard to AFTER tt_content:3 record 'tt_content:30' means 'paste tt_content elements on the clipboard into page with id 30 ':30' means 'paste ALL database elements on the clipboard into page with id 30 ':-30' not valid.

Definition at line 240 of file SimpleDataHandlerController.php.

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Backend\Clipboard\Clipboard\currentMode(), TYPO3\CMS\Backend\Clipboard\Clipboard\elFromTable(), TYPO3\CMS\Backend\Clipboard\Clipboard\endClipboard(), and TYPO3\CMS\Backend\Clipboard\Clipboard\removeElement().

Referenced by TYPO3\CMS\Backend\Controller\SimpleDataHandlerController\initializeClipboard().

Member Data Documentation

◆ $cacheCmd

string TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$cacheCmd
protected

Cache command sent to ->clear_cacheCmd

Definition at line 73 of file SimpleDataHandlerController.php.

◆ $CB

array TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$CB
protected

Clipboard command array. May trigger changes in "cmd"

Definition at line 85 of file SimpleDataHandlerController.php.

◆ $cmd

array TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$cmd
protected

Command array on the form [tablename][uid][command] = value. This array may get additional data set internally based on clipboard commands send in CB var!

Definition at line 61 of file SimpleDataHandlerController.php.

◆ $data

array TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$data
protected

Data array on the form [tablename][uid][fieldname] = value

Definition at line 54 of file SimpleDataHandlerController.php.

◆ $flags

array TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$flags
protected

Array. Accepts options to be set in TCE object. Currently it supports "reverseOrder" (bool).

Definition at line 48 of file SimpleDataHandlerController.php.

◆ $mirror

array TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$mirror
protected

Array passed to ->setMirror.

Definition at line 67 of file SimpleDataHandlerController.php.

◆ $redirect

string TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$redirect
protected

Redirect URL. Script will redirect to this location after performing operations (unless errors has occurred)

Definition at line 79 of file SimpleDataHandlerController.php.

Referenced by TYPO3\CMS\Backend\Controller\SimpleDataHandlerController\processAjaxRequest().

◆ $tce

TYPO3 CMS Core DataHandling DataHandler TYPO3\CMS\Backend\Controller\SimpleDataHandlerController::$tce
protected

TYPO3 Core Engine

Definition at line 91 of file SimpleDataHandlerController.php.