SimpleDataHandlerController

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.

Table of Contents

Properties

$cacheCmd  : string
Cache command sent to ->clear_cacheCmd
$CB  : array<string|int, mixed>
Clipboard command array. May trigger changes in "cmd"
$cmd  : array<string|int, mixed>
Command array on the form [tablename][uid][command] = value.
$data  : array<string|int, mixed>
Data array on the form [tablename][uid][fieldname] = value
$flags  : array<string|int, mixed>
Array. Accepts options to be set in TCE object. Currently it supports "reverseOrder" (bool).
$mirror  : array<string|int, mixed>
Array passed to ->setMirror.
$redirect  : string
Redirect URL. Script will redirect to this location after performing operations (unless errors has occurred)
$tce  : DataHandler
TYPO3 Core Engine

Methods

mainAction()  : ResponseInterface
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.
processAjaxRequest()  : ResponseInterface
Processes all AJAX calls and returns a JSON formatted string
getBackendUser()  : BackendUserAuthentication
init()  : void
Initialization of the class
initializeClipboard()  : void
Clipboard pasting and deleting.
processRequest()  : void
Executing the posted actions .
setDeleteCmd()  : void
Applies the proper delete configuration to $this->cmd
setPasteCmd()  : void
Applies the proper paste configuration to $this->cmd

Properties

$cacheCmd

Cache command sent to ->clear_cacheCmd

protected string $cacheCmd

$CB

Clipboard command array. May trigger changes in "cmd"

protected array<string|int, mixed> $CB

$cmd

Command array on the form [tablename][uid][command] = value.

protected array<string|int, mixed> $cmd

This array may get additional data set internally based on clipboard commands send in CB var!

$data

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

protected array<string|int, mixed> $data

$flags

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

protected array<string|int, mixed> $flags

$mirror

Array passed to ->setMirror.

protected array<string|int, mixed> $mirror

$redirect

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

protected string $redirect

Methods

mainAction()

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.

public mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface

the current request

Return values
ResponseInterface

the response with the content

processAjaxRequest()

Processes all AJAX calls and returns a JSON formatted string

public processAjaxRequest(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

init()

Initialization of the class

protected init(ServerRequestInterface $request) : void
Parameters
$request : ServerRequestInterface

initializeClipboard()

Clipboard pasting and deleting.

protected initializeClipboard(ServerRequestInterface $request) : void
Parameters
$request : ServerRequestInterface

processRequest()

Executing the posted actions .

protected processRequest() : void

..

setDeleteCmd()

Applies the proper delete configuration to $this->cmd

protected setDeleteCmd(Clipboard $clipboard) : void
Parameters
$clipboard : Clipboard

setPasteCmd()

Applies the proper paste configuration to $this->cmd

protected setPasteCmd(Clipboard $clipboard) : void

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.

Parameters
$clipboard : Clipboard

        
On this page

Search results