‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Controller\FormInlineAjaxController Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Controller\FormInlineAjaxController:
TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController

Public Member Functions

ResponseInterface createAction (ServerRequestInterface $request)
 
ResponseInterface detailsAction (ServerRequestInterface $request)
 
ResponseInterface synchronizeLocalizeAction (ServerRequestInterface $request)
 
ResponseInterface expandOrCollapseAction (ServerRequestInterface $request)
 

Protected Member Functions

array compileChild (array $parentData, $parentFieldName, $childUid, array $inlineStructure)
 
array compileChildChild (array $child, array $parentConfig, array $inlineStructure)
 
array mergeChildResultIntoJsonResult (array $jsonResult, array $childResult)
 
array getInlineRelatedRecordsUidArray ($itemList)
 
array getInlineExpandCollapseStateArrayForTableUid ($table, $uid)
 
array getInlineExpandCollapseStateArray ()
 
bool backendUserHasUcInlineView (BackendUserAuthentication $backendUser)
 
array removeFromArray ($needle, $haystack, $strict=false)
 
array getErrorMessageForAJAX ($message)
 
int string null getInlineFirstPidFromDomObjectId ($domObjectId)
 
array extractSignedParentConfigFromRequest (string $contextString)
 
BackendUserAuthentication getBackendUserAuthentication ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController
array createExecutableStringRepresentationOfRegisteredRequireJsModules (array $result)
 
string getRelativePathToStylesheetFile (string $stylesheetFile)
 
array getLabelsFromLocalizationFile ($file)
 
LanguageService null getLanguageService ()
 

Detailed Description

Handle FormEngine inline ajax calls

Definition at line 38 of file FormInlineAjaxController.php.

Member Function Documentation

◆ backendUserHasUcInlineView()

bool 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 json_decode will fail.

Parameters
BackendUserAuthentication$backendUser
Returns
‪bool

Definition at line 645 of file FormInlineAjaxController.php.

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

◆ compileChild()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::compileChild ( array  $parentData,
  $parentFieldName,
  $childUid,
array  $inlineStructure 
)
protected

Compile a full child record

Parameters
array$parentData‪Result array of parent
string$parentFieldName‪Name of parent field
int$childUid‪Uid of child to compile
array$inlineStructure‪Current inline structure
Returns
‪array Full result array
Todo:

: This clones methods compileChild from TcaInline Provider. Find a better abstraction

: to also encapsulate the more complex scenarios with combination child and friends.

Definition at line 446 of file FormInlineAjaxController.php.

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

Referenced by TYPO3\CMS\Backend\Controller\FormInlineAjaxController\detailsAction(), and TYPO3\CMS\Backend\Controller\FormInlineAjaxController\synchronizeLocalizeAction().

◆ compileChildChild()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::compileChildChild ( array  $child,
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$child‪Full data array of "mm" record
array$parentConfig‪TCA configuration of "parent"
array$inlineStructure‪Current inline structure
Returns
‪array Full data array of child

Definition at line 505 of file FormInlineAjaxController.php.

Referenced by TYPO3\CMS\Backend\Controller\FormInlineAjaxController\compileChild(), and TYPO3\CMS\Backend\Controller\FormInlineAjaxController\createAction().

◆ createAction()

◆ detailsAction()

ResponseInterface TYPO3\CMS\Backend\Controller\FormInlineAjaxController::detailsAction ( ServerRequestInterface  $request)

◆ expandOrCollapseAction()

ResponseInterface TYPO3\CMS\Backend\Controller\FormInlineAjaxController::expandOrCollapseAction ( ServerRequestInterface  $request)

◆ extractSignedParentConfigFromRequest()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::extractSignedParentConfigFromRequest ( string  $contextString)
protected

Validates the config that is transferred over the wire to provide the correct TCA config for the parent table

Parameters
string$contextString
Exceptions

Definition at line 709 of file FormInlineAjaxController.php.

Referenced by TYPO3\CMS\Backend\Controller\FormInlineAjaxController\createAction(), TYPO3\CMS\Backend\Controller\FormInlineAjaxController\detailsAction(), and TYPO3\CMS\Backend\Controller\FormInlineAjaxController\synchronizeLocalizeAction().

◆ getBackendUserAuthentication()

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

◆ getErrorMessageForAJAX()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::getErrorMessageForAJAX (   $message)
protected

Generates an error message that transferred as JSON for AJAX calls

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

Definition at line 673 of file FormInlineAjaxController.php.

◆ getInlineExpandCollapseStateArray()

◆ getInlineExpandCollapseStateArrayForTableUid()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::getInlineExpandCollapseStateArrayForTableUid (   $table,
  $uid 
)
protected

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

Parameters
string$table‪Handled table
int$uid‪Handled uid
Returns
‪array

Definition at line 606 of file FormInlineAjaxController.php.

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

◆ getInlineFirstPidFromDomObjectId()

int string null TYPO3\CMS\Backend\Controller\FormInlineAjaxController::getInlineFirstPidFromDomObjectId (   $domObjectId)
protected

Get inlineFirstPid from a given objectId string

Parameters
string$domObjectId‪The id attribute of an element
Returns
‪int|string|null Pid or null

Definition at line 689 of file FormInlineAjaxController.php.

Referenced by TYPO3\CMS\Backend\Controller\FormInlineAjaxController\createAction(), TYPO3\CMS\Backend\Controller\FormInlineAjaxController\detailsAction(), and TYPO3\CMS\Backend\Controller\FormInlineAjaxController\synchronizeLocalizeAction().

◆ getInlineRelatedRecordsUidArray()

array 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$itemList‪The list of related child records
Returns
‪array An array with uids

Definition at line 587 of file FormInlineAjaxController.php.

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

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

◆ mergeChildResultIntoJsonResult()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::mergeChildResultIntoJsonResult ( array  $jsonResult,
array  $childResult 
)
protected

◆ removeFromArray()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::removeFromArray (   $needle,
  $haystack,
  $strict = false 
)
protected

Remove an element from an array.

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

Definition at line 658 of file FormInlineAjaxController.php.

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

◆ synchronizeLocalizeAction()

ResponseInterface TYPO3\CMS\Backend\Controller\FormInlineAjaxController::synchronizeLocalizeAction ( ServerRequestInterface  $request)

Adds localizations or synchronizes the locations of all child records. Handle AJAX calls to localize all records of a parent, localize a single record or to synchronize with the original language parent.

Parameters
ServerRequestInterface$request‪the incoming request
Returns
‪ResponseInterface the filled response

Definition at line 234 of file FormInlineAjaxController.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Backend\Controller\FormInlineAjaxController\compileChild(), TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, TYPO3\CMS\Backend\Controller\FormInlineAjaxController\extractSignedParentConfigFromRequest(), TYPO3\CMS\Backend\Controller\FormInlineAjaxController\getInlineFirstPidFromDomObjectId(), TYPO3\CMS\Backend\Controller\FormInlineAjaxController\getInlineRelatedRecordsUidArray(), and TYPO3\CMS\Backend\Controller\FormInlineAjaxController\mergeChildResultIntoJsonResult().