FormFilesAjaxController
class \
- 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) : mixed
Parameters
- $responseFactory : ResponseFactoryInterface
- $streamFactory : StreamFactoryInterface
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 $modules, JavaScriptItems $items[, bool $deprecated = false ]) : void
Parameters
- $modules : array
- $items : JavaScriptItems
- $deprecated : bool = false
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
arrayextractSignedParentConfigFromRequest()
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
arraygetBackendUserAuthentication()
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
Parameters
- $itemList : string
Return values
arraygetInlineFirstPidFromDomObjectId()
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
Parameters
- $file : string
-
EXT:path/to/file
Return values
array —Label/value array
getLanguageService()
protected
getLanguageService() : LanguageService|null
Return values
LanguageService|nullgetReferenceExpandCollapseStateArray()
Get expand / collapse state of inline items
protected
getReferenceExpandCollapseStateArray() : array
Return values
arraygetRelativePathToStylesheetFile()
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 $json = [] ]) : ResponseInterface
Parameters
- $json : array = []
Return values
ResponseInterfacemergeFileReferenceResultIntoJsonResult()
Merge compiled file reference data into the json result array.
protected
mergeFileReferenceResultIntoJsonResult(array $jsonResult, array $fileReferenceData) : array
Parameters
- $jsonResult : array
- $fileReferenceData : array
Return values
arrayremoveFromArray()
Remove an element from an array.
protected
removeFromArray(mixed $needle, array $haystack[, bool $strict = false ]) : array
Parameters
- $needle : mixed
- $haystack : array
- $strict : bool = false