FormInlineAjaxController extends AbstractFormEngineAjaxController
Handle FormEngine inline ajax calls
Table of Contents
Methods
- createAction() : ResponseInterface
 - Create a new inline child via AJAX.
 - detailsAction() : ResponseInterface
 - Show the details of a child record.
 - expandOrCollapseAction() : ResponseInterface
 - Store status of inline children expand / collapse state in backend user uC.
 - synchronizeLocalizeAction() : ResponseInterface
 - Adds localizations or synchronizes the locations of all child records.
 - addRegisteredRequireJsModulesToJavaScriptItems() : void
 - backendUserHasUcInlineView() : bool
 - Method to check whether the backend user has the property inline view for the current IRRE item.
 - compileChild() : array<string|int, mixed>
 - Compile a full child record
 - compileChildChild() : array<string|int, mixed>
 - With useCombination set, not only content of the intermediate table, but also the connected child should be rendered in one go. Prepare this here.
 - createExecutableStringRepresentationOfRegisteredRequireJsModules() : array<string|int, mixed>
 - Gets result array from FormEngine and returns string with js modules that need to be loaded and evaluated by JavaScript.
 - 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
 - getErrorMessageForAJAX() : array<string|int, mixed>
 - Generates an error message that transferred as JSON for AJAX calls
 - getInlineExpandCollapseStateArray() : array<string|int, mixed>
 - Get expand / collapse state of inline items
 - getInlineExpandCollapseStateArrayForTableUid() : array<string|int, mixed>
 - Return expand / collapse state array for a given table / uid combination
 - getInlineFirstPidFromDomObjectId() : int|string|null
 - Get inlineFirstPid from a given objectId string
 - getInlineRelatedRecordsUidArray() : array<string|int, mixed>
 - Gets an array with the uids of related records out of a list of items.
 - getLabelsFromLocalizationFile() : array<string|int, mixed>
 - Parse a language file and get a label/value array from it.
 - getLanguageService() : LanguageService|null
 - getRelativePathToStylesheetFile() : string
 - Resolve a CSS file position, possibly prefixed with 'EXT:'
 - mergeChildResultIntoJsonResult() : array<string|int, mixed>
 - Merge stuff from child array into json array.
 - removeFromArray() : array<string|int, mixed>
 - Remove an element from an array.
 - serializeJavaScriptModuleInstructionItems() : array<string|int, mixed>
 
Methods
createAction()
Create a new inline child via AJAX.
    public
                    createAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfacedetailsAction()
Show the details of a child record.
    public
                    detailsAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfaceexpandOrCollapseAction()
Store status of inline children expand / collapse state in backend user uC.
    public
                    expandOrCollapseAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - 
                    
the incoming request
 
Return values
ResponseInterface —the filled response
synchronizeLocalizeAction()
Adds localizations or synchronizes the locations of all child records.
    public
                    synchronizeLocalizeAction(ServerRequestInterface $request) : ResponseInterface
    Handle AJAX calls to localize all records of a parent, localize a single record or to synchronize with the original language parent.
Parameters
- $request : ServerRequestInterface
 - 
                    
the incoming request
 
Return values
ResponseInterface —the filled response
addRegisteredRequireJsModulesToJavaScriptItems()
    protected
                    addRegisteredRequireJsModulesToJavaScriptItems(array<string|int, mixed> $result, JavaScriptItems $items) : void
    Parameters
- $result : array<string|int, mixed>
 - $items : JavaScriptItems
 
backendUserHasUcInlineView()
Method to check whether the backend user has the property inline view for the current IRRE item.
    protected
                    backendUserHasUcInlineView(BackendUserAuthentication $backendUser) : bool
    In existing or old IRRE items the attribute may not exist, then the json_decode will fail.
Parameters
- $backendUser : BackendUserAuthentication
 
Return values
boolcompileChild()
Compile a full child record
    protected
                    compileChild(array<string|int, mixed> $parentData, string $parentFieldName, int $childUid, array<string|int, mixed> $inlineStructure) : array<string|int, mixed>
    Parameters
- $parentData : array<string|int, mixed>
 - 
                    
Result array of parent
 - $parentFieldName : string
 - 
                    
Name of parent field
 - $childUid : int
 - 
                    
Uid of child to compile
 - $inlineStructure : array<string|int, mixed>
 - 
                    
