TYPO3 CMS  TYPO3_8-7
TYPO3\CMS\Core\DataHandling\Localization\DataMapItem Class Reference

Public Member Functions

 __construct (string $tableName, $id, array $suggestedValues, array $persistedValues, array $configurationFieldNames)
 
 getTableName ()
 
 getFromTableName ()
 
 getForTableName ()
 
 getId ()
 
 getSuggestedValues ()
 
 getPersistedValues ()
 
 getConfigurationFieldNames ()
 
 getLanguageFieldName ()
 
 getParentFieldName ()
 
 getSourceFieldName ()
 
 isNew ()
 
 getType ()
 
 isParentType ()
 
 isDirectChildType ()
 
 isGrandChildType ()
 
 getState ()
 
 getLanguage ()
 
 setLanguage ($language)
 
 getParent ()
 
 setParent ($parent)
 
 getSource ()
 
 setSource ($source)
 
 getIdForScope ($scope)
 
 getDependencies ()
 
 setDependencies (array $dependencies)
 
 findDependencies (string $scope)
 
 getApplicableScopes ()
 

Static Public Member Functions

static build (string $tableName, $id, array $suggestedValues, array $persistedValues, array $configurationFieldNames)
 

Public Attributes

const TYPE_PARENT = 'parent'
 
const TYPE_DIRECT_CHILD = 'directChild'
 
const TYPE_GRAND_CHILD = 'grandChild'
 
const SCOPE_PARENT = State::STATE_PARENT
 
const SCOPE_SOURCE = State::STATE_SOURCE
 
const SCOPE_EXCLUDE = 'exclude'
 

Protected Member Functions

 extractId ($idValue)
 
 buildState ()
 

Protected Attributes

 $tableName
 
 $id
 
 $suggestedValues
 
 $persistedValues
 
 $configurationFieldNames
 
 $new
 
 $type
 
 $state
 
 $language
 
 $parent
 
 $source
 
 $dependencies = []
 

Detailed Description

Entity for data-map item.

Definition at line 24 of file DataMapItem.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::__construct ( string  $tableName,
  $id,
array  $suggestedValues,
array  $persistedValues,
array  $configurationFieldNames 
)

Member Function Documentation

◆ build()

static TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::build ( string  $tableName,
  $id,
array  $suggestedValues,
array  $persistedValues,
array  $configurationFieldNames 
)
static

Builds a data-map item. In addition to the constructor, the values for language, parent and source record pointers are assigned as well.

Parameters
string$tableName
string | int$id
array$suggestedValues
array$persistedValues
array$configurationFieldNames
Returns
object|DataMapItem

Definition at line 105 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$id, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\collectItems(), and TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\fetchDependencies().

◆ buildState()

◆ extractId()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::extractId (   $idValue)
protected

Extracts real id from provided id-value, which can either be a real integer value, a 'NEW...' id, or a combined identifier 'tt_content_13'.

Parameters
int | string$idValue
Returns
int|string

Definition at line 433 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$id, TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$tableName, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Backend\Utility\BackendUtility\splitTable_Uid().

Referenced by TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\setParent(), and TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\setSource().

◆ findDependencies()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::findDependencies ( string  $scope)
Parameters
string$scope
Returns
DataMapItem[]

Definition at line 407 of file DataMapItem.php.

Referenced by TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\populateTranslationItem().

◆ getApplicableScopes()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getApplicableScopes ( )

◆ getConfigurationFieldNames()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getConfigurationFieldNames ( )

◆ getDependencies()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getDependencies ( )

◆ getForTableName()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getForTableName ( )

Gets the table name used to resolve any kind of translations.

Returns
string

Definition at line 182 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$tableName.

◆ getFromTableName()

◆ getId()

◆ getIdForScope()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getIdForScope (   $scope)

◆ getLanguage()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getLanguage ( )

◆ getLanguageFieldName()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getLanguageFieldName ( )
Returns
string

Definition at line 234 of file DataMapItem.php.

◆ getParent()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getParent ( )

◆ getParentFieldName()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getParentFieldName ( )
Returns
string

Definition at line 242 of file DataMapItem.php.

◆ getPersistedValues()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getPersistedValues ( )

Gets the persisted values that represent the persisted state of the record this data-map item is a surrogate for - does only contain relevant field values.

Returns
array

Definition at line 218 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$persistedValues.

◆ getSource()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getSource ( )

◆ getSourceFieldName()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getSourceFieldName ( )
Returns
string|null

Definition at line 250 of file DataMapItem.php.

Referenced by TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\getApplicableScopes().

◆ getState()

◆ getSuggestedValues()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getSuggestedValues ( )

Gets the suggested values that were initially submitted as the whole data-map to the DataHandler.

Returns
array

Definition at line 206 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$suggestedValues.

◆ getTableName()

◆ getType()

◆ isDirectChildType()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::isDirectChildType ( )
Returns
bool

Definition at line 297 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\getType().

◆ isGrandChildType()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::isGrandChildType ( )

◆ isNew()

◆ isParentType()

◆ setDependencies()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::setDependencies ( array  $dependencies)
Parameters
DataMapItem[][]$dependencies

Definition at line 398 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$dependencies.

◆ setLanguage()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::setLanguage (   $language)
Parameters
string | int$language

Definition at line 332 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$language.

◆ setParent()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::setParent (   $parent)

◆ setSource()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::setSource (   $source)

Member Data Documentation

◆ $configurationFieldNames

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$configurationFieldNames
protected

◆ $dependencies

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$dependencies = []
protected

◆ $id

◆ $language

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$language
protected

◆ $new

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$new
protected

◆ $parent

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$parent
protected

◆ $persistedValues

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$persistedValues
protected

◆ $source

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$source
protected

◆ $state

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$state
protected

◆ $suggestedValues

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$suggestedValues
protected

◆ $tableName

◆ $type

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::$type
protected

◆ SCOPE_EXCLUDE

const TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::SCOPE_EXCLUDE = 'exclude'

◆ SCOPE_PARENT

◆ SCOPE_SOURCE

◆ TYPE_DIRECT_CHILD

const TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::TYPE_DIRECT_CHILD = 'directChild'

Definition at line 27 of file DataMapItem.php.

◆ TYPE_GRAND_CHILD

const TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::TYPE_GRAND_CHILD = 'grandChild'

Definition at line 28 of file DataMapItem.php.

◆ TYPE_PARENT

const TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::TYPE_PARENT = 'parent'

Definition at line 26 of file DataMapItem.php.