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<string|int, mixed>
extractSignedParentConfigFromRequest()  : array<string|int, mixed>
Validates the config that is transferred over the wire to provide the correct TCA config for the parent table
getBackendUserAuthentication()  : BackendUserAuthentication
getFileReferenceUids()  : array<string|int, mixed>
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<string|int, mixed>
Parse a language file and get a label/value array from it.
getLanguageService()  : LanguageService|null
getReferenceExpandCollapseStateArray()  : array<string|int, mixed>
Get expand / collapse state of inline items
getRelativePathToStylesheetFile()  : string
Resolve a CSS file position, possibly prefixed with 'EXT:'
jsonResponse()  : ResponseInterface
mergeFileReferenceResultIntoJsonResult()  : array<string|int, mixed>
Merge compiled file reference data into the json result array.
removeFromArray()  : array<string|int, mixed>
Remove an element from an array.

Methods

__construct()

public __construct(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory) : mixed
Parameters
$responseFactory : ResponseFactoryInterface
$streamFactory : StreamFactoryInterface

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

addJavaScriptModulesToJavaScriptItems()

protected addJavaScriptModulesToJavaScriptItems(array<string|int, mixed> $modules, JavaScriptItems $items[, bool $deprecated = false ]) : void
Parameters
$modules : array<string|int, mixed>
$items : JavaScriptItems
$deprecated : bool = false

compileFileReference()

protected compileFileReference(ServerRequestInterface $request, array<string|int, mixed> $parentData, mixed $parentFieldName, mixed $fileReferenceUid, array<string|int, mixed> $inlineStructure) : array<string|int, mixed>
Parameters
$request : ServerRequestInterface
$parentData : array<string|int, mixed>
$parentFieldName : mixed
$fileReferenceUid : mixed
$inlineStructure : array<string|int, mixed>
Return values
array<string|int, mixed>

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<string|int, mixed>
Parameters
$contextString : string
Return values
array<string|int, mixed>

getFileReferenceUids()

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

protected getFileReferenceUids(string $itemList) : array<string|int, mixed>
Parameters
$itemList : string
Return values
array<string|int, mixed>

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<string|int, mixed>
Parameters
$file : string

EXT:path/to/file

Return values
array<string|int, mixed>

Label/value array

getReferenceExpandCollapseStateArray()

Get expand / collapse state of inline items

protected getReferenceExpandCollapseStateArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

Web root relative position to file

jsonResponse()

protected jsonResponse([array<string|int, mixed> $json = [] ]) : ResponseInterface
Parameters
$json : array<string|int, mixed> = []
Return values
ResponseInterface

mergeFileReferenceResultIntoJsonResult()

Merge compiled file reference data into the json result array.

protected mergeFileReferenceResultIntoJsonResult(array<string|int, mixed> $jsonResult, array<string|int, mixed> $fileReferenceData) : array<string|int, mixed>
Parameters
$jsonResult : array<string|int, mixed>
$fileReferenceData : array<string|int, mixed>
Return values
array<string|int, mixed>

removeFromArray()

Remove an element from an array.

protected removeFromArray(mixed $needle, array<string|int, mixed> $haystack[, bool $strict = false ]) : array<string|int, mixed>
Parameters
$needle : mixed
$haystack : array<string|int, mixed>
$strict : bool = false
Return values
array<string|int, mixed>

        
On this page

Search results