FormFilesAjaxController

readonly class \TYPO3\CMS\Backend\Controller\FormFilesAjaxController

Extends
AbstractFormEngineAjaxController

Handle FormEngine files ajax calls

Attributes

#[AsController]

Table of Contents

Methods

__construct()  : mixed
createAction()  : ResponseInterface
Create a new file reference via AJAX.
detailsAction()  : ResponseInterface
Show the details of a file reference
expandOrCollapseAction()  : ResponseInterface
Store status of file references' expand / collapse state in backend user UC.
synchronizeLocalizeAction()  : ResponseInterface
Adds localizations or synchronizes the locations of all file references.
addJavaScriptModulesToJavaScriptItems()  : void
compileFileReference()  : array
extractSignedParentConfigFromRequest()  : array
Validates the config that is transferred over the wire to provide the correct TCA config for the parent table
getBackendUserAuthentication()  : BackendUserAuthentication
getFileReferenceUids()  : array
Gets an array with the uids of file references out of a list of items.
getInlineFirstPidFromDomObjectId()  : int|string|null
Get inlineFirstPid from a given objectId string
getLabelsFromLocalizationFile()  : array
Parse a language file and get a label/value array from it.
getLanguageService()  : LanguageService|null
getReferenceExpandCollapseStateArray()  : array
Get expand / collapse state of inline items
getRelativePathToStylesheetFile()  : string
Resolve a CSS file position, possibly prefixed with 'EXT:'
jsonResponse()  : ResponseInterface
mergeFileReferenceResultIntoJsonResult()  : array
Merge compiled file reference data into the json result array.
removeFromArray()  : array
Remove an element from an array.

Methods

__construct()

public __construct(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory, FormDataCompiler $formDataCompiler, HashService $hashService, NodeFactory $nodeFactory, InlineStackProcessor $inlineStackProcessor, TcaSchemaFactory $tcaSchemaFactory) : mixed

Parameters

$responseFactory : ResponseFactoryInterface
$streamFactory : StreamFactoryInterface
$formDataCompiler : FormDataCompiler
$hashService : HashService
$nodeFactory : NodeFactory
$inlineStackProcessor : InlineStackProcessor
$tcaSchemaFactory : TcaSchemaFactory

createAction()

Create a new file reference via AJAX.

public createAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

detailsAction()

Show the details of a file reference

public detailsAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

expandOrCollapseAction()

Store status of file references' expand / collapse state in backend user UC.

public expandOrCollapseAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

synchronizeLocalizeAction()

Adds localizations or synchronizes the locations of all file references.

public synchronizeLocalizeAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

compileFileReference()

protected compileFileReference(ServerRequestInterface $request, array $parentData, mixed $parentFieldName, mixed $fileReferenceUid, array $inlineStructure) : array

Parameters

$request : ServerRequestInterface
$parentData : array
$parentFieldName : mixed
$fileReferenceUid : mixed
$inlineStructure : array

Return values

array

extractSignedParentConfigFromRequest()

Validates the config that is transferred over the wire to provide the correct TCA config for the parent table

protected extractSignedParentConfigFromRequest(string $contextString) : array

Parameters

$contextString : string

Return values

array

getFileReferenceUids()

Gets an array with the uids of file references out of a list of items.

protected getFileReferenceUids(string $itemList) : array

Parameters

$itemList : string

Return values

array

getInlineFirstPidFromDomObjectId()

Get inlineFirstPid from a given objectId string

protected getInlineFirstPidFromDomObjectId(string $domObjectId) : int|string|null

Parameters

$domObjectId : string

Return values

int|string|null

getLabelsFromLocalizationFile()

Parse a language file and get a label/value array from it.

protected getLabelsFromLocalizationFile(string $file) : array

Parameters

$file : string

EXT:path/to/file

Return values

array —

Label/value array

getReferenceExpandCollapseStateArray()

Get expand / collapse state of inline items

protected getReferenceExpandCollapseStateArray() : array

Return values

array

getRelativePathToStylesheetFile()

Resolve a CSS file position, possibly prefixed with 'EXT:'

protected getRelativePathToStylesheetFile(string $stylesheetFile) : string

Parameters

$stylesheetFile : string

Given file, possibly prefixed with EXT:

Return values

string —

URL to file

jsonResponse()

protected jsonResponse([array $json = [] ]) : ResponseInterface

Parameters

$json : array = []

Return values

ResponseInterface

mergeFileReferenceResultIntoJsonResult()

Merge compiled file reference data into the json result array.

protected mergeFileReferenceResultIntoJsonResult(array $jsonResult, array $fileReferenceData) : array

Parameters

$jsonResult : array
$fileReferenceData : array

Return values

array

removeFromArray()

Remove an element from an array.

protected removeFromArray(mixed $needle, array $haystack[, bool $strict = false ]) : array

Parameters

$needle : mixed
$haystack : array
$strict : bool = false

Return values

array
On this page