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

addData()  : array<string|int, mixed>
Resolve inline fields
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
getDatabaseRow()  : array<string|int, mixed>
Retrieve the requested row from the database
getLanguageService()  : LanguageService
getLiveDefaultId()  : int
Gets the record uid of the live default record. If already pointing to the live record, the submitted record uid is returned.
getRecordFromDatabase()  : array<string|int, mixed>
Fetch a record from database. Deleted records will NOT be fetched.
getWorkspacedUids()  : array<string|int, mixed>
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>
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) : 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

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

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>

getLiveDefaultId()

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

protected getLiveDefaultId(string $tableName, int $uid) : int
Parameters
$tableName : string
$uid : int
Tags
todo:

the workspace mess still must be resolved somehow

Return values
int

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

getWorkspacedUids()

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

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

List of connected uids

$childTableName : string

Name of child table

Return values
array<string|int, mixed>

List of uids in workspace

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

TCA config section of parent

$parentTableName : string

Name of parent table

$parentUid : int

Uid of 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