Current inline structure
 
Tags
Return values
array<string|int, mixed> —Full result array
compileChildChild()
With useCombination set, not only content of the intermediate table, but also the connected child should be rendered in one go. Prepare this here.
    protected
                    compileChildChild(array<string|int, mixed> $child, array<string|int, mixed> $parentConfig, array<string|int, mixed> $inlineStructure) : array<string|int, mixed>
    Parameters
- $child : array<string|int, mixed>
 - 
                    
Full data array of "mm" record
 - $parentConfig : array<string|int, mixed>
 - 
                    
TCA configuration of "parent"
 - $inlineStructure : array<string|int, mixed>
 - 
                    
Current inline structure
 
Return values
array<string|int, mixed> —Full data array of child
createExecutableStringRepresentationOfRegisteredRequireJsModules()
Gets result array from FormEngine and returns string with js modules that need to be loaded and evaluated by JavaScript.
    protected
                    createExecutableStringRepresentationOfRegisteredRequireJsModules(array<string|int, mixed> $result[, bool $skipInstructions = false ]) : array<string|int, mixed>
    Parameters
- $result : array<string|int, mixed>
 - $skipInstructions : bool = false
 - 
                    
whether to skip
JavaScriptModuleInstruction 
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
 
Tags
Return values
array<string|int, mixed>getBackendUserAuthentication()
    protected
                    getBackendUserAuthentication() : BackendUserAuthentication
    Return values
BackendUserAuthenticationgetErrorMessageForAJAX()
Generates an error message that transferred as JSON for AJAX calls
    protected
                    getErrorMessageForAJAX(string $message) : array<string|int, mixed>
    Parameters
- $message : string
 - 
                    
The error message to be shown
 
Tags
Return values
array<string|int, mixed> —The error message in a JSON array
getInlineExpandCollapseStateArray()
Get expand / collapse state of inline items
    protected
                    getInlineExpandCollapseStateArray() : array<string|int, mixed>
    Return values
array<string|int, mixed>getInlineExpandCollapseStateArrayForTableUid()
Return expand / collapse state array for a given table / uid combination
    protected
                    getInlineExpandCollapseStateArrayForTableUid(string $table, int $uid) : array<string|int, mixed>
    Parameters
- $table : string
 - 
                    
Handled table
 - $uid : int
 - 
                    
Handled uid
 
Return values
array<string|int, mixed>getInlineFirstPidFromDomObjectId()
Get inlineFirstPid from a given objectId string
    protected
                    getInlineFirstPidFromDomObjectId(string $domObjectId) : int|string|null
    Parameters
- $domObjectId : string
 - 
                    
The id attribute of an element
 
Return values
int|string|null —Pid or null
getInlineRelatedRecordsUidArray()
Gets an array with the uids of related records out of a list of items.
    protected
                    getInlineRelatedRecordsUidArray(string $itemList) : array<string|int, mixed>
    This list could contain more information than required. This methods just extracts the uids.
Parameters
- $itemList : string
 - 
                    
The list of related child records
 
Return values
array<string|int, mixed> —An array with uids
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
getLanguageService()
    protected
                    getLanguageService() : LanguageService|null
    Return values
LanguageService|nullgetRelativePathToStylesheetFile()
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
mergeChildResultIntoJsonResult()
Merge stuff from child array into json array.
    protected
                    mergeChildResultIntoJsonResult(array<string|int, mixed> $jsonResult, array<string|int, mixed> $childResult) : array<string|int, mixed>
    This method is needed since ajax handling methods currently need to put scriptCalls before and after child code.
Parameters
- $jsonResult : array<string|int, mixed>
 - 
                    
Given json result
 - $childResult : array<string|int, mixed>
 - 
                    
Given child result
 
Return values
array<string|int, mixed> —Merged json array
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
 - 
                    
The element to be removed.
 - $haystack : array<string|int, mixed>
 - 
                    
The array the element should be removed from.
 - $strict : bool = false
 - 
                    
Search elements strictly.
 
Return values
array<string|int, mixed> —The array $haystack without the $needle
serializeJavaScriptModuleInstructionItems()
    protected
                    serializeJavaScriptModuleInstructionItems(JavaScriptModuleInstruction $instruction) : array<string|int, mixed>
    Parameters
- $instruction : JavaScriptModuleInstruction