TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Controller\FormInlineAjaxController Class Reference

Protected Member Functions

 mergeChildResultIntoJsonResult (array $jsonResult, array $childResult)
 
 getInlineRelatedRecordsUidArray ($itemList)
 
 checkInlineFileTypeAccessForField (array $selectorConfiguration, array $fileRecord)
 
 getInlineExpandCollapseStateArrayForTableUid ($table, $uid)
 
 getInlineExpandCollapseStateArray ()
 
 backendUserHasUcInlineView (BackendUserAuthentication $backendUser)
 
 removeFromArray ($needle, $haystack, $strict=null)
 
 getErrorMessageForAJAX ($message)
 
 getInlineFirstPidFromDomObjectId ($domObjectId)
 
 getBackendUserAuthentication ()
 
 getParentConfigFromFlexForm (array $parentConfig, $domObjectId)
 
 addFlexFormDataStructurePointersFromAjaxContext (array $ajaxArguments, array $databaseRow)
 
 splitDomObjectId ($domObjectId)
 

Detailed Description

Handle FormEngine inline ajax calls

Definition at line 35 of file FormInlineAjaxController.php.

Member Function Documentation

◆ addFlexFormDataStructurePointersFromAjaxContext()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::addFlexFormDataStructurePointersFromAjaxContext ( array  $ajaxArguments,
array  $databaseRow 
)
protected

Flexforms require additional database columns to be processed to determine the correct data structure to be used from a flexform. The required columns and their values are transmitted in the AJAX context of the request and need to be added to the fake database row for the inline parent.

Parameters
array$ajaxArgumentsThe AJAX request arguments
array$databaseRowThe fake database row
Returns
array The database row with the flexform data structure pointer columns added

Definition at line 927 of file FormInlineAjaxController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\hmac().

◆ backendUserHasUcInlineView()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::backendUserHasUcInlineView ( BackendUserAuthentication  $backendUser)
protected

Method to check whether the backend user has the property inline view for the current IRRE item. In existing or old IRRE items the attribute may not exist, then the unserialize will fail.

Parameters
BackendUserAuthentication$backendUser
Returns
bool

Definition at line 809 of file FormInlineAjaxController.php.

Referenced by TYPO3\CMS\Backend\Controller\FormInlineAjaxController\getInlineExpandCollapseStateArray().

◆ checkInlineFileTypeAccessForField()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 748 of file FormInlineAjaxController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getBackendUserAuthentication()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::getBackendUserAuthentication ( )
protected
Returns
BackendUserAuthentication

Definition at line 868 of file FormInlineAjaxController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Controller\FormInlineAjaxController\getInlineExpandCollapseStateArray().

◆ getErrorMessageForAJAX()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 837 of file FormInlineAjaxController.php.

◆ getInlineExpandCollapseStateArray()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::getInlineExpandCollapseStateArray ( )
protected

◆ getInlineExpandCollapseStateArrayForTableUid()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 770 of file FormInlineAjaxController.php.

References $uid, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Backend\Controller\FormInlineAjaxController\getInlineExpandCollapseStateArray().

◆ getInlineFirstPidFromDomObjectId()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 853 of file FormInlineAjaxController.php.

◆ getInlineRelatedRecordsUidArray()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 728 of file FormInlineAjaxController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getParentConfigFromFlexForm()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 883 of file FormInlineAjaxController.php.

References TYPO3\CMS\Backend\Controller\FormInlineAjaxController\splitDomObjectId().

◆ mergeChildResultIntoJsonResult()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 615 of file FormInlineAjaxController.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

◆ removeFromArray()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::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 822 of file FormInlineAjaxController.php.

◆ splitDomObjectId()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::splitDomObjectId (   $domObjectId)
protected

split the domObjectID and retrieve the needed parts

Parameters
string$domObjectId
Returns
array

Definition at line 954 of file FormInlineAjaxController.php.

Referenced by TYPO3\CMS\Backend\Controller\FormInlineAjaxController\getParentConfigFromFlexForm().