‪TYPO3CMS  9.5
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 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)
 

Detailed Description

Handle FormEngine inline ajax calls

Definition at line 36 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 unserialize will fail.

Parameters
BackendUserAuthentication$backendUser
Returns
‪bool

Definition at line 680 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 475 of file FormInlineAjaxController.php.

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

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

◆ 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 534 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)

Store status of inline children expand / collapse state in backend user uC.

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

Definition at line 420 of file FormInlineAjaxController.php.

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

◆ 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 744 of file FormInlineAjaxController.php.

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

◆ 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 708 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 641 of file FormInlineAjaxController.php.

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

◆ getInlineFirstPidFromDomObjectId()

int 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|null Pid or null

Definition at line 724 of file FormInlineAjaxController.php.

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

◆ 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 622 of file FormInlineAjaxController.php.

◆ mergeChildResultIntoJsonResult()

array 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$jsonResult‪Given json result
array$childResult‪Given child result
Returns
‪array Merged json array

Definition at line 569 of file FormInlineAjaxController.php.

References TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController\createExecutableStringRepresentationOfRegisteredRequireJsModules(), TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController\getLabelsFromLocalizationFile(), TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController\getRelativePathToStylesheetFile(), and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

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

◆ 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 693 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 263 of file FormInlineAjaxController.php.