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

Public Member Functions

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

Static Public Member Functions

static 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

 extractId (int|string $idValue)
 
 buildState ()
 

Protected Attributes

string $tableName
 
string int $id
 
array $suggestedValues
 
array $persistedValues
 
array $configurationFieldNames
 
bool $new
 
string $type
 
State null $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()

Member Function Documentation

◆ build()

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

◆ buildState()

◆ extractId()

TYPO3\CMS\Core\DataHandling\Localization\DataMapItem::extractId ( int|string  $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'.

Definition at line 352 of file DataMapItem.php.

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

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)

◆ getApplicableScopes()

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

◆ getConfigurationFieldNames()

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 ( string  $scope)

◆ getLanguage()

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

◆ getLanguageFieldName()

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

Definition at line 177 of file DataMapItem.php.

◆ getParent()

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

◆ getParentFieldName()

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

Definition at line 182 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.

Definition at line 167 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 190 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.

Definition at line 157 of file DataMapItem.php.

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

◆ getTableName()

◆ getType()

◆ isDirectChildType()

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

◆ 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 321 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 255 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 271 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 287 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 null 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.