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

Public Member Functions

 __construct (private readonly FormDataCompiler $formDataCompiler, private readonly HashService $hashService,)
 
 createAction (ServerRequestInterface $request)
 
 detailsAction (ServerRequestInterface $request)
 
ResponseInterface synchronizeLocalizeAction (ServerRequestInterface $request)
 
ResponseInterface expandOrCollapseAction (ServerRequestInterface $request)
 

Protected Member Functions

array compileChild (ServerRequestInterface $request, array $parentData, $parentFieldName, $childUid, array $inlineStructure)
 
array compileChildChild (ServerRequestInterface $request, array $child, array $parentConfig, array $inlineStructure)
 
array mergeChildResultIntoJsonResult (array $jsonResult, array $childResult)
 
array getInlineRelatedRecordsUidArray ($itemList)
 
array getInlineExpandCollapseStateArray ()
 
bool backendUserHasUcInlineView (BackendUserAuthentication $backendUser)
 
array removeFromArray ($needle, $haystack, $strict=false)
 
int string null getInlineFirstPidFromDomObjectId (string $domObjectId)
 
 extractSignedParentConfigFromRequest (string $contextString)
 
 getChildChildTableName (string $foreignSelector, array $childConfiguration)
 
 getBackendUserAuthentication ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController
 addJavaScriptModulesToJavaScriptItems (array $modules, JavaScriptItems $items)
 
string getRelativePathToStylesheetFile (string $stylesheetFile)
 
array getLabelsFromLocalizationFile (string $file)
 
 getLanguageService ()
 

Detailed Description

Handle FormEngine inline ajax calls

Definition at line 42 of file FormInlineAjaxController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::__construct ( private readonly FormDataCompiler  $formDataCompiler,
private readonly HashService  $hashService 
)

Definition at line 44 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.

Returns
‪bool

Definition at line 597 of file FormInlineAjaxController.php.

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

◆ compileChild()

array TYPO3\CMS\Backend\Controller\FormInlineAjaxController::compileChild ( ServerRequestInterface  $request,
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 438 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 ( ServerRequestInterface  $request,
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 493 of file FormInlineAjaxController.php.

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

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

◆ createAction()

◆ detailsAction()

◆ expandOrCollapseAction()

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

◆ extractSignedParentConfigFromRequest()

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

Exceptions

Definition at line 643 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()

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

◆ getChildChildTableName()

TYPO3\CMS\Backend\Controller\FormInlineAjaxController::getChildChildTableName ( string  $foreignSelector,
array  $childConfiguration 
)
protected

The child-child table name is set in the child TCA "the selector field" and is depending on the TCA type (select or group) either the "foreign_table" or the (first) "allowed" table.

Definition at line 662 of file FormInlineAjaxController.php.

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

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

◆ getInlineExpandCollapseStateArray()

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

◆ getInlineFirstPidFromDomObjectId()

int string null TYPO3\CMS\Backend\Controller\FormInlineAjaxController::getInlineFirstPidFromDomObjectId ( string  $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 625 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 559 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 610 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 231 of file FormInlineAjaxController.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Backend\Controller\FormInlineAjaxController\compileChild(), 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().