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, FormDataCompiler $formDataCompiler, HashService $hashService, NodeFactory $nodeFactory, InlineStackProcessor $inlineStackProcessor) : mixed
    Parameters
- $responseFactory : ResponseFactoryInterface
 - $streamFactory : StreamFactoryInterface
 - $formDataCompiler : FormDataCompiler
 - $hashService : HashService
 - $nodeFactory : NodeFactory
 - $inlineStackProcessor : InlineStackProcessor
 
createAction()
Create a new file reference via AJAX.
    public
                    createAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfacedetailsAction()
Show the details of a file reference
    public
                    detailsAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfaceexpandOrCollapseAction()
Store status of file references' expand / collapse state in backend user UC.
    public
                    expandOrCollapseAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfacesynchronizeLocalizeAction()
Adds localizations or synchronizes the locations of all file references.
    public
                    synchronizeLocalizeAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfaceaddJavaScriptModulesToJavaScriptItems()
    protected
                    addJavaScriptModulesToJavaScriptItems(array<string|int, mixed> $modules, JavaScriptItems $items) : void
    Parameters
- $modules : array<string|int, mixed>
 - $items : JavaScriptItems
 
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>getBackendUserAuthentication()
    protected
                    getBackendUserAuthentication() : BackendUserAuthentication
    Return values
BackendUserAuthenticationgetFileReferenceUids()
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|nullgetLabelsFromLocalizationFile()
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
getLanguageService()
    protected
                    getLanguageService() : LanguageService|null
    Return values
LanguageService|nullgetReferenceExpandCollapseStateArray()
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 —URL to file
jsonResponse()
    protected
                    jsonResponse([array<string|int, mixed> $json = [] ]) : ResponseInterface
    Parameters
- $json : array<string|int, mixed> = []
 
Return values
ResponseInterfacemergeFileReferenceResultIntoJsonResult()
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