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<string|int, mixed>
Resolve inline fields
injectConnectionPool()  : void
addForeignSelectorAndUniquePossibleRecords()  : array<string|int, mixed>
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<string|int, mixed>
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<string|int, mixed>
Compile a full child record
compileChildChild()  : array<string|int, mixed>
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<string|int, mixed>
Retrieve the requested row from the database
getLanguageService()  : LanguageService
getRecordFromDatabase()  : array<string|int, mixed>
Fetch a record from database. Deleted records will NOT be fetched.
getSubstitutedWorkspacedUids()  : array<string|int, 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<string|int, mixed>
Use RelationHandler to resolve connected uids.
resolveRelatedRecords()  : array<string|int, mixed>
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<string|int, mixed>
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<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>

Initialized result array

Return values
array<string|int, mixed>

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<string|int, mixed> $result, string $fieldName) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>

Result array

$fieldName : string

Current handle field name

Return values
array<string|int, mixed>

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<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>

Incoming result

Tags
todo:

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

Return values
array<string|int, mixed>

Modified result

compileChild()

Compile a full child record

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

Result array of parent

$parentFieldName : string

Name of parent field

$childUid : int

Uid of child to compile

$isInlineDefaultLanguageRecordInLocalizedParentContext : mixed = false
Return values
array<string|int, mixed>

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<string|int, mixed> $child, array<string|int, mixed> $parentConfig) : array<string|int, mixed>
Parameters
$child : array<string|int, mixed>

Full data array of "mm" record

$parentConfig : array<string|int, mixed>

TCA configuration of "parent"

Return values
array<string|int, mixed>

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<string|int, mixed> $childConfiguration) : string
Parameters
$foreignSelector : string
$childConfiguration : array<string|int, mixed>
Return values
string

getDatabaseRow()

Retrieve the requested row from the database

protected getDatabaseRow(string $tableName, int $uid) : array<string|int, mixed>
Parameters
$tableName : string
$uid : int
Return values
array<string|int, mixed>

getRecordFromDatabase()

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

protected getRecordFromDatabase(string $tableName, int $uid) : array<string|int, mixed>

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<string|int, mixed>

Fetched record row

getSubstitutedWorkspacedUids()

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

protected getSubstitutedWorkspacedUids(array<string|int, mixed> $connectedUids, string $childTableName) : array<string|int, int>
Parameters
$connectedUids : array<string|int, mixed>

List of connected uids

$childTableName : string

Name of child table

Return values
array<string|int, int>

List of substituted uids

isInlineField()

Is column of type "inline"

protected isInlineField(array<string|int, mixed> $fieldConfig) : bool
Parameters
$fieldConfig : array<string|int, mixed>
Return values
bool

isUserAllowedToModify()

Is user allowed to modify child elements

protected isUserAllowedToModify(array<string|int, mixed> $fieldConfig) : bool
Parameters
$fieldConfig : array<string|int, mixed>
Return values
bool

resolveConnectedRecordUids()

Use RelationHandler to resolve connected uids.

protected resolveConnectedRecordUids(array<string|int, mixed> $parentConfig, string $parentTableName, array<string|int, mixed> $parentRecord, string $parentFieldValue) : array<string|int, mixed>
Parameters
$parentConfig : array<string|int, mixed>

TCA config section of parent

$parentTableName : string

Name of parent table

$parentRecord : array<string|int, mixed>

Full parent record

$parentFieldValue : string

Database value of parent record of this inline field

Tags
todo:

Cover with unit tests

Return values
array<string|int, mixed>

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<string|int, mixed> $result, string $fieldName) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>

Result array

$fieldName : string

Current handle field name

Return values
array<string|int, mixed>

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<string|int, mixed> $result, string $fieldName) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>

Result array

$fieldName : string

Current handle field name

Return values
array<string|int, mixed>

Modified item array


        
On this page

Search results