TYPO3  7.6
Protected Member Functions | List of all members
FormInlineAjaxController Class Reference

Protected Member Functions

 compileCombinationChild (array $intermediate, array $parentConfig, array $inlineStructure)
 
 mergeChildResultIntoJsonResult (array $jsonResult, array $childResult)
 
 getInlineRelatedRecordsUidArray ($itemList)
 
 checkInlineFileTypeAccessForField (array $selectorConfiguration, array $fileRecord)
 
 getInlineExpandCollapseStateArrayForTableUid ($table, $uid)
 
 getInlineExpandCollapseStateArray ()
 
 removeFromArray ($needle, $haystack, $strict=null)
 
 getErrorMessageForAJAX ($message)
 
 getInlineFirstPidFromDomObjectId ($domObjectId)
 
 getBackendUserAuthentication ()
 
 getParentConfigFromFlexForm (array $parentConfig, $domObjectId)
 

Detailed Description

Handle FormEngine inline ajax calls

Definition at line 32 of file FormInlineAjaxController.php.

Member Function Documentation

checkInlineFileTypeAccessForField ( array  $selectorConfiguration,
array  $fileRecord 
)
protected

Checks if a record selector may select a certain file type

Parameters
array$selectorConfiguration
array$fileRecord
Returns
bool
Todo:
: check this ...

Definition at line 639 of file FormInlineAjaxController.php.

References GeneralUtility\trimExplode().

compileCombinationChild ( array  $intermediate,
array  $parentConfig,
array  $inlineStructure 
)
protected

With useCombination set, not only content of the intermediate table, but also the connected child should be rendered in one go. Prepare this here.

Parameters
array$intermediateFull data array of "mm" record
array$parentConfigTCA configuration of "parent"
array$inlineStructureCurrent inline structure
Returns
array Full data array of child

Definition at line 548 of file FormInlineAjaxController.php.

getBackendUserAuthentication ( )
protected
Returns
BackendUserAuthentication

Definition at line 742 of file FormInlineAjaxController.php.

References $GLOBALS.

Referenced by FormInlineAjaxController\getInlineExpandCollapseStateArray().

getErrorMessageForAJAX (   $message)
protected

Generates an error message that transferred as JSON for AJAX calls

Parameters
string$messageThe error message to be shown
Returns
array The error message in a JSON array

Definition at line 711 of file FormInlineAjaxController.php.

getInlineExpandCollapseStateArray ( )
protected

Get expand / collapse state of inline items

Returns
array

Definition at line 678 of file FormInlineAjaxController.php.

References FormInlineAjaxController\getBackendUserAuthentication().

Referenced by FormInlineAjaxController\getInlineExpandCollapseStateArrayForTableUid().

getInlineExpandCollapseStateArrayForTableUid (   $table,
  $uid 
)
protected

Return expand / collapse state array for a given table / uid combination

Parameters
string$tableHandled table
int$uidHandled uid
Returns
array

Definition at line 661 of file FormInlineAjaxController.php.

References MathUtility\canBeInterpretedAsInteger(), and FormInlineAjaxController\getInlineExpandCollapseStateArray().

getInlineFirstPidFromDomObjectId (   $domObjectId)
protected

Get inlineFirstPid from a given objectId string

Parameters
string$domObjectIdThe id attribute of an element
Returns
int|NULL Pid or null

Definition at line 727 of file FormInlineAjaxController.php.

getInlineRelatedRecordsUidArray (   $itemList)
protected

Gets an array with the uids of related records out of a list of items. This list could contain more information than required. This methods just extracts the uids.

Parameters
string$itemListThe list of related child records
Returns
array An array with uids

Definition at line 619 of file FormInlineAjaxController.php.

References GeneralUtility\trimExplode().

getParentConfigFromFlexForm ( array  $parentConfig,
  $domObjectId 
)
protected

Extract the inline child table configuration from the flexform data structure using the the domObjectId to traverse the XML structure.

domObjectId parsing has been copied from InlineStackProcessor::initializeByDomObjectId

Parameters
array$parentConfig
string$domObjectId
Returns
array

Definition at line 757 of file FormInlineAjaxController.php.

References GeneralUtility\trimExplode().

mergeChildResultIntoJsonResult ( array  $jsonResult,
array  $childResult 
)
protected

Merge stuff from child array into json array. This method is needed since ajax handling methods currently need to put scriptCalls before and after child code.

Parameters
array$jsonResultGiven json result
array$childResultGiven child result
Returns
array Merged json array

Definition at line 564 of file FormInlineAjaxController.php.

References elseif.

removeFromArray (   $needle,
  $haystack,
  $strict = null 
)
protected

Remove an element from an array.

Parameters
mixed$needleThe element to be removed.
array$haystackThe array the element should be removed from.
mixed$strictSearch elements strictly.
Returns
array The array $haystack without the $needle

Definition at line 696 of file FormInlineAjaxController.php.