‪TYPO3CMS  10.4
TYPO3\CMS\Core\DataHandling\Localization\DataMapItem Class Reference

Public Member Functions

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

Static Public Member Functions

static object DataMapItem 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

int string extractId ($idValue)
 
State null buildState ()
 

Protected Attributes

string $tableName
 
string int $id
 
array $suggestedValues
 
array $persistedValues
 
array $configurationFieldNames
 
bool $new
 
string $type
 
State $state
 
string int $language
 
string int $parent
 
string int $source
 
DataMapItem[][] $dependencies = array( )
 

Detailed Description

Entity for data-map item.

Definition at line 25 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 object DataMapItem 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 94 of file DataMapItem.php.

References TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$configurationFieldNames, TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$id, TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$persistedValues, TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$suggestedValues, and TYPO3\CMS\Core\DataHandling\Localization\DataMapItem\$tableName.

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

◆ buildState()

◆ extractId()

int string 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 396 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()

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

Definition at line 370 of file DataMapItem.php.

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

◆ getApplicableScopes()

string [] TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::getApplicableScopes ( )

◆ getConfigurationFieldNames()

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

◆ getDependencies()

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

◆ getId()

◆ getIdForScope()

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

◆ getLanguage()

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

◆ getLanguageFieldName()

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

Definition at line 197 of file DataMapItem.php.

◆ getParent()

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

◆ getParentFieldName()

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

Definition at line 205 of file DataMapItem.php.

◆ getPersistedValues()

array 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 181 of file DataMapItem.php.

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

◆ getSource()

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

◆ getSourceFieldName()

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

Definition at line 213 of file DataMapItem.php.

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

◆ getState()

◆ getSuggestedValues()

array 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 169 of file DataMapItem.php.

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

◆ getTableName()

◆ getType()

◆ isDirectChildType()

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

Definition at line 260 of file DataMapItem.php.

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

◆ isGrandChildType()

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

◆ isNew()

◆ isParentType()

bool TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::isParentType ( )

◆ setDependencies()

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

Definition at line 361 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 295 of file DataMapItem.php.

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

◆ setParent()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::setParent (   $parent)
Parameters
string | int$parent

Definition at line 311 of file DataMapItem.php.

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

◆ setSource()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::setSource (   $source)
Parameters
string | int$source

Definition at line 327 of file DataMapItem.php.

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

Member Data Documentation

◆ $configurationFieldNames

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

◆ $dependencies

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

◆ $id

◆ $language

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

◆ $new

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

◆ $parent

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

◆ $persistedValues

◆ $source

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

◆ $state

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

◆ $suggestedValues

◆ $tableName

◆ $type

string 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 28 of file DataMapItem.php.

◆ TYPE_GRAND_CHILD

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

Definition at line 29 of file DataMapItem.php.

◆ TYPE_PARENT

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

Definition at line 27 of file DataMapItem.php.