‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders:
TYPO3\CMS\Backend\Form\FormDataProviderInterface

Public Member Functions

array addData (array $result)
 

Protected Member Functions

string getPlaceholderValue ($fieldNameArray, $result, $recursionLevel=0)
 
array getRelatedFormData (array $result, $tableName, $uid, $columnToProcess)
 
 getRelatedGroupFieldUids (array $fieldConfig, $value)
 
bool string getAllowedTableForGroupField (array $fieldConfig)
 
array getPossibleUidsByCurrentSysLanguage (array $possibleUids, $foreignTableName, $currentLanguage)
 
 getLanguageService ()
 

Detailed Description

Resolve placeholders for fields of type input or text. The placeholder value in the processedTca section of the result will be replaced with the resolved value.

Definition at line 31 of file TcaInputPlaceholders.php.

Member Function Documentation

◆ addData()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::addData ( array  $result)

Resolve placeholders for input/email/text fields. Placeholders that are simple strings will be returned unmodified. Placeholders beginning with __row are being resolved, possibly traversing multiple tables.

Returns
‪array

Implements TYPO3\CMS\Backend\Form\FormDataProviderInterface.

Definition at line 40 of file TcaInputPlaceholders.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getLanguageService(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getPlaceholderValue(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getAllowedTableForGroupField()

bool string TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::getAllowedTableForGroupField ( array  $fieldConfig)
protected

Will read the "allowed" value from the given field configuration and returns FALSE if none or more than one has been defined. Otherwise the name of the allowed table will be returned.

Parameters
array$fieldConfig‪TCA "config" section for the group type field.
Returns
‪bool|string

Definition at line 219 of file TcaInputPlaceholders.php.

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

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getPlaceholderValue(), and TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getRelatedGroupFieldUids().

◆ getLanguageService()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::getLanguageService ( )
protected

◆ getPlaceholderValue()

string TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::getPlaceholderValue (   $fieldNameArray,
  $result,
  $recursionLevel = 0 
)
protected

◆ getPossibleUidsByCurrentSysLanguage()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::getPossibleUidsByCurrentSysLanguage ( array  $possibleUids,
  $foreignTableName,
  $currentLanguage 
)
protected

E.g. sys_file is not translatable, thus the uid of the translation of it's metadata has to be retrieved here.

Get the uid of e.g. a file metadata entry for a given sys_language_uid and the possible translated data. If there is no translation available, return the uid of default language. If there is no value at all, return the "possible uids".

Parameters
array$possibleUids
string$foreignTableName
int$currentLanguage
Returns
‪array

Definition at line 243 of file TcaInputPlaceholders.php.

References $GLOBALS, and TYPO3\CMS\Core\Database\Connection\PARAM_INT_ARRAY.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getPlaceholderValue().

◆ getRelatedFormData()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::getRelatedFormData ( array  $result,
  $tableName,
  $uid,
  $columnToProcess 
)
protected

Compile a formdata result set based on the tablename and record uid.

Parameters
string$tableName‪Name of the table for which to compile formdata
int$uid‪UID of the record for which to compile the formdata
string$columnToProcess‪The column that is required from the record
Returns
‪array The compiled formdata

Definition at line 169 of file TcaInputPlaceholders.php.

References TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getPlaceholderValue().

◆ getRelatedGroupFieldUids()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::getRelatedGroupFieldUids ( array  $fieldConfig,
  $value 
)
protected

Return uids of related records for group type fields. Uids consisting of multiple parts like [table]_[uid]|[title] will be reduced to integers and validated against the allowed table. Uids without a table prefix are accepted in any case.

Parameters
array$fieldConfig‪TCA "config" section for the group type field.
string$value‪A comma separated list of records

Definition at line 193 of file TcaInputPlaceholders.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getAllowedTableForGroupField().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders\getPlaceholderValue().