‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline:
TYPO3\CMS\Backend\Form\FormDataProvider\AbstractDatabaseRecordProvider TYPO3\CMS\Backend\Form\FormDataProviderInterface

Public Member Functions

array addData (array $result)
 

Protected Member Functions

bool isInlineField ($fieldConfig)
 
bool isUserAllowedToModify ($fieldConfig)
 
array addInlineFirstPid (array $result)
 
array resolveRelatedRecordsOverlays (array $result, $fieldName)
 
array resolveRelatedRecords (array $result, $fieldName)
 
array addForeignSelectorAndUniquePossibleRecords (array $result, $fieldName)
 
array compileChild (array $result, $parentFieldName, $childUid)
 
array compileChildChild (array $child, array $parentConfig)
 
array getWorkspacedUids (array $connectedUids, $childTableName)
 
array resolveConnectedRecordUids (array $parentConfig, $parentTableName, $parentUid, $parentFieldValue)
 
int getLiveDefaultId ($tableName, $uid)
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Form\FormDataProvider\AbstractDatabaseRecordProvider
array getRecordFromDatabase ($tableName, $uid)
 
array getDatabaseRow (string $tableName, int $uid)
 

Detailed Description

Resolve and prepare inline data.

Definition at line 37 of file TcaInline.php.

Member Function Documentation

◆ addData()

◆ addForeignSelectorAndUniquePossibleRecords()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::addForeignSelectorAndUniquePossibleRecords ( array  $result,
  $fieldName 
)
protected

If there is a foreign_selector or foreign_unique configuration, fetch the list of possible records that can be connected and attach the to the inline configuration.

Parameters
array$result‪Result array
string$fieldName‪Current handle field name
Returns
‪array Modified item array

Definition at line 263 of file TcaInline.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\addData().

◆ addInlineFirstPid()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::addInlineFirstPid ( array  $result)
protected

The "entry" pid for inline records. Nested inline records can potentially hang around on different pid's, but the entry pid is needed for AJAX calls, so that they would know where the action takes place on the page structure.

Parameters
array$result‪Incoming result
Returns
‪array Modified result
Todo:
‪: Find out when and if this is different from 'effectivePid'

Definition at line 96 of file TcaInline.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Backend\Utility\BackendUtility\getLiveVersionIdOfRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\addData().

◆ compileChild()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::compileChild ( array  $result,
  $parentFieldName,
  $childUid 
)
protected

◆ compileChildChild()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::compileChildChild ( array  $child,
array  $parentConfig 
)
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"
Returns
‪array Full data array of child

Definition at line 389 of file TcaInline.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\compileChild().

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::getBackendUser ( )
protected

◆ getLanguageService()

LanguageService TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::getLanguageService ( )
protected
Returns
‪LanguageService

Definition at line 512 of file TcaInline.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\compileChild().

◆ getLiveDefaultId()

int TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::getLiveDefaultId (   $tableName,
  $uid 
)
protected

Gets the record uid of the live default record. If already pointing to the live record, the submitted record uid is returned.

Parameters
string$tableName
int$uid
Returns
‪int
Todo:
‪: the workspace mess still must be resolved somehow

Definition at line 492 of file TcaInline.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getLiveVersionIdOfRecord().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\resolveConnectedRecordUids().

◆ getWorkspacedUids()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::getWorkspacedUids ( array  $connectedUids,
  $childTableName 
)
protected

◆ isInlineField()

bool TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::isInlineField (   $fieldConfig)
protected

Is column of type "inline"

Parameters
array$fieldConfig
Returns
‪bool

Definition at line 72 of file TcaInline.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\addData().

◆ isUserAllowedToModify()

bool TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::isUserAllowedToModify (   $fieldConfig)
protected

Is user allowed to modify child elements

Parameters
array$fieldConfig
Returns
‪bool

Definition at line 83 of file TcaInline.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\check(), and TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getBackendUser().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\addData().

◆ resolveConnectedRecordUids()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::resolveConnectedRecordUids ( array  $parentConfig,
  $parentTableName,
  $parentUid,
  $parentFieldValue 
)
protected

Use RelationHandler to resolve connected uids.

Parameters
array$parentConfig‪TCA config section of parent
string$parentTableName‪Name of parent table
int$parentUid‪Uid of parent record
string$parentFieldValue‪Database value of parent record of this inline field
Returns
‪array Array with connected uids
Todo:
‪: Cover with unit tests

Definition at line 457 of file TcaInline.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getLiveDefaultId(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\resolveRelatedRecords(), and TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\resolveRelatedRecordsOverlays().

◆ resolveRelatedRecords()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::resolveRelatedRecords ( array  $result,
  $fieldName 
)
protected

Substitute the value in databaseRow of this inline field with an array that contains the databaseRows of currently connected records and some meta information.

Parameters
array$result‪Result array
string$fieldName‪Current handle field name
Returns
‪array Modified item array

Definition at line 224 of file TcaInline.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\compileChild(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getWorkspacedUids(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\resolveConnectedRecordUids(), and TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\resolveRelatedRecordsOverlays().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\addData().

◆ resolveRelatedRecordsOverlays()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline::resolveRelatedRecordsOverlays ( array  $result,
  $fieldName 
)
protected

Substitute the value in databaseRow of this inline field with an array that contains the databaseRows of currently connected records and some meta information.

Parameters
array$result‪Result array
string$fieldName‪Current handle field name
Returns
‪array Modified item array

Definition at line 135 of file TcaInline.php.

References $GLOBALS, TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\compileChild(), TYPO3\CMS\Backend\Form\FormDataProvider\AbstractDatabaseRecordProvider\getRecordFromDatabase(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getWorkspacedUids(), and TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\resolveConnectedRecordUids().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\resolveRelatedRecords().