TcaInline

class \TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline

Extends
AbstractDatabaseRecordProvider
Implements
FormDataProviderInterface

Resolve and prepare inline data.

Table of Contents

Interfaces

FormDataProviderInterface
Interface must be implemented by form data provider classes.

Methods

__construct()  : mixed
addData()  : array
Resolve inline fields
injectConnectionPool()  : void
addForeignSelectorAndUniquePossibleRecords()  : array
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.
addInlineFirstPid()  : array
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.
compileChild()  : array
Compile a full child record
compileChildChild()  : array
With useCombination set, not only content of the intermediate table, but also the connected child should be rendered in one go. Prepare this here.
getBackendUser()  : BackendUserAuthentication
getChildChildTableName()  : string
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.
getDatabaseRow()  : array
Retrieve the requested row from the database
getLanguageService()  : LanguageService
getRecordFromDatabase()  : array
Fetch a record from database. Deleted records will NOT be fetched.
getSubstitutedWorkspacedUids()  : int[]
Substitute given list of uids in child table with workspace uid if needed
isInlineField()  : bool
Is column of type "inline"
isUserAllowedToModify()  : bool
Is user allowed to modify child elements
resolveConnectedRecordUids()  : array
Use RelationHandler to resolve connected uids.
resolveRelatedRecords()  : array
Substitute the value in databaseRow of this inline field with an array that contains the databaseRows of currently connected records and some meta information.
resolveRelatedRecordsOverlays()  : array
Substitute the value in databaseRow of this inline field with an array that contains the databaseRows of currently connected records and some meta information.

Methods

addData()

Resolve inline fields

public addData(array $result) : array

Parameters

$result : array

Initialized result array

Return values

array

addForeignSelectorAndUniquePossibleRecords()

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.

protected addForeignSelectorAndUniquePossibleRecords(array $result, string $fieldName) : array

Parameters

$result : array

Result array

$fieldName : string

Current handle field name

Return values

array —

Modified item array

addInlineFirstPid()

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.

protected addInlineFirstPid(array $result) : array

Parameters

$result : array

Incoming result

Tags

todo:

Find out when and if this is different from 'effectivePid'

Return values

array —

Modified result

compileChild()

Compile a full child record

protected compileChild(array $result, string $parentFieldName, int $childUid[, mixed $isInlineDefaultLanguageRecordInLocalizedParentContext = false ]) : array

Parameters

$result : array

Result array of parent

$parentFieldName : string

Name of parent field

$childUid : int

Uid of child to compile

$isInlineDefaultLanguageRecordInLocalizedParentContext : mixed = false

Return values

array —

Full result array

compileChildChild()

With useCombination set, not only content of the intermediate table, but also the connected child should be rendered in one go. Prepare this here.

protected compileChildChild(array $child, array $parentConfig) : array

Parameters

$child : array

Full data array of "mm" record

$parentConfig : array

TCA configuration of "parent"

Return values

array —

Full data array of child

getChildChildTableName()

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.

protected getChildChildTableName(string $foreignSelector, array $childConfiguration) : string

Parameters

$foreignSelector : string
$childConfiguration : array

Return values

string

getDatabaseRow()

Retrieve the requested row from the database

protected getDatabaseRow(string $tableName, int $uid) : array

Parameters

$tableName : string
$uid : int

Return values

array

getRecordFromDatabase()

Fetch a record from database. Deleted records will NOT be fetched.

protected getRecordFromDatabase(string $tableName, int $uid) : array

Method is similar to BackendUtility::getRecord, but is more picky about input and result.

Parameters

$tableName : string

The table name to fetch record from

$uid : int

Uid of record to fetch

Tags

throws
DatabaseRecordException|InvalidArgumentException|UnexpectedValueException|RuntimeException

Return values

array —

Fetched record row

getSubstitutedWorkspacedUids()

Substitute given list of uids in child table with workspace uid if needed

protected getSubstitutedWorkspacedUids(array $result, array $connectedUids, string $childTableName) : int[]

Parameters

$result : array

Result array

$connectedUids : array

List of connected uids

$childTableName : string

Name of child table

Return values

int[] —

List of substituted uids

isInlineField()

Is column of type "inline"

protected isInlineField(array $fieldConfig) : bool

Parameters

$fieldConfig : array

Return values

bool

isUserAllowedToModify()

Is user allowed to modify child elements

protected isUserAllowedToModify(array $fieldConfig) : bool

Parameters

$fieldConfig : array

Return values

bool

resolveConnectedRecordUids()

Use RelationHandler to resolve connected uids.

protected resolveConnectedRecordUids(array $parentConfig, string $parentTableName, array $parentRecord, string $parentFieldValue) : array

Parameters

$parentConfig : array

TCA config section of parent

$parentTableName : string

Name of parent table

$parentRecord : array

Full parent record

$parentFieldValue : string

Database value of parent record of this inline field

Tags

todo:

Cover with unit tests

Return values

array —

Array with connected uids

resolveRelatedRecords()

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

protected resolveRelatedRecords(array $result, string $fieldName) : array

Parameters

$result : array

Result array

$fieldName : string

Current handle field name

Return values

array —

Modified item array

resolveRelatedRecordsOverlays()

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

protected resolveRelatedRecordsOverlays(array $result, string $fieldName) : array

Parameters

$result : array

Result array

$fieldName : string

Current handle field name

Return values

array —

Modified item array

On this page