‪TYPO3CMS  ‪main
TYPO3\CMS\Core\DataHandling\DataHandler Class Reference
Inheritance diagram for TYPO3\CMS\Core\DataHandling\DataHandler:

Public Member Functions

 __construct (ReferenceIndexUpdater $referenceIndexUpdater=null)
 
 setControl (array $control)
 
 start (array $dataMap, array $commandMap, ?BackendUserAuthentication $backendUser=null)
 
 setMirror ($mirror)
 
 setDefaultsFromUserTS ($userTS)
 
 hook_processDatamap_afterDatabaseOperations (&$hookObjectsArr, &$status, &$table, &$id, &$fieldArray)
 
bool void process_datamap ()
 
array fillInFieldArray ($table, $id, array $fieldArray, array $incomingFieldArray, $realPid, $status, $tscPID)
 
array checkValue ($table, $field, $value, $id, $status, $realPid, $tscPID, $incomingFieldArray=[])
 
array checkValue_SW ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $tscPID, array $additionalData=null)
 
string checkValue_flexArray2Xml ($array)
 
 checkValue_inline ($res, $value, $tcaFieldConf, $PP, $field, array $additionalData=null)
 
array false checkValueForInline ($res, $value, $tcaFieldConf, $table, $id, $status, $field, array $additionalData=null)
 
 checkValueForFile (array $res, string $value, array $tcaFieldConf, string $table, int|string $id, string $field, ?array $additionalData=null)
 
array checkValue_checkMax ($tcaFieldConf, $valueArray)
 
string getUnique ($table, $field, $value, $id, $newPid=0)
 
 getRecordsWithSameValue ($tableName, $uid, $fieldName, $value, $pageId=0)
 
array checkValue_text_Eval ($value, $evalArray, $is_in)
 
array checkValue_input_Eval ($value, $evalArray, $is_in, string $table='', $id='')
 
array checkValue_category_processDBdata (array $valueArray, array $tcaFieldConf, $id, string $status, string $table, string $field)
 
array checkValue_group_select_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $type, $currentTable, $currentField)
 
array checkValue_group_select_explodeSelectGroupValue ($value)
 
array checkValue_flex_procInData ($dataPart, $dataPart_current, $dataStructure, $pParams, $callBackFunc='', array $workspaceOptions=[])
 
 checkValue_flex_procInData_travDS (&$dataValues, $dataValues_current, $DSelements, $pParams, $callBackFunc, $structurePath, array $workspaceOptions=[])
 
void bool process_cmdmap ()
 
int null copyRecord ($table, $uid, $destPid, $first=false, $overrideValues=[], $excludeFields='', $language=0, $ignoreLocalization=false)
 
 copyPages ($uid, $destPid)
 
int null copySpecificPage ($uid, $destPid, $copyTablesArray, $first=false)
 
int null copyRecord_raw ($table, $uid, $pid, $overrideArray=[], array $workspaceOptions=[])
 
int null insertNewCopyVersion ($table, $fieldArray, $realPid)
 
array string null copyRecord_procBasedOnFieldType ($table, $uid, $field, $value, $row, $conf, $realDestPid, $language=0, array $workspaceOptions=[])
 
array copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $_1, $_2, $workspaceOptions)
 
 copyL10nOverlayRecords ($table, $uid, $destPid, $first=false, $overrideValues=[], $excludeFields='')
 
 moveRecord ($table, $uid, $destPid)
 
 moveRecord_raw ($table, $uid, $destPid)
 
 moveRecord_procFields ($table, $uid, $destPid)
 
 moveRecord_procBasedOnFieldType ($table, $uid, $destPid, $value, $conf)
 
 moveL10nOverlayRecords ($table, $uid, $destPid, $originalRecordDestinationPid)
 
int bool localize ($table, $uid, $language)
 
 deleteAction ($table, $id)
 
 deleteEl (string $table, int $uid, bool $noRecordCheck=false, bool $forceHardDelete=false, bool $deleteRecordsOnPage=true)
 
 deleteRecord (string $table, int $uid, bool $noRecordCheck=false, bool $forceHardDelete=false)
 
 deletePages (int $uid, bool $force=false, bool $forceHardDelete=false, bool $deleteRecordsOnPage=true)
 
int[] string canDeletePage ($uid)
 
string cannotDeleteRecord ($table, $id)
 
 deleteRecord_procFields ($table, $uid)
 
 deleteRecord_procBasedOnFieldType ($table, $uid, $value, $conf)
 
 deleteL10nOverlayRecords ($table, $uid)
 
 discard (string $table, ?int $uid, array $record=null)
 
int null versionizeRecord ($table, $id, $label, $delete=false)
 
 versionPublishManyToManyRelations (string $table, array $liveRecord, array $workspaceRecord, int $fromWorkspace)
 
 remapListedDBRecords ()
 
array remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue)
 
array null remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid, $table)
 
 remapListedDBRecords_procInline ($conf, $value, $uid, $table)
 
 remapListedDBRecords_procFile ($conf, $value, $uid, $table)
 
 processRemapStack ()
 
 addRemapAction ($table, $id, callable $callback, array $arguments)
 
 getVersionizedIncomingFieldArray ($table, $id, &$incomingFieldArray, &$registerDBList)
 
bool checkModifyAccessList ($table)
 
bool isRecordInWebMount ($table, $id)
 
bool isInWebMount ($pid)
 
bool checkRecordUpdateAccess ($table, $id)
 
bool checkRecordInsertAccess ($insertTable, $pid, $action=SystemLogDatabaseAction::INSERT)
 
bool doesRecordExist ($table, $id, int $perms)
 
bool tableReadOnly ($table)
 
bool tableAdminOnly ($table)
 
bool destNotInsideSelf ($destinationId, $id)
 
array getExcludeListArray ()
 
array doesPageHaveUnallowedTables ($page_uid, int $doktype)
 
array null recordInfo ($table, $id)
 
array getRecordProperties ($table, $id, $noWSOL=false)
 
array null getRecordPropertiesFromRow ($table, $row)
 
int eventPid ($table, $uid, $pid)
 
 updateDB ($table, $id, $fieldArray)
 
int null insertDB ($table, $id, $fieldArray, $newVersion=false, $suggestedUid=0, $dontSetNewIdIndex=false)
 
 setHistory ($table, $id)
 
 updateRefIndex ($table, $uid, int $workspace=null)
 
 registerReferenceIndexRowsForDrop (string $table, int $uid, int $workspace)
 
 registerReferenceIndexUpdateForReferencesToItem (string $table, int $uid, int $workspace, int $targetWorkspace=null)
 
int array bool null getSortNumber ($table, $uid, $pid)
 
array newFieldArray ($table)
 
array compareFieldArrayWithCurrentAndUnset ($table, $id, $fieldArray)
 
 disableDeleteClause ()
 
string deleteClause ($table)
 
array getTableEntries ($table, $TSconfig)
 
int false getPID ($table, $uid)
 
 dbAnalysisStoreExec ()
 
array int_pageTreeInfo ($CPtable, $pid, $counter, $rootID)
 
 fixUniqueInPid ($table, $uid)
 
bool isReferenceField ($conf)
 
string bool getRelationFieldType ($conf)
 
string getCopyHeader ($table, $pid, $field, $value, $count, $prevTitle='')
 
int resolvePid ($table, $pid)
 
string clearPrefixFromValue ($table, $value)
 
bool isRecordCopied ($table, $uid)
 
 registerRecordIdForPageCacheClearing ($table, $uid, $pid=null)
 
 clear_cacheCmd ($cacheCmd)
 
int log ($table, $recuid, $action, $recpid, $error, $details, $details_nr=-1, $data=[], $event_pid=-1, $NEWid='')
 
non empty string[] printLogErrorMessages ()
 
array insertUpdateDB_preprocessBasedOnFieldType ($table, $fieldArray)
 
bool hasDeletedRecord ($tableName, $uid)
 
 getAutoVersionId ($table, $id)
 
string workspaceCannotEditOfflineVersion (string $table, array $record)
 
string false workspaceCannotEditRecord ($table, $recData)
 
 isOuterMostInstance ()
 
 setCorrelationId (CorrelationId $correlationId)
 
 getCorrelationId ()
 
 getHistoryRecords ()
 

Public Attributes

bool $storeLogMessages = true
 
bool $enableLogging = true
 
bool $reverseOrder = false
 
 $checkStoredRecords = true
 
 $checkStoredRecords_loose = true
 
bool $neverHideAtCopy = false
 
bool $isImporting = false
 
bool $dontProcessTransformations = false
 
bool $bypassWorkspaceRestrictions = false
 
bool $bypassAccessCheckForRecords = false
 
string $copyWhichTables = '*'
 
int $copyTree = 0
 
array $defaultValues = []
 
array $suggestedInsertUids = []
 
object $callBackObj = null
 
array $autoVersionIdMap = []
 
array $substNEWwithIDs = []
 
array $substNEWwithIDs_table = []
 
array $newRelatedIDs = []
 
array $copyMappingArray_merged = []
 
array $errorLog = []
 
array $pagetreeRefreshFieldsFromPages = ['pid', 'sorting', 'deleted', 'hidden', 'title', 'doktype', 'is_siteroot', 'fe_group', 'nav_hide', 'nav_title', 'module', 'starttime', 'endtime', 'content_from_pid', 'extendToSubpages']
 
bool $pagetreeNeedsRefresh = false
 
BackendUserAuthentication $BE_USER
 
int $userid
 
bool $admin
 
array $datamap = []
 
array $cmdmap = []
 
int $sortIntervals = 256
 
array $dbAnalysisStore = []
 
array $registerDBList = []
 
array $registerDBPids = []
 
array $copyMappingArray = []
 
array $remapStack = []
 
array $remapStackRecords = []
 
array $checkValue_currentRecord = array( )
 

Protected Member Functions

 applyDefaultsForFieldArray (string $table, int $pageId, array $prepopulatedFieldArray)
 
array getCheckModifyAccessListHookObjects ()
 
 initializeSlugFieldsToEmptyString (string $tableName, array $fieldValues)
 
array resolveSortingAndPidForNewRecord (string $table, int $pid, array $fieldArray)
 
 resolveFieldConfigurationAndRespectColumnsOverrides (string $table, string $field)
 
array checkValueForInternalReferences (array $res, $value, $tcaFieldConf, $table, $id, $field)
 
array checkValueForText ($value, $tcaFieldConf, $table, $realPid, $field)
 
array checkValueForInput ($value, $tcaFieldConf, $table, $id, $realPid, $field)
 
 checkValueForNumber (mixed $value, array $tcaFieldConf)
 
array checkValueForColor (string $value, array $tcaFieldConf)
 
array checkValueForEmail (string $value, array $tcaFieldConf, string $table, int|string $id, int $realPid, string $field)
 
array checkValueForPassword (string $value, array $tcaFieldConf, string $table, int|string $id, int $realPid, array $incomingFieldArray=[])
 
array checkValueForSlug (string $value, array $tcaFieldConf, string $table, $id, int $realPid, string $field, array $incomingFieldArray=[])
 
array checkValueForLanguage (int $value, string $table, string $field)
 
array checkValueForLink (string $value, array $tcaFieldConf, string $table, int|string $id, string $field)
 
 checkValueForCategory (array $result, string $value, array $tcaFieldConf, string $table, $id, string $status, string $field)
 
 checkValueForDatetime (mixed $value, array $tcaFieldConf)
 
array checkValueForCheck ($res, $value, $tcaFieldConf, $table, $id, $realPid, $field)
 
array checkValueForRadio ($res, $value, $tcaFieldConf, $table, $id, $pid, $field)
 
array checkValueForJson (array|string $value, array $tcaFieldConf)
 
array checkValueForGroupFolderSelect ($res, $value, $tcaFieldConf, $table, $id, $status, $field)
 
array checkValueForUuid (string $value, array $tcaFieldConf)
 
array mixed applyFiltersToValues (array $tcaFieldConfiguration, array $values)
 
array checkValueForFlex ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $tscPID, $field)
 
QueryBuilder getUniqueCountStatement (string $value, string $table, string $field, int $uid, int $pid)
 
bool validateValueForRequired (array $tcaFieldConfig, mixed $value)
 
string checkValue_inline_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $table, $field)
 
 checkValue_file_processDBdata ($valueArray, $tcaFieldConf, $id, $table)
 
 getAllowedTablesToCopyWhenCopyingAPage ()
 
string copyRecord_processManyToMany ($table, $uid, $field, $value, $conf, $language)
 
string copyRecord_processRelation ( $table, $uid, $field, $value, $row, $conf, $realDestPid, $language, array $workspaceOptions)
 
 copy_remapTranslationSourceField ($table, $l10nRecords, $languageSourceMap)
 
 inlineLocalizeSynchronize ($table, $id, array $command)
 
 isRecordLocalized (string $table, int $uid, int $language)
 
 discardLocalizedWorkspaceVersionsOfRecord (string $table, int $uid)
 
 discardWorkspaceVersionsOfRecord ($table, $uid)
 
 deleteSpecificPage (int $uid, bool $forceHardDelete, bool $deleteRecordsOnPage)
 
 undeleteRecord (string $table, int $uid)
 
 undeleteRecordRelations (string $table, int $uid, array $record)
 
 discardSubPagesAndRecordsOnPage (array $page)
 
 discardRecordRelations (string $table, array $record)
 
 discardCsvReferencesToRecord (string $table, array $record)
 
 discardMmRelations (string $table, array $fieldConfig, array $record)
 
 discardLocalizationOverlayRecords (string $table, array $record)
 
 getLocalTCE ()
 
 updateFlexFormData ($flexFormId, array $modifications)
 
 hardDeleteSingleRecord (string $table, int $uid)
 
bool isTableAllowedForThisPage (int $pageUid, $checkTable)
 
 doesRecordExist_pageLookUp ($id, $perms, $columns=['uid'])
 
array< int > null doesBranchExist (int $pid, int $permissions, array $pageIdsInBranch=[])
 
string int null pageInfo (int $id, string $field)
 
array< string, mixed > false recordInfoWithPermissionCheck (string $table, int $id, int $perms, string $fieldList=' *')
 
 getRecordHistoryStore ()
 
 increaseSortingOfFollowingRecords (string $table, int $pid, int $sortingValue=null)
 
int getPreviousLocalizedRecordUid ($table, $uid, $pid, $targetLanguage)
 
 addDefaultPermittedLanguageIfNotSet (string $table, array $incomingFieldArray, int $pageId)
 
 getSiteLanguageForPage (int $pageId, int $languageId)
 
bool isSubmittedValueEqualToStoredValue ($submittedValue, $storedValue, $storedType, $allowNull=false)
 
 addDeleteRestriction (QueryRestrictionContainerInterface $restrictions)
 
int[] getOriginalParentOfRecord ($table, $uid)
 
 compileAdminTables ()
 
bool fixUniqueInSite (string $table, int $uid)
 
 fixUniqueInSiteForSubpages (int $pageId)
 
array fixCopyAfterDuplFields (string $table, int $prevUid)
 
int string castReferenceValue ($value, array $configuration, bool $isNew)
 
string prependLabel ($table)
 
string[] null checkForRecordsFromDisallowedTables (array $pageIds)
 
 processClearCacheQueue ()
 
array prepareCacheFlush ($table, $uid, $pid)
 
int getDefaultLanguagePageId (int $pageId)
 
int overlayAutoVersionId ($table, $id)
 
array resolveVersionedRecords ($tableName, $fieldNames, $sortingField, array $liveIds)
 
bool workspaceAllowAutoCreation (string $table, $id, $recpid)
 
DataHandler getOuterMostInstance ()
 
bool isNestedElementCallRegistered ($table, $id, $identifier)
 
 registerNestedElementCall ($table, $id, $identifier)
 
 resetNestedElementCalls ()
 
bool isElementToBeDeleted ($table, $id)
 
 registerElementsToBeDeleted ()
 
 resetElementsToBeDeleted ()
 
 unsetElementsToBeDeleted (array $elements)
 
 getCommandMapElements (string $needle)
 
 controlActiveElements ()
 
 setNullValues (array $active, array &$haystack)
 
 postProcessDatabaseInsert (Connection $connection, string $tableName, int $suggestedUid)
 
 postProcessPostgresqlInsert (Connection $connection, string $tableName)
 
 createRelationHandlerInstance ()
 
 getLanguageService ()
 

Protected Attributes

bool $useTransOrigPointerField = true
 
CorrelationId $correlationId = null
 
array $deletedRecords = []
 
PagePermissionAssembler $pagePermissionAssembler
 
array $excludedTablesAndFields = []
 
array $control = []
 
array $mmHistoryRecords = []
 
array $historyRecords = []
 
array $recInsertAccessCache = []
 
array $isRecordInWebMount_Cache = []
 
array $isInWebMount_Cache = []
 
array $pageCache = []
 
array $remapStackActions = []
 
ReferenceIndexUpdater $referenceIndexUpdater
 
bool $disableDeleteClause = false
 
array $checkModifyAccessListHookObjects = null
 
self $outerMostInstance = null
 
const CACHE_IDENTIFIER_NESTED_ELEMENT_CALLS_PREFIX = 'core-datahandler-nestedElementCalls-'
 
const CACHE_IDENTIFIER_ELEMENTS_TO_BE_DELETED = 'core-datahandler-elementsToBeDeleted'
 

Static Protected Attributes

static array $recordsToClearCacheFor = []
 
static array $recordPidsForDeletedRecords = []
 

Private Member Functions

 sortAndDeleteFlexSectionContainerElements (array $valueArray, array $dataStructure)
 
 flexFieldDefinitionIsMmRelation (array $flexFieldDefinition)
 
 mmQueryShouldUseTablenamesColumn (array $config)
 
 mmRelationIsLocalSide (array $config)
 

Private Attributes

readonly CacheManager $cacheManager
 
readonly FrontendInterface $runtimeCache
 
readonly ConnectionPool $connectionPool
 

Detailed Description

The main data handler class which takes care of correctly updating and inserting records. This class was formerly known as TCEmain.

This is the TYPO3 Core Engine class for manipulation of the database This class is used by eg. the tce_db BE route (SimpleDataHandlerController) which provides an interface for POST forms to this class.

Dependencies:

  • ‪$GLOBALS['TCA'] must exist
  • ‪$GLOBALS['LANG'] must exist

Also see document 'TYPO3 Core API' for details.

Definition at line 93 of file DataHandler.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\DataHandling\DataHandler::__construct ( ReferenceIndexUpdater  $referenceIndexUpdater = null)

Sets up the data handler cache and some additional options, the main logic is done in the start() method.

Parameters
ReferenceIndexUpdater | null$referenceIndexUpdater‪Hand over from outermost instance to sub instances

Definition at line 486 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\DataHandling\DataHandler\$referenceIndexUpdater.

Member Function Documentation

◆ addDefaultPermittedLanguageIfNotSet()

TYPO3\CMS\Core\DataHandling\DataHandler::addDefaultPermittedLanguageIfNotSet ( string  $table,
array  $incomingFieldArray,
int  $pageId 
)
protected

If a "languageField" is specified for $table this function will add a possible value to the incoming array if none is found in there already.

should only be used from within DataHandler

Definition at line 8103 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ addDeleteRestriction()

TYPO3\CMS\Core\DataHandling\DataHandler::addDeleteRestriction ( QueryRestrictionContainerInterface  $restrictions)
protected

◆ addRemapAction()

TYPO3\CMS\Core\DataHandling\DataHandler::addRemapAction (   $table,
  $id,
callable  $callback,
array  $arguments 
)

Adds an instruction to the remap action stack (used with IRRE).

Parameters
string$table‪The affected table
int | string$id‪The affected ID
callable$callback‪The callback information (object and method)
array$arguments‪The arguments to be used with the callback

should only be used from within DataHandler

Definition at line 6896 of file DataHandler.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap_processFields().

◆ applyDefaultsForFieldArray()

TYPO3\CMS\Core\DataHandling\DataHandler::applyDefaultsForFieldArray ( string  $table,
int  $pageId,
array  $prepopulatedFieldArray 
)
protected

When a new record is created, all values that haven't been set but are set via PageTSconfig / UserTSconfig get applied here.

This is only executed for new records. The most important part is that the pageTS of the actual resolved $pid is taken, and a new field array with empty defaults is set again.

Definition at line 621 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\DataHandling\DataHandler\newFieldArray(), and TYPO3\CMS\Core\DataHandling\DataHandler\setDefaultsFromUserTS().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ applyFiltersToValues()

array mixed TYPO3\CMS\Core\DataHandling\DataHandler::applyFiltersToValues ( array  $tcaFieldConfiguration,
array  $values 
)
protected

Applies the filter methods from a column's TCA configuration to a value array.

Returns
‪array|mixed
Exceptions

Definition at line 2428 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForGroupFolderSelect().

◆ canDeletePage()

int [] string TYPO3\CMS\Core\DataHandling\DataHandler::canDeletePage (   $uid)

Used to evaluate if a page can be deleted

Parameters
int$uidPage id
Returns
‪int[]|string If array: List of page uids to traverse and delete (means OK), if string: error message.

should only be used from within DataHandler

Definition at line 5465 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_DELETE.

◆ cannotDeleteRecord()

string TYPO3\CMS\Core\DataHandling\DataHandler::cannotDeleteRecord (   $table,
  $id 
)

Returns TRUE if record CANNOT be deleted, otherwise FALSE. Used to check before the versioning API allows a record to be marked for deletion.

Parameters
string$table‪Record Table
int$id‪Record UID
Returns
‪string Returns a string IF there is an error (error string explaining). FALSE means record can be deleted

should only be used from within DataHandler

Definition at line 5511 of file DataHandler.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT.

◆ castReferenceValue()

int string TYPO3\CMS\Core\DataHandling\DataHandler::castReferenceValue (   $value,
array  $configuration,
bool  $isNew 
)
protected

Casts a reference value. In case MM relations or foreign_field references are used. All other configurations, as well as foreign_table(!) could be stored as comma-separated-values as well. Since the system is not able to determine the default value automatically then, the TCA default value is used if it has been defined.

Parameters
int | string$value‪The value to be casted (e.g. '', '0', '1,2,3')
array$configuration‪The TCA configuration of the accordant field
bool$isNew‪is the record new or not
Returns
‪int|string

Definition at line 8566 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForGroupFolderSelect().

◆ checkForRecordsFromDisallowedTables()

string [] null TYPO3\CMS\Core\DataHandling\DataHandler::checkForRecordsFromDisallowedTables ( array  $pageIds)
protected

Check if there are records from tables on the pages to be deleted which the current user is not allowed to

Parameters
int[]$pageIds‪IDs of pages which should be checked
Returns
‪string[]|null Return null, if permission granted, otherwise an array with the tables that are not allowed to be deleted
See also
canDeletePage()

Definition at line 8729 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT_ARRAY.

◆ checkModifyAccessList()

bool TYPO3\CMS\Core\DataHandling\DataHandler::checkModifyAccessList (   $table)

Checking group modify_table access list

Parameters
string$table‪Table name
Returns
‪bool Returns TRUE if the user has general access to modify the $table

should only be used from within DataHandler

Definition at line 6971 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ checkRecordInsertAccess()

bool TYPO3\CMS\Core\DataHandling\DataHandler::checkRecordInsertAccess (   $insertTable,
  $pid,
  $action = SystemLogDatabaseAction::INSERT 
)

Checks if user may insert a record from $insertTable on $pid

Parameters
string$insertTable‪Tablename to check
int$pid‪Integer PID
int$action‪For logging: Action number.
Returns
‪bool Returns TRUE if the user may insert a record from table $insertTable on page $pid

should only be used from within DataHandler

Definition at line 7063 of file DataHandler.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT, TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_NEW.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ checkRecordUpdateAccess()

bool TYPO3\CMS\Core\DataHandling\DataHandler::checkRecordUpdateAccess (   $table,
  $id 
)

Checks if user may update a record with uid=$id from $table

Parameters
string$table‪Record table
int$id‪Record UID
Returns
‪bool Returns TRUE if the user may update the record given by $table and $id

should only be used from within DataHandler

Definition at line 7022 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_setStage(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ checkValue()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue (   $table,
  $field,
  $value,
  $id,
  $status,
  $realPid,
  $tscPID,
  $incomingFieldArray = [] 
)

Evaluates a value according to $table/$field settings. This function is for real database fields - NOT FlexForm "pseudo" fields. NOTICE: Calling this function expects this: 1) That the data is saved!

Parameters
string$table‪Table name
string$field‪Field name
string$value‪Value to be evaluated. Notice, this is the INPUT value from the form. The original value (from any existing record) must be manually looked up inside the function if needed - or taken from $currentRecord array.
int | string$id‪The record-uid, mainly - but not exclusively - used for logging
string$status‪'update' or 'new' flag
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
int$tscPID‪TSconfig PID
array$incomingFieldArray‪the fields being explicitly set by the outside (unlike $fieldArray)
Returns
‪array Returns the evaluated $value as key "value" in this array. Can be checked with isset($res['value']) ...

should only be used from within DataHandler

Definition at line 1316 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW(), TYPO3\CMS\Core\DataHandling\DataHandler\doesPageHaveUnallowedTables(), TYPO3\CMS\Core\DataHandling\DataHandler\getDefaultLanguagePageId(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\DataHandling\DataHandler\recordInfo(), and TYPO3\CMS\Core\DataHandling\DataHandler\resolveFieldConfigurationAndRespectColumnsOverrides().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\fillInFieldArray().

◆ checkValue_category_processDBdata()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_category_processDBdata ( array  $valueArray,
array  $tcaFieldConf,
  $id,
string  $status,
string  $table,
string  $field 
)

Returns processed data for category fields

Parameters
array$valueArray‪Current value array
array$tcaFieldConf‪TCA field config
string | int$id‪Record id, used for look-up of MM relations (local_uid)
string$status‪Status string ('update' or 'new')
string$table‪Table name, needs to be passed to \TYPO3\CMS\Core\Database\RelationHandler
string$field‪field name, needs to be set for writing to sys_history
Returns
‪array Modified value array

should only be used from within DataHandler

Definition at line 3019 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\createRelationHandlerInstance().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForCategory().

◆ checkValue_checkMax()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_checkMax (   $tcaFieldConf,
  $valueArray 
)

Checks if a fields has more items than defined via TCA in maxitems. If there are more items than allowed, the item list is truncated to the defined number.

Parameters
array$tcaFieldConf‪Field configuration from TCA
array$valueArray‪Current value array of items
Returns
‪array The truncated value array of items

should only be used from within DataHandler

Definition at line 2695 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForCategory(), and TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForGroupFolderSelect().

◆ checkValue_file_processDBdata()

TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_file_processDBdata (   $valueArray,
  $tcaFieldConf,
  $id,
  $table 
)
protected

Returns data for file fields.

Definition at line 3328 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFile().

◆ checkValue_flex_procInData()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_flex_procInData (   $dataPart,
  $dataPart_current,
  $dataStructure,
  $pParams,
  $callBackFunc = '',
array  $workspaceOptions = [] 
)

Starts the processing the input data for flexforms. This will traverse all sheets / languages and for each it will traverse the sub-structure. See checkValue_flex_procInData_travDS() for more details. WARNING: Currently, it traverses based on the actual data array and NOT the structure. This means that values for non-valid fields, lKey/vKey/sKeys will be accepted! For traversal of data with a call back function you should rather use \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools

Parameters
array$dataPart‪The 'data' part of the INPUT flexform data
array$dataPart_current‪The 'data' part of the CURRENT flexform data
array$dataStructure‪Data structure for the form (might be sheets or not). Only values in the data array which has a configuration in the data structure will be processed.
array$pParams‪A set of parameters to pass through for the calling of the evaluation functions
string$callBackFunc‪Optional call back function, see checkValue_flex_procInData_travDS() DEPRECATED, use \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools instead for traversal!
Returns
‪array The modified 'data' part.
See also
checkValue_flex_procInData_travDS()

should only be used from within DataHandler

Definition at line 3136 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_flex_procInData_travDS().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFlex().

◆ checkValue_flex_procInData_travDS()

TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_flex_procInData_travDS ( $dataValues,
  $dataValues_current,
  $DSelements,
  $pParams,
  $callBackFunc,
  $structurePath,
array  $workspaceOptions = [] 
)

Processing of the sheet/language data array When it finds a field with a value the processing is done by ->checkValue_SW() by default but if a call back function name is given that method in this class will be called for the processing instead.

Parameters
array$dataValues‪New values (those being processed): Multidimensional Data array for sheet/language, passed by reference!
array$dataValues_current‪Current values: Multidimensional Data array. May be empty array() if not needed (for callBackFunctions)
array$DSelements‪Data structure which fits the data array
array$pParams‪A set of parameters to pass through for the calling of the evaluation functions / call back function
string$callBackFunc‪Call back function, default is checkValue_SW(). If $this->callBackObj is set to an object, the callback function in that object is called instead.
string$structurePath
See also
checkValue_flex_procInData()

should only be used from within DataHandler

Definition at line 3171 of file DataHandler.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_flex_procInData().

◆ checkValue_flexArray2Xml()

string TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_flexArray2Xml (   $array)

Converts an array to FlexForm XML

Parameters
array$array‪Array with FlexForm data
Returns
‪string Input array converted to XML

should only be used from within DataHandler

Definition at line 2539 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFlex().

◆ checkValue_group_select_explodeSelectGroupValue()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_group_select_explodeSelectGroupValue (   $value)

Explodes the $value, which is a list of files/uids (group select)

Parameters
string$value‪Input string, comma separated values. For each part it will also be detected if a '|' is found and the first part will then be used if that is the case. Further the value will be rawurldecoded.
Returns
‪array The value array.

should only be used from within DataHandler

Definition at line 3111 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForGroupFolderSelect().

◆ checkValue_group_select_processDBdata()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_group_select_processDBdata (   $valueArray,
  $tcaFieldConf,
  $id,
  $status,
  $type,
  $currentTable,
  $currentField 
)

Returns data for group/db and select fields

Parameters
array$valueArray‪Current value array
array$tcaFieldConf‪TCA field config
int$id‪Record id, used for look-up of MM relations (local_uid)
string$status‪Status string ('update' or 'new')
string$type‪The type, either 'select', 'group' or 'inline'
string$currentTable‪Table name, needs to be passed to \TYPO3\CMS\Core\Database\RelationHandler
string$currentField‪field name, needs to be set for writing to sys_history
Returns
‪array Modified value array

should only be used from within DataHandler

Definition at line 3067 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\createRelationHandlerInstance().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForGroupFolderSelect().

◆ checkValue_inline()

TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_inline (   $res,
  $value,
  $tcaFieldConf,
  $PP,
  $field,
array  $additionalData = null 
)

Evaluates 'inline' type values. (partly copied from the select_group function on this issue)

Parameters
array$res‪The result array. The processed value (if any!) is set in the 'value' key.
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
array$PP‪Additional parameters in a numeric array: $table,$id,$curValue,$status,$realPid,$recFID
string$field‪Field name
array$additionalData‪Additional data to be forwarded to sub-processors

should only be used from within DataHandler

Definition at line 2607 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInline().

◆ checkValue_inline_processDBdata()

string TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_inline_processDBdata (   $valueArray,
  $tcaFieldConf,
  $id,
  $status,
  $table,
  $field 
)
protected

Returns data for inline fields.

Parameters
array$valueArray‪Current value array
array$tcaFieldConf‪TCA field config
int$id‪Record id
string$status‪Status string ('update' or 'new')
string$table‪Table name, needs to be passed to \TYPO3\CMS\Core\Database\RelationHandler
string$field‪The current field the values are modified for
Returns
‪string Modified values

Definition at line 3300 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInline().

◆ checkValue_input_Eval()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval (   $value,
  $evalArray,
  $is_in,
string  $table = '',
  $id = '' 
)

Evaluation of 'input'-type values based on 'eval' list

Parameters
string$value‪Value to evaluate
array$evalArray‪Array of evaluations to traverse.
string$is_in‪Is-in string for 'is_in' evaluation
string$table‪Table name the eval is evaluated on
string | int$id‪Record ID the eval is evaluated on
Returns
‪array Modified $value in key 'value' or empty array

should only be used from within DataHandler

Definition at line 2916 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInput().

◆ checkValue_SW()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_SW (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $curValue,
  $status,
  $realPid,
  $recFID,
  $field,
  $tscPID,
array  $additionalData = null 
)

Branches out evaluation of a field value based on its type as configured in $GLOBALS['TCA'] Can be called for FlexForm pseudo fields as well, BUT must not have $field set if so. And hey, there's a good thing about the method arguments: 13 is prime :-P

Parameters
array$res‪The result array. The processed value (if any!) is set in the "value" key.
string | null$value‪The value to set.
array$tcaFieldConf‪Field configuration from $GLOBALS['TCA']
string$table‪Table name
int$id‪UID of record
mixed$curValue‪Current value of the field
string$status‪'update' or 'new' flag
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$recFID‪Field identifier [table:uid:field] for flexforms
string$field‪Field name. Must NOT be set if the call is for a flexform field (since flexforms are not allowed within flexforms).
int$tscPID‪TSconfig PID
array | null$additionalData‪Additional data to be forwarded to sub-processors
Returns
‪array Returns the evaluated $value as key "value" in this array.

should only be used from within DataHandler

Definition at line 1442 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForCategory(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForCheck(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForColor(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForDatetime(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForEmail(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFile(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFlex(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForGroupFolderSelect(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInline(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInput(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInternalReferences(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForJson(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForLanguage(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForLink(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForNumber(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForPassword(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForRadio(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForSlug(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForText(), and TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForUuid().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue(), and TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_flex_procInData_travDS().

◆ checkValue_text_Eval()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_text_Eval (   $value,
  $evalArray,
  $is_in 
)
Parameters
string$value‪The field value to be evaluated
array$evalArray‪Array of evaluations to traverse.
string$is_in‪The "is_in" value of the field configuration from TCA
Returns
‪array

should only be used from within DataHandler

Definition at line 2878 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForText().

◆ checkValueForCategory()

TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForCategory ( array  $result,
string  $value,
array  $tcaFieldConf,
string  $table,
  $id,
string  $status,
string  $field 
)
protected

Evaluate 'category' type values

Parameters
array$result‪The result array. The processed value (if any!) is set in the 'value' key.
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int | string$id‪uid of record
string$status‪The status - 'update' or 'new' flag
string$field‪Field name

Definition at line 2009 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_category_processDBdata(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_checkMax(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForCheck()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForCheck (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $realPid,
  $field 
)
protected

Evaluates 'check' type values.

Parameters
array$res‪The result array. The processed value (if any!) is set in the 'value' key.
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int$id‪UID of record
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$field‪Field name
Returns
‪array Modified $res array

Definition at line 2166 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\getRecordsWithSameValue(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForColor()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForColor ( string  $value,
array  $tcaFieldConf 
)
protected

Evaluate "color" type values.

Parameters
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1683 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForDatetime()

TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForDatetime ( mixed  $value,
array  $tcaFieldConf 
)
protected

◆ checkValueForEmail()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForEmail ( string  $value,
array  $tcaFieldConf,
string  $table,
int|string  $id,
int  $realPid,
string  $field 
)
protected

Evaluate "email" type values.

Parameters
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int | string$id‪UID of record - might be a NEW.. string for new records
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$field‪Field name
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1709 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\getUnique(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForFile()

TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForFile ( array  $res,
string  $value,
array  $tcaFieldConf,
string  $table,
int|string  $id,
string  $field,
?array  $additionalData = null 
)

◆ checkValueForFlex()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForFlex (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $curValue,
  $status,
  $realPid,
  $recFID,
  $tscPID,
  $field 
)
protected

Evaluates 'flex' type values.

Parameters
array$res‪The result array. The processed value (if any!) is set in the 'value' key.
string | array$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int$id‪UID of record
mixed$curValue‪Current value of the field
string$status‪'update' or 'new' flag
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$recFID‪Field identifier [table:uid:field] for flexforms
int$tscPID‪TSconfig PID
string$field‪Field name
Returns
‪array Modified $res array

Definition at line 2467 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\$checkValue_currentRecord, $GLOBALS, TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_flex_procInData(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_flexArray2Xml(), TYPO3\CMS\Core\DataHandling\DataHandler\sortAndDeleteFlexSectionContainerElements(), and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForGroupFolderSelect()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForGroupFolderSelect (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $status,
  $field 
)
protected

Evaluates 'group', 'folder' or 'select' type values.

Parameters
array$res‪The result array. The processed value (if any!) is set in the 'value' key.
string | array$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int$id‪UID of record
string$status‪'update' or 'new' flag
string$field‪Field name
Returns
‪array Modified $res array

Definition at line 2329 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\applyFiltersToValues(), TYPO3\CMS\Core\DataHandling\DataHandler\castReferenceValue(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_checkMax(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_group_select_explodeSelectGroupValue(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_group_select_processDBdata(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForInline()

array false TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForInline (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $status,
  $field,
array  $additionalData = null 
)

Evaluates 'inline' type values. (partly copied from the select_group function on this issue)

Parameters
array$res‪The result array. The processed value (if any!) is set in the 'value' key.
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int$id‪UID of record
string$status‪'update' or 'new' flag
string$field‪Field name
array$additionalData‪Additional data to be forwarded to sub-processors
Returns
‪array|false Modified $res array

should only be used from within DataHandler

Definition at line 2628 of file DataHandler.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_inline_processDBdata(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_inline(), and TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForInput()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForInput (   $value,
  $tcaFieldConf,
  $table,
  $id,
  $realPid,
  $field 
)
protected

Evaluate "input" type values.

Parameters
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int$id‪UID of record
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$field‪Field name
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1589 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_input_Eval(), TYPO3\CMS\Core\DataHandling\DataHandler\getUnique(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForInternalReferences()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForInternalReferences ( array  $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $field 
)
protected

Checks values that are used for internal references. If the provided $value is a NEW-identifier, the direct processing is stopped. Instead, the value is forwarded to the remap-stack to be post-processed and resolved into a proper UID after all data has been resolved.

This method considers TCA types that cannot handle and resolve these internal values directly, like 'passthrough', 'none' or 'user'. Values are only modified here if the $field is used as 'transOrigPointerField' or 'translationSource'.

Parameters
array$res‪The result array. The processed value (if any!) is set in the 'value' key.
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int | string$id‪UID of record
string$field‪The field name
Returns
‪array The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1498 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForJson()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForJson ( array|string  $value,
array  $tcaFieldConf 
)
protected

Evaluate "json" type values.

Parameters
array | string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
Returns
‪array The result array. The processed value (if any!) is set in the "value" key.

Definition at line 2288 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForLanguage()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForLanguage ( int  $value,
string  $table,
string  $field 
)
protected

Evaluate "language" type value.

Checks whether the user is allowed to add such a value as language

Parameters
int$value‪The value to set.
string$table‪Table name
string$field‪Field name
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1922 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForLink()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForLink ( string  $value,
array  $tcaFieldConf,
string  $table,
int|string  $id,
string  $field 
)
protected

Evaluate "link" type values.

Parameters
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int | string$id‪UID of record - might be a NEW.. string for new records
string$field‪The name of the current field
Returns
‪array The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1948 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\log(), and TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForNumber()

TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForNumber ( mixed  $value,
array  $tcaFieldConf 
)
protected

Evaluate 'number' type values

Parameters
mixed$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA

Definition at line 1631 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForPassword()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForPassword ( string  $value,
array  $tcaFieldConf,
string  $table,
int|string  $id,
int  $realPid,
array  $incomingFieldArray = [] 
)
protected

Evaluate "password" type values.

Parameters
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int | string$id‪UID of record - might be a NEW.. string for new records
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
array$incomingFieldArray‪the fields being explicitly set by the outside (unlike $fieldArray) for the record
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1768 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\getLanguageService(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\PasswordPolicy\NEW_USER_PASSWORD, and TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForRadio()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForRadio (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $pid,
  $field 
)
protected

Evaluates 'radio' type values.

Parameters
array$res‪The result array. The processed value (if any!) is set in the 'value' key.
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪The table of the record
int$id‪The id of the record
int$pid‪The pid of the record
string$field‪The field to check
Returns
‪array Modified $res array

Definition at line 2247 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForSlug()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForSlug ( string  $value,
array  $tcaFieldConf,
string  $table,
  $id,
int  $realPid,
string  $field,
array  $incomingFieldArray = [] 
)
protected

Evaluate "slug" type values.

Parameters
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int$id‪UID of record
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$field‪Field name
array$incomingFieldArray‪the fields being explicitly set by the outside (unlike $fieldArray) for the record
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.
See also
SlugHelper

Definition at line 1879 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\Model\RecordStateFactory\forName(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForText()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForText (   $value,
  $tcaFieldConf,
  $table,
  $realPid,
  $field 
)
protected

Evaluate "text" type values.

Parameters
string | null$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
string$table‪Table name
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$field‪Field name
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1540 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_text_Eval(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Core\DataHandling\DataHandler\validateValueForRequired().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ checkValueForUuid()

array TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForUuid ( string  $value,
array  $tcaFieldConf 
)
protected

Evaluate "uuid" type values. Will create a new uuid in case an invalid uuid is provided and the field is marked as required.

Parameters
string$value‪The value to set.
array$tcaFieldConf‪Field configuration from TCA
Returns
‪array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 2405 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue_SW().

◆ clear_cacheCmd()

TYPO3\CMS\Core\DataHandling\DataHandler::clear_cacheCmd (   $cacheCmd)

Clears the cache based on the command $cacheCmd.

$cacheCmd='pages' Clears cache for all pages and page-based caches inside the cache manager. Requires admin-flag to be set for BE_USER.

$cacheCmd='all' Clears all cache_tables. This is necessary if templates are updated. Requires admin-flag to be set for BE_USER.

The following cache_* are intentionally not cleared by 'all'

  • ‪all caches inside the cache manager that are inside the group "system"
  • ‪they are only needed to build up the core system and templates. If the group of system caches needs to be deleted explicitly, use flushCachesInGroup('system') of CacheManager directly.

$cacheCmd=[integer] Clears cache for the page pointed to by $cacheCmd (an integer).

$cacheCmd='cacheTag:[string]' Flush page cache by given tag

$cacheCmd='cacheId:[string]' Removes cache identifier from page and page section cache

Can call a list of post processing functions as defined in $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] (numeric array with values being the function references, called by GeneralUtility::callUserFunction()).

Parameters
int | string$cacheCmd‪The cache command, see above description

Definition at line 9044 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Core\Core\Environment\getContext().

◆ clearPrefixFromValue()

string TYPO3\CMS\Core\DataHandling\DataHandler::clearPrefixFromValue (   $table,
  $value 
)

Removes the prependAtCopy prefix on values

Parameters
string$table‪Table name
string$value‪The value to fix
Returns
‪string Clean name

should only be used from within DataHandler

Definition at line 8716 of file DataHandler.php.

◆ compareFieldArrayWithCurrentAndUnset()

array TYPO3\CMS\Core\DataHandling\DataHandler::compareFieldArrayWithCurrentAndUnset (   $table,
  $id,
  $fieldArray 
)

Compares the incoming field array with the current record and unsets all fields which are the same. Used for existing records being updated

Parameters
string$table‪Record table name
int$id‪Record uid
array$fieldArray‪Array of field=>value pairs intended to be inserted into the database. All keys with values matching exactly the current value will be unset!
Returns
‪array Returns $fieldArray. If the returned array is empty, then the record should not be updated!

should only be used from within DataHandler

Definition at line 8165 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ compileAdminTables()

TYPO3\CMS\Core\DataHandling\DataHandler::compileAdminTables ( )
protected

List of all tables (those administrators has access to = array_keys of $GLOBALS['TCA'])

Definition at line 8442 of file DataHandler.php.

References $GLOBALS.

◆ controlActiveElements()

TYPO3\CMS\Core\DataHandling\DataHandler::controlActiveElements ( )
protected

Controls active elements and sets NULL values if not active. Datamap is modified accordant to submitted control values.

Definition at line 9585 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ copy_remapTranslationSourceField()

TYPO3\CMS\Core\DataHandling\DataHandler::copy_remapTranslationSourceField (   $table,
  $l10nRecords,
  $languageSourceMap 
)
protected

Remap languageSource field to uids of newly created records

Parameters
string$table‪Table name
array$l10nRecords‪array of localized records from the page we're copying from (source records)
array$languageSourceMap‪array mapping source records uids to newly copied uids

Definition at line 4288 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$record.

◆ copyL10nOverlayRecords()

TYPO3\CMS\Core\DataHandling\DataHandler::copyL10nOverlayRecords (   $table,
  $uid,
  $destPid,
  $first = false,
  $overrideValues = [],
  $excludeFields = '' 
)

Find l10n-overlay records and perform the requested copy action for these records.

Parameters
string$table‪Record Table
int$uid‪UID of the record in the default language
int$destPid‪Position to copy to
bool$first
array$overrideValues
string$excludeFields

should only be used from within DataHandler

Definition at line 4211 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ copyPages()

TYPO3\CMS\Core\DataHandling\DataHandler::copyPages (   $uid,
  $destPid 
)

Copying pages Main function for copying pages.

Parameters
int$uidPage UID to copy
int$destPid‪Destination PID: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if

should only be used from within DataHandler

Definition at line 3649 of file DataHandler.php.

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

◆ copyRecord()

int null TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord (   $table,
  $uid,
  $destPid,
  $first = false,
  $overrideValues = [],
  $excludeFields = '',
  $language = 0,
  $ignoreLocalization = false 
)

Copying a single record

Parameters
string$table‪Element table
int$uid‪Element UID
int$destPid‪>=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
bool$first‪Is a flag set, if the record copied is NOT a 'slave' to another record copied. That is, if this record was asked to be copied in the cmd-array
array$overrideValues‪Associative array with field/value pairs to override directly. Notice; Fields must exist in the table record and NOT be among excluded fields!
string$excludeFields‪Commalist of fields to exclude from the copy process (might get default values)
int$language‪Language ID
bool$ignoreLocalization‪If TRUE, any localization routine is skipped
Returns
‪int|null ID of new record, if any

should only be used from within DataHandler

Definition at line 3513 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ copyRecord_flexFormCallBack()

array TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord_flexFormCallBack (   $pParams,
  $dsConf,
  $dataValue,
  $_1,
  $_2,
  $workspaceOptions 
)

Callback function for traversing the FlexForm structure in relation to creating copied files of file relations inside of flex form structures.

Parameters
array$pParams‪Array of parameters in num-indexes: table, uid, field
array$dsConf‪TCA field configuration (from Data Structure XML)
string$dataValue‪The value of the flexForm field
string$_1‪Not used.
string$_2‪Not used.
array$workspaceOptions
Returns
‪array Result array with key "value" containing the value of the processing.
See also
copyRecord()
checkValue_flex_procInData_travDS()

should only be used from within DataHandler

Definition at line 4187 of file DataHandler.php.

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

◆ copyRecord_procBasedOnFieldType()

array string null TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord_procBasedOnFieldType (   $table,
  $uid,
  $field,
  $value,
  $row,
  $conf,
  $realDestPid,
  $language = 0,
array  $workspaceOptions = [] 
)

Processing/Preparing content for copyRecord() function

Parameters
string$table‪Table name
int$uid‪Record uid
string$field‪Field name being processed
string | null$value‪Input value to be processed.
array$row‪Record array
array$conf‪TCA field configuration
int$realDestPid‪Real page id (pid) the record is copied to
int$language‪Language ID used in the duplicated record
array$workspaceOptions‪Options to be forwarded if actions happen on a workspace currently
Returns
‪array|string|null
See also
copyRecord()

Definition at line 3991 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

◆ copyRecord_processManyToMany()

string TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord_processManyToMany (   $table,
  $uid,
  $field,
  $value,
  $conf,
  $language 
)
protected

Processes the children of an MM relation field (select, group, inline) when the parent record is copied.

Parameters
string$table
int$uid
string$field
string$value
array$conf
int$language
Returns
‪string

Definition at line 4034 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ copyRecord_processRelation()

string TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord_processRelation (   $table,
  $uid,
  $field,
  $value,
  $row,
  $conf,
  $realDestPid,
  $language,
array  $workspaceOptions 
)
protected

Processes relations in an inline (IRRE) or file element when the parent record is copied.

Parameters
string$table
int$uid
string$field
string$value
array$row
array$conf
int$realDestPid
int$language
Returns
‪string

Definition at line 4096 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

◆ copyRecord_raw()

int null TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord_raw (   $table,
  $uid,
  $pid,
  $overrideArray = [],
array  $workspaceOptions = [] 
)

Copying records, but makes a "raw" copy of a record. Basically the only thing observed is field processing like the copying of files and correction of ids. All other fields are 1-1 copied. Technically the copy is made with THIS instance of the DataHandler class contrary to copyRecord() which creates a new instance and uses the processData() function. The copy is created by insertNewCopyVersion() which bypasses most of the regular input checking associated with processData() - maybe copyRecord() should even do this as well!? This function is used to create new versions of a record. NOTICE: DOES NOT CHECK PERMISSIONS to create! And since page permissions are just passed through and not changed to the user who executes the copy we cannot enforce permissions without getting an incomplete copy - unless we change permissions of course.

Parameters
string$table‪Element table
int$uid‪Element UID
int$pid‪Element PID (real PID, not checked)
array$overrideArray‪Override array - must NOT contain any fields not in the table!
array$workspaceOptions‪Options to be forwarded if actions happen on a workspace currently
Returns
‪int|null Returns the new ID of the record (if applicable)

should only be used from within DataHandler

Definition at line 3859 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW.

◆ copySpecificPage()

int null TYPO3\CMS\Core\DataHandling\DataHandler::copySpecificPage (   $uid,
  $destPid,
  $copyTablesArray,
  $first = false 
)

Copying a single page ($uid) to $destPid and all tables in the array copyTablesArray.

Parameters
int$uidPage uid
int$destPid‪Destination PID: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
array$copyTablesArray‪Table on pages to copy along with the page.
bool$first‪Is a flag set, if the record copied is NOT a 'slave' to another record copied. That is, if this record was asked to be copied in the cmd-array
Returns
‪int|null The id of the new page, if applicable.

should only be used from within DataHandler

Definition at line 3719 of file DataHandler.php.

References $fields, $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, if, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ createRelationHandlerInstance()

◆ dbAnalysisStoreExec()

TYPO3\CMS\Core\DataHandling\DataHandler::dbAnalysisStoreExec ( )

Executing dbAnalysisStore This will save MM relations for new records but is executed after records are created because we need to know the ID of them

should only be used from within DataHandler

Definition at line 8356 of file DataHandler.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ deleteAction()

TYPO3\CMS\Core\DataHandling\DataHandler::deleteAction (   $table,
  $id 
)

Delete a single record

Parameters
string$table‪Table name
int$id‪Record UID

should only be used from within DataHandler

Definition at line 5064 of file DataHandler.php.

References $GLOBALS.

◆ deleteClause()

string TYPO3\CMS\Core\DataHandling\DataHandler::deleteClause (   $table)

Returns delete-clause for the $table

Parameters
string$table‪Table name
Returns
‪string Delete clause

should only be used from within DataHandler

Definition at line 8278 of file DataHandler.php.

References $GLOBALS.

◆ deleteEl()

TYPO3\CMS\Core\DataHandling\DataHandler::deleteEl ( string  $table,
int  $uid,
bool  $noRecordCheck = false,
bool  $forceHardDelete = false,
bool  $deleteRecordsOnPage = true 
)

Delete element from any table

Parameters
string$table‪Table name
int$uid‪Record UID
bool$noRecordCheck‪Flag: If $noRecordCheck is set, then the function does not check permission to delete record
bool$forceHardDelete‪If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
bool$deleteRecordsOnPage‪If false and if deleting pages, records on the page will not be deleted (edge case while swapping workspaces)

should only be used from within DataHandler

Definition at line 5101 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ deleteL10nOverlayRecords()

TYPO3\CMS\Core\DataHandling\DataHandler::deleteL10nOverlayRecords (   $table,
  $uid 
)

Find l10n-overlay records and perform the requested delete action for these records.

Parameters
string$table‪Record Table
int$uid‪Record UID

should only be used from within DataHandler

Definition at line 5597 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction().

◆ deletePages()

TYPO3\CMS\Core\DataHandling\DataHandler::deletePages ( int  $uid,
bool  $force = false,
bool  $forceHardDelete = false,
bool  $deleteRecordsOnPage = true 
)

Used to delete page because it will check for branch below pages and disallowed tables on the page as well.

Parameters
int$uidPage id
bool$force‪If TRUE, pages are not checked for permission.
bool$forceHardDelete‪If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
bool$deleteRecordsOnPage‪If false, records on the page will not be deleted (edge case while swapping workspaces)

should only be used from within DataHandler

Definition at line 5326 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Type\Bitmask\Permission\NOTHING.

◆ deleteRecord()

TYPO3\CMS\Core\DataHandling\DataHandler::deleteRecord ( string  $table,
int  $uid,
bool  $noRecordCheck = false,
bool  $forceHardDelete = false 
)

Deleting a record This function may not be used to delete pages-records unless the underlying records are already deleted Deletes a record regardless of versioning state (live or offline, doesn't matter, the uid decides) If both $noRecordCheck and $forceHardDelete are set it could even delete a "deleted"-flagged record!

Parameters
string$table‪Table name
int$uid‪Record UID
bool$noRecordCheck‪Flag: If $noRecordCheck is set, then the function does not check permission to delete record
bool$forceHardDelete‪If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!

should only be used from within DataHandler

Definition at line 5201 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT, TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_DELETE, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT.

◆ deleteRecord_procBasedOnFieldType()

TYPO3\CMS\Core\DataHandling\DataHandler::deleteRecord_procBasedOnFieldType (   $table,
  $uid,
  $value,
  $conf 
)

Process fields of a record to be deleted and search for special handling, like inline type, MM records, etc.

Parameters
string$table‪Record Table
int$uid‪Record UID
string$value‪Record field value
array$conf‪TCA configuration of current field
See also
deleteRecord()

should only be used from within DataHandler

Definition at line 5558 of file DataHandler.php.

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

◆ deleteRecord_procFields()

TYPO3\CMS\Core\DataHandling\DataHandler::deleteRecord_procFields (   $table,
  $uid 
)

Before a record is deleted, check if it has references such as inline type or MM references. If so, set these child records also to be deleted.

Parameters
string$table‪Record Table
int$uid‪Record UID
See also
deleteRecord()

should only be used from within DataHandler

Definition at line 5535 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$uid.

◆ deleteSpecificPage()

TYPO3\CMS\Core\DataHandling\DataHandler::deleteSpecificPage ( int  $uid,
bool  $forceHardDelete,
bool  $deleteRecordsOnPage 
)
protected

Delete a page (or set deleted field to 1) and all records on it.

Parameters
int$uidPage id
bool$forceHardDelete‪If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
bool$deleteRecordsOnPage‪If false, records on the page will not be deleted (edge case while swapping workspaces)
See also
deletePages()

Definition at line 5368 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ destNotInsideSelf()

bool TYPO3\CMS\Core\DataHandling\DataHandler::destNotInsideSelf (   $destinationId,
  $id 
)

Checks if page $id is a uid in the rootline of page id $destinationId Used when moving a page

Parameters
int$destinationId‪Destination Page ID to test
int$idPage ID to test for presence inside Destination
Returns
‪bool Returns FALSE if ID is inside destination (including equal to)

should only be used from within DataHandler

Definition at line 7254 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ disableDeleteClause()

TYPO3\CMS\Core\DataHandling\DataHandler::disableDeleteClause ( )

Disables the delete clause for fetching records. In general only undeleted records will be used. If the delete clause is disabled, also deleted records are taken into account.

Definition at line 8266 of file DataHandler.php.

◆ discard()

TYPO3\CMS\Core\DataHandling\DataHandler::discard ( string  $table,
?int  $uid,
array  $record = null 
)

Discard a versioned record from this workspace. This deletes records from the database - no soft delete. This main entry method is called recursive for sub pages, localizations, relations and records on a page. The method checks user access and gathers facts about this record to hand the deletion over to detail methods.

The incoming $uid or $row can be anything: The workspace of current user is respected and only records of current user workspace are discarded. If giving a live record uid, the versioned overly will be fetched.

Parameters
string$tableDatabase table name
int | null$uid‪Uid of live or versioned record to be discarded, or null if $record is given
array | null$record‪Record row that should be discarded. Used instead of $uid within recursion.

should only be used from within DataHandler

Definition at line 5821 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Webhooks\Message\$uid, and if.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap().

◆ discardCsvReferencesToRecord()

TYPO3\CMS\Core\DataHandling\DataHandler::discardCsvReferencesToRecord ( string  $table,
array  $record 
)
protected

When the to-discard record is the target of a CSV group field of another table record, these records need to be updated to no longer point to the discarded record.

Those referencing records are not very easy to find with only the to-discard record being available. The solution used here looks up records referencing the to-discard record by fetching a list of references from sys_refindex, where the to-discard record is on the right side (ref_* fields) and in the workspace the to-discard record lives in. The referencing record fields are then updated to drop the to-discard record from the CSV list.

Using sys_refindex for this task is a bit risky: This would fail if a DataHandler call adds a reference to the record and requests discarding the record in one call - the refindex is always only updated at the very end of a DataHandler call, the logic below wouldn't catch this since it would be based on an outdated sys_refindex. The scenario however is of little use and not used in core, so it should be fine.

Parameters
string$table‪Table name of this record
array$record‪The record row to handle

Definition at line 6033 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ discardLocalizationOverlayRecords()

TYPO3\CMS\Core\DataHandling\DataHandler::discardLocalizationOverlayRecords ( string  $table,
array  $record 
)
protected

Find localization overlays of a record and discard them.

Parameters
string$table‪Table of this record
array$record‪Record row

Definition at line 6130 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ discardLocalizedWorkspaceVersionsOfRecord()

TYPO3\CMS\Core\DataHandling\DataHandler::discardLocalizedWorkspaceVersionsOfRecord ( string  $table,
int  $uid 
)
protected

When deleting a live element with sys_language_uid = 0, there may be translated records that have been created in workspaces only (t3ver_state=1). Those have to be discarded explicitly since the other 'delete' related code does not consider this case, otherwise the 'new' workspace translation would be dangling when the live record is gone.

Definition at line 5118 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ discardMmRelations()

TYPO3\CMS\Core\DataHandling\DataHandler::discardMmRelations ( string  $table,
array  $fieldConfig,
array  $record 
)
protected

When a workspace record row is discarded that has mm relations, existing mm table rows need to be deleted. The method performs the delete operation depending on TCA field configuration.

Parameters
string$table‪Table name of this record
array$fieldConfig‪TCA configuration of this field
array$record‪The full record of a left- or ride-side relation

Definition at line 6091 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Core\Database\Connection\PARAM_INT, TYPO3\CMS\Core\Database\Query\QueryHelper\quoteDatabaseIdentifiers(), and TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix().

◆ discardRecordRelations()

TYPO3\CMS\Core\DataHandling\DataHandler::discardRecordRelations ( string  $table,
array  $record 
)
protected

Discard record relations like inline and MM of a record.

Parameters
string$table‪Table name of this record
array$record‪The record row to handle

Definition at line 5984 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$record.

◆ discardSubPagesAndRecordsOnPage()

TYPO3\CMS\Core\DataHandling\DataHandler::discardSubPagesAndRecordsOnPage ( array  $page)
protected

Also discard any sub pages and records of a new parent page if this page is discarded. Discarding only in specific localization, if needed.

Parameters
array$pagePage record row

Definition at line 5917 of file DataHandler.php.

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

◆ discardWorkspaceVersionsOfRecord()

TYPO3\CMS\Core\DataHandling\DataHandler::discardWorkspaceVersionsOfRecord (   $table,
  $uid 
)
protected

Discard workspace overlays of a live record: When a live row is deleted, all existing workspace overlays are discarded.

Parameters
string$table‪Table name
int$uid‪Record UID

should only be used from within DataHandler

Definition at line 5166 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$record, and TYPO3\CMS\Webhooks\Message\$uid.

◆ doesBranchExist()

array<int> null TYPO3\CMS\Core\DataHandling\DataHandler::doesBranchExist ( int  $pid,
int  $permissions,
array  $pageIdsInBranch = [] 
)
protected

Checks if a whole branch of pages exists.

Tests the branch under $pid like doesRecordExist(), but it doesn't test the page with $pid as uid - use doesRecordExist() for this purpose.

Parameters
int$pidPage ID to select subpages from.
int$permissions‪Perms integer to check each page record for.
array$pageIdsInBranch‪List of page uids, this is added to and returned in the end
Returns
‪array<int>|null List of page IDs in branch, if there are subpages, empty array if there are none or null if no permission

should only be used from within DataHandler

Definition at line 7192 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ doesPageHaveUnallowedTables()

array TYPO3\CMS\Core\DataHandling\DataHandler::doesPageHaveUnallowedTables (   $page_uid,
int  $doktype 
)

Checks if there are records on a page from tables that are not allowed

Parameters
int | string$page_uidPage ID
int$doktypePage doktype
Returns
‪array Returns a list of the tables that are 'present' on the page but not allowed with the page_uid/doktype

should only be used from within DataHandler

Definition at line 7321 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue().

◆ doesRecordExist()

bool TYPO3\CMS\Core\DataHandling\DataHandler::doesRecordExist (   $table,
  $id,
int  $perms 
)

Checks if record can be selected based on given permission criteria

Parameters
string$table‪Record table name
int$id‪Record UID
int$perms‪Permission restrictions to observe: integer that will be bitwise AND'ed.
Returns
‪bool Returns TRUE if the record given by $table, $id and $perms can be selected
Exceptions

Definition at line 7141 of file DataHandler.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ doesRecordExist_pageLookUp()

TYPO3\CMS\Core\DataHandling\DataHandler::doesRecordExist_pageLookUp (   $id,
  $perms,
  $columns = ['uid'] 
)
protected

Looks up a page based on permissions.

Parameters
int$idPage id
int$perms‪Permission integer
array$columns‪Columns to select
See also
doesRecordExist()

Definition at line 7155 of file DataHandler.php.

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

◆ eventPid()

int TYPO3\CMS\Core\DataHandling\DataHandler::eventPid (   $table,
  $uid,
  $pid 
)

◆ fillInFieldArray()

array TYPO3\CMS\Core\DataHandling\DataHandler::fillInFieldArray (   $table,
  $id,
array  $fieldArray,
array  $incomingFieldArray,
  $realPid,
  $status,
  $tscPID 
)

Filling in the field array $this->excludedTablesAndFields is used to filter fields if needed.

Parameters
string$table‪Table name
int | string$id‪Record ID
array$fieldArray‪Default values, Preset $fieldArray with 'pid' maybe (pid and uid will be not be overridden anyway)
array$incomingFieldArray‪Is which fields/values you want to set. There are processed and put into $fieldArray if OK
int$realPid‪The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted.
string$status‪Is 'new' or 'update'
int$tscPID‪TSconfig PID
Returns
‪array Field Array

should only be used from within DataHandler

Definition at line 1163 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\DataHandling\DataHandler\checkValue(), TYPO3\CMS\Core\DataHandling\DataHandler\pageInfo(), and TYPO3\CMS\Core\DataHandling\DataHandler\recordInfo().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ fixCopyAfterDuplFields()

array TYPO3\CMS\Core\DataHandling\DataHandler::fixCopyAfterDuplFields ( string  $table,
int  $prevUid 
)
protected

When a record is copied you can specify fields from the previous record which should be copied into the new one

Parameters
string$table‪Table name
int$prevUid‪UID of previous record
Returns
‪array Output array (For when the copying operation needs to get the information instead of updating the info)

should only be used from within DataHandler

Definition at line 8536 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ fixUniqueInPid()

TYPO3\CMS\Core\DataHandling\DataHandler::fixUniqueInPid (   $table,
  $uid 
)

Checks if any uniqueInPid eval input fields are in the record and if so, they are re-written to be correct.

Parameters
string$table‪Table name
int$uid‪Record UID

should only be used from within DataHandler

Definition at line 8454 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ fixUniqueInSite()

bool TYPO3\CMS\Core\DataHandling\DataHandler::fixUniqueInSite ( string  $table,
int  $uid 
)
protected

Checks if any uniqueInSite eval fields are in the record and if so, they are re-written to be correct.

Parameters
string$table‪Table name
int$uid‪Record UID
Returns
‪bool whether the record had to be fixed or not

Definition at line 8485 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\DataHandling\Model\RecordStateFactory\forName(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ fixUniqueInSiteForSubpages()

TYPO3\CMS\Core\DataHandling\DataHandler::fixUniqueInSiteForSubpages ( int  $pageId)
protected

Check if there are subpages that need an adoption as well

Definition at line 8514 of file DataHandler.php.

◆ flexFieldDefinitionIsMmRelation()

TYPO3\CMS\Core\DataHandling\DataHandler::flexFieldDefinitionIsMmRelation ( array  $flexFieldDefinition)
private

Find out if a given flex field definition is a relation with an MM relation. Helper of versionPublishManyToManyRelations().

Definition at line 6350 of file DataHandler.php.

◆ getAllowedTablesToCopyWhenCopyingAPage()

TYPO3\CMS\Core\DataHandling\DataHandler::getAllowedTablesToCopyWhenCopyingAPage ( )
protected

Compile a list of tables that should be copied along when a page is about to be copied.

First, get the list that the user is allowed to modify (all if admin), and then check against a possible limitation within "DataHandler->copyWhichTables" if not set to "*" to limit the list further down

Definition at line 3688 of file DataHandler.php.

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

◆ getAutoVersionId()

TYPO3\CMS\Core\DataHandling\DataHandler::getAutoVersionId (   $table,
  $id 
)

Gets the automatically versionized id of a record.

Parameters
string$table‪Name of the table
int$id‪Uid of the record

should only be used from within TYPO3 Core

Definition at line 9269 of file DataHandler.php.

◆ getCheckModifyAccessListHookObjects()

array TYPO3\CMS\Core\DataHandling\DataHandler::getCheckModifyAccessListHookObjects ( )
protected

Gets the 'checkModifyAccessList' hook objects. The first call initializes the accordant objects.

Returns
‪array The 'checkModifyAccessList' hook objects (if any)
Exceptions

Definition at line 682 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\$checkModifyAccessListHookObjects, and $GLOBALS.

◆ getCommandMapElements()

TYPO3\CMS\Core\DataHandling\DataHandler::getCommandMapElements ( string  $needle)
protected

Gets elements of the command map that match a particular command.

Parameters
string$needle‪The command to be matched

Definition at line 9566 of file DataHandler.php.

◆ getCopyHeader()

string TYPO3\CMS\Core\DataHandling\DataHandler::getCopyHeader (   $table,
  $pid,
  $field,
  $value,
  $count,
  $prevTitle = '' 
)

Get modified header for a copied record

Parameters
string$table‪Table name
int$pid‪PID value in which other records to test might be
string$field‪Field name to get header value for.
string$value‪Current field value
int$count‪Counter (number of recursions)
string$prevTitle‪Previous title we checked for (in previous recursion)
Returns
‪string The field value, possibly appended with a "copy label

should only be used from within DataHandler

Definition at line 8643 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ getCorrelationId()

◆ getDefaultLanguagePageId()

int TYPO3\CMS\Core\DataHandling\DataHandler::getDefaultLanguagePageId ( int  $pageId)
protected

Find out if the record is a localization. If so, get the uid of the default language page. Always returns the uid of the workspace live record: No explicit workspace overlay is applied.

Parameters
int$pageIdPage UID, can be the default page record, or a page translation record ID
Returns
‪int UID of the default page record in live workspace

Definition at line 9209 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue(), and TYPO3\CMS\Core\DataHandling\DataHandler\resolveSortingAndPidForNewRecord().

◆ getExcludeListArray()

array TYPO3\CMS\Core\DataHandling\DataHandler::getExcludeListArray ( )

Generate an array of fields to be excluded from editing for the user. Based on "exclude"-field in TCA and a look up in non_exclude_fields Will also generate this list for admin-users so they must be check for before calling the function

Returns
‪array Array of [table]-[field] pairs to exclude from editing.

should only be used from within DataHandler

Definition at line 7292 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\start().

◆ getHistoryRecords()

TYPO3\CMS\Core\DataHandling\DataHandler::getHistoryRecords ( )

should only be used from within TYPO3 Core

Definition at line 9706 of file DataHandler.php.

Referenced by TYPO3\CMS\Redirects\Hooks\DataHandlerCacheFlushingHook\rebuildRedirectCacheIfNecessary().

◆ getLanguageService()

TYPO3\CMS\Core\DataHandling\DataHandler::getLanguageService ( )
protected

Definition at line 9698 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForPassword().

◆ getLocalTCE()

TYPO3\CMS\Core\DataHandling\DataHandler::getLocalTCE ( )
protected

Returns an instance of DataHandler for handling local datamaps/cmdmaps

Definition at line 6407 of file DataHandler.php.

◆ getOriginalParentOfRecord()

int [] TYPO3\CMS\Core\DataHandling\DataHandler::getOriginalParentOfRecord (   $table,
  $uid 
)
protected

Gets UID of parent record. If record is deleted it will be looked up in an array built before the record was deleted

Parameters
string$table‪Table where record lives/lived
int$uid‪Record UID
Returns
‪int[] Parent UIDs

Definition at line 8305 of file DataHandler.php.

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

◆ getOuterMostInstance()

DataHandler TYPO3\CMS\Core\DataHandling\DataHandler::getOuterMostInstance ( )
protected

Gets the outer most instance of \TYPO3\CMS\Core\DataHandling\DataHandler Since \TYPO3\CMS\Core\DataHandling\DataHandler can create nested objects of itself, this method helps to determine the first (= outer most) one.

Returns
DataHandler

Definition at line 9443 of file DataHandler.php.

◆ getPID()

int false TYPO3\CMS\Core\DataHandling\DataHandler::getPID (   $table,
  $uid 
)

Returns the pid of a record from $table with $uid

Parameters
string$table‪Table name
int$uid‪Record uid
Returns
‪int|false PID value (unless the record did not exist in which case FALSE is returned)

should only be used from within DataHandler

Definition at line 8338 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ getPreviousLocalizedRecordUid()

int TYPO3\CMS\Core\DataHandling\DataHandler::getPreviousLocalizedRecordUid (   $table,
  $uid,
  $pid,
  $targetLanguage 
)
protected

Returning uid of "previous" localized record, if any, for tables with a "sortby" column. Used when records are localized, so that localized records are sorted in the same order as the source language records.

The uid of the returned record is later used to create the localized record "after" (higher sorting value) than the one the uid is returned of.

There are basically two scenarios:

  • ‪The localized record is to be placed as the first record of the target pid/language combination. In this case, there is no "before" record in this language. The method returns input $uid, saying "insert the localized record with a higher sorting value than the record the localization is created from".
  • ‪There is a localized record "before" (lower sorting value) in the target pid/language combination. For instance because source language element 2 is being translated and source language element 1 has already been translated. In this case, the uid of the 'element 1' is returned, saying "insert the localized record with a higher sorting value than the "before" record in this language.

The algorithm first fetches the record of given input uid. It then looks if there is a record with a lower sorting value for this pid/language combination. If no, input uid is returned ("place with higher sorting than source language record"). If yes, it looks if there is a localization of that source record in the target language and return the uid of that target language record ("place with higher sorting that this traget language record"). When dealing with table tt_content, colpos is also taken into account.

Parameters
string$table‪Table name
int$uid‪Uid of source language record
int$pid‪Pid of source language record
int$targetLanguage‪Target language id
Returns
‪int uid of record after which the localized record should be inserted

Definition at line 8005 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ getRecordHistoryStore()

TYPO3\CMS\Core\DataHandling\DataHandler::getRecordHistoryStore ( )
protected

◆ getRecordProperties()

array TYPO3\CMS\Core\DataHandling\DataHandler::getRecordProperties (   $table,
  $id,
  $noWSOL = false 
)

Returns an array with record properties, like header and pid No check for deleted or access is done! For versionized records, pid is resolved to its live versions pid. Used for logging

Parameters
string$table‪Table name
int$id‪Uid of record
bool$noWSOL‪If set, no workspace overlay is performed
Returns
‪array Properties of record

should only be used from within DataHandler

Definition at line 7486 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue(), TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\sendStageChangeNotification(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_setStage(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ getRecordPropertiesFromRow()

array null TYPO3\CMS\Core\DataHandling\DataHandler::getRecordPropertiesFromRow (   $table,
  $row 
)

Returns an array with record properties, like header and pid, based on the row

Parameters
string$table‪Table name
array$row‪Input row
Returns
‪array|null Output array

should only be used from within DataHandler

Definition at line 7503 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ getRecordsWithSameValue()

TYPO3\CMS\Core\DataHandling\DataHandler::getRecordsWithSameValue (   $tableName,
  $uid,
  $fieldName,
  $value,
  $pageId = 0 
)

gets all records that have the same value in a field excluding the given uid

Parameters
string$tableName‪Table name
int$uid‪UID to filter out in the lookup (the record itself...)
string$fieldName‪Field name for which $value must be unique
string | int$value‪Value string.
int$pageId‪If set, the value will be unique for this PID

should only be used from within DataHandler

Definition at line 2834 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForCheck().

◆ getRelationFieldType()

string bool TYPO3\CMS\Core\DataHandling\DataHandler::getRelationFieldType (   $conf)

Returns the subtype as a string of a relation (inline / file) field. If it's not a relation field at all, it returns FALSE.

Parameters
array$conf‪Config array for TCA/columns field
Returns
‪string|bool string Inline subtype (field|mm|list), boolean: FALSE

should only be used from within DataHandler

Definition at line 8610 of file DataHandler.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFieldValue(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap_processFields().

◆ getSiteLanguageForPage()

TYPO3\CMS\Core\DataHandling\DataHandler::getSiteLanguageForPage ( int  $pageId,
int  $languageId 
)
protected

Find a site language by the given language ID for a specific page, and check for all available sites if the page ID is "0".

Note: Currently, the first language matching the given id is used, while there might be more languages with the same id in additional sites.

Parameters
int$pageId
int$languageId

Definition at line 8131 of file DataHandler.php.

◆ getSortNumber()

int array bool null TYPO3\CMS\Core\DataHandling\DataHandler::getSortNumber (   $table,
  $uid,
  $pid 
)

Returning sorting number for tables with a "sortby" column Using when new records are created and existing records are moved around.

The strategy is:

  • ‪if no record exists: set interval as sorting number
  • ‪if inserted before an element: put in the middle of the existing elements
  • ‪if inserted behind the last element: add interval to last sorting number
  • ‪if collision: move all subsequent records by 2 * interval, insert new record with collision + interval

How to calculate the maximum possible inserts for the worst case of adding all records to the top, such that the sorting number stays within INT_MAX

i = interval (currently 256) c = number of inserts until collision s = max sorting number to reach (INT_MAX - 32bit) n = number of records (~83 million)

c = 2 * g g = log2(i) / 2 + 1 n = g * s / i - g + 1

The algorithm can be tuned by adjusting the interval value. Higher value means less collisions, but also less inserts are possible to stay within INT_MAX.

Parameters
string$table‪Table name
int$uid‪Uid of record to find sorting number for. May be zero in case of new.
int$pid‪Positioning PID, either >=0 (pointing to page in which case we find sorting number for first record in page) or <0 (pointing to record in which case to find next sorting number after this record)
Returns
‪int|array|bool|null Returns integer if PID is >=0, otherwise an array with PID and sorting number. Possibly FALSE in case of error.

should only be used from within DataHandler

Definition at line 7790 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\resolveSortingAndPidForNewRecord().

◆ getTableEntries()

array TYPO3\CMS\Core\DataHandling\DataHandler::getTableEntries (   $table,
  $TSconfig 
)

Extract entries from TSconfig for a specific table. This will merge specific and default configuration together.

Parameters
string$table‪Table name
array$TSconfig‪TSconfig for page
Returns
‪array TSconfig merged

should only be used from within DataHandler

Definition at line 8322 of file DataHandler.php.

◆ getUnique()

string TYPO3\CMS\Core\DataHandling\DataHandler::getUnique (   $table,
  $field,
  $value,
  $id,
  $newPid = 0 
)

Gets a unique value for $table/$id/$field based on $value

Parameters
string$table‪Table name
string$field‪Field name for which $value must be unique
string$value‪Value string.
int$id‪UID to filter out in the lookup (the record itself...)
int$newPid‪If set, the value will be unique for this PID
Returns
‪string Modified value (if not-unique). Will be the value appended with a number (until 100, then the function just breaks).
Todo:
‪: consider workspaces, especially when publishing a unique value which has a unique value already in live

should only be used from within DataHandler

Definition at line 2723 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\DataHandling\DataHandler\getUniqueCountStatement(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), and TYPO3\CMS\Core\Database\Connection\PARAM_STR.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForEmail(), and TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInput().

◆ getUniqueCountStatement()

QueryBuilder TYPO3\CMS\Core\DataHandling\DataHandler::getUniqueCountStatement ( string  $value,
string  $table,
string  $field,
int  $uid,
int  $pid 
)
protected

Gets the count of records for a unique field

Parameters
string$value‪The string value which should be unique
string$table‪Table name
string$field‪Field name for which $value must be unique
int$uid‪UID to filter out in the lookup (the record itself...)
int$pid‪If set, the value will be unique for this PID
Returns
‪QueryBuilder Return the prepared statement to check uniqueness

Definition at line 2774 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\DataHandling\DataHandler\addDeleteRestriction(), and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\getUnique().

◆ getVersionizedIncomingFieldArray()

TYPO3\CMS\Core\DataHandling\DataHandler::getVersionizedIncomingFieldArray (   $table,
  $id,
$incomingFieldArray,
$registerDBList 
)

If a parent record was versionized on a workspace in $this->process_datamap, it might be possible, that child records (e.g. on using IRRE) were affected. This function finds these relations and updates their uids in the $incomingFieldArray. The $incomingFieldArray is updated by reference!

Parameters
string$table‪Table name of the parent record
int$id‪Uid of the parent record
array$incomingFieldArray‪Reference to the incomingFieldArray of process_datamap
array$registerDBList‪Reference to the $registerDBList array that was created/updated by versionizing calls to DataHandler in process_datamap.

should only be used from within DataHandler

Definition at line 6920 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ hardDeleteSingleRecord()

TYPO3\CMS\Core\DataHandling\DataHandler::hardDeleteSingleRecord ( string  $table,
int  $uid 
)
protected

Simple helper method to hard delete one row from table ignoring delete TCA field

Parameters
string$table‪A row from this table should be deleted
int$uid‪Uid of row to be deleted

Definition at line 6953 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ hasDeletedRecord()

bool TYPO3\CMS\Core\DataHandling\DataHandler::hasDeletedRecord (   $tableName,
  $uid 
)

Determines whether a particular record has been deleted using DataHandler::deleteRecord() in this instance.

Parameters
string$tableName
int$uid
Returns
‪bool

should only be used from within TYPO3 Core

Definition at line 9254 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ hook_processDatamap_afterDatabaseOperations()

TYPO3\CMS\Core\DataHandling\DataHandler::hook_processDatamap_afterDatabaseOperations ( $hookObjectsArr,
$status,
$table,
$id,
$fieldArray 
)

Hook: processDatamap_afterDatabaseOperations (calls $hookObj->processDatamap_afterDatabaseOperations($status, $table, $id, $fieldArray, $this);)

Note: When using the hook after INSERT operations, you will only get the temporary NEW... id passed to your hook as $id, but you can easily translate it to the real uid of the inserted record using the $this->substNEWwithIDs array.

Parameters
array$hookObjectsArr‪(reference) Array with hook objects
string$status‪(reference) Status of the current operation, 'new' or 'update
string$table‪(reference) The table currently processing data for
string$id‪(reference) The record uid currently processing data for, [integer] or [string] (like 'NEW...')
array$fieldArray‪(reference) The field array of a record

should only be used from within DataHandler

Definition at line 657 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ increaseSortingOfFollowingRecords()

TYPO3\CMS\Core\DataHandling\DataHandler::increaseSortingOfFollowingRecords ( string  $table,
int  $pid,
int  $sortingValue = null 
)
protected

Increases sorting field value of all records with sorting higher than $sortingValue

Used internally by getSortNumber() to "make space" in sorting values when inserting new record

Parameters
string$table‪Table name
int$pidPage Uid in which to resort records
int$sortingValue‪All sorting numbers larger than this number will be shifted
See also
getSortNumber()

Definition at line 7945 of file DataHandler.php.

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

◆ initializeSlugFieldsToEmptyString()

TYPO3\CMS\Core\DataHandling\DataHandler::initializeSlugFieldsToEmptyString ( string  $tableName,
array  $fieldValues 
)
protected

New records capable of handling slugs (TCA type 'slug'), always require the field value to be set, in order to run through the validation process to create a new slug. Fields having null as value are ignored and can be used to by-pass implicit slug initialization.

Definition at line 1099 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ inlineLocalizeSynchronize()

TYPO3\CMS\Core\DataHandling\DataHandler::inlineLocalizeSynchronize (   $table,
  $id,
array  $command 
)
protected

Performs localization or synchronization of child records. The $command argument expects an array, but supports a string for backward-compatibility.

$command = array( 'field' => 'tx_myfieldname', 'language' => 2, // either the key 'action' or 'ids' must be set 'action' => 'synchronize', // or 'localize' 'ids' => array(1, 2, 3, 4) // child element ids );

Parameters
string$table‪The table of the localized parent record
int$id‪The uid of the localized parent record
array$command‪Defines the command to be performed (see example above)

Definition at line 4906 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

◆ insertDB()

int null TYPO3\CMS\Core\DataHandling\DataHandler::insertDB (   $table,
  $id,
  $fieldArray,
  $newVersion = false,
  $suggestedUid = 0,
  $dontSetNewIdIndex = false 
)

Insert into database Does not check permissions but expects them to be verified on beforehand

Parameters
string$table‪Record table name
string$id‪"NEW...." uid string
array$fieldArray‪Array of field=>value pairs to insert. FIELDS MUST MATCH the database FIELDS. No check is done. "pid" must point to the destination of the record!
bool$newVersion‪Set to TRUE if new version is created.
int$suggestedUid‪Suggested UID value for the inserted record. See the array $this->suggestedInsertUids; Admin-only feature
bool$dontSetNewIdIndex‪If TRUE, the ->substNEWwithIDs array is not updated. Only useful in very rare circumstances!
Returns
‪int|null Returns ID on success.

should only be used from within DataHandler

Definition at line 7605 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ insertNewCopyVersion()

int null TYPO3\CMS\Core\DataHandling\DataHandler::insertNewCopyVersion (   $table,
  $fieldArray,
  $realPid 
)

Inserts a record in the database, passing TCA configuration values through checkValue() but otherwise does NOTHING and checks nothing regarding permissions. Passes the "version" parameter to insertDB() so the copy will look like a new version in the log - should probably be changed or modified a bit for more broad usage...

Parameters
string$table‪Table name
array$fieldArray‪Field array to insert as a record
int$realPid‪The value of PID field.
Returns
‪int|null Returns the new ID of the record (if applicable)

should only be used from within DataHandler

Definition at line 3941 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ insertUpdateDB_preprocessBasedOnFieldType()

array TYPO3\CMS\Core\DataHandling\DataHandler::insertUpdateDB_preprocessBasedOnFieldType (   $table,
  $fieldArray 
)

Preprocesses field array based on field type. Some fields must be adjusted before going to database. This is done on the copy of the field array because original values are used in remap action later.

Parameters
string$table‪Table name
array$fieldArray‪Field array to check
Returns
‪array Updated field array

should only be used from within TYPO3 Core

Definition at line 9230 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ int_pageTreeInfo()

array TYPO3\CMS\Core\DataHandling\DataHandler::int_pageTreeInfo (   $CPtable,
  $pid,
  $counter,
  $rootID 
)

Returns array, $CPtable, of pages under the $pid going down to $counter levels. Selecting ONLY pages which the user has read-access to!

Parameters
array$CPtable‪Accumulation of page uid=>pid pairs in branch of $pid
int$pidPage ID for which to find subpages
int$counter‪Number of levels to go down.
int$rootID‪ID of root point for new copied branch: The idea seems to be that a copy is not made of the already new page!
Returns
‪array Return array.

should only be used from within DataHandler

Definition at line 8382 of file DataHandler.php.

References TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Database\Connection\PARAM_INT_ARRAY.

◆ isElementToBeDeleted()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isElementToBeDeleted (   $table,
  $id 
)
protected

Determines whether an element was registered to be deleted in the registry.

Parameters
string$table‪Name of the table
int$id‪Uid of the record
Returns
‪bool
See also
registerElementsToBeDeleted
resetElementsToBeDeleted
copyRecord_raw
versionizeRecord

Definition at line 9516 of file DataHandler.php.

◆ isInWebMount()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isInWebMount (   $pid)

Checks if the input page ID is in the BE_USER webmounts

Parameters
int$pidPage ID to check
Returns
‪bool TRUE if OK. Cached results.

should only be used from within DataHandler

Definition at line 7006 of file DataHandler.php.

◆ isNestedElementCallRegistered()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isNestedElementCallRegistered (   $table,
  $id,
  $identifier 
)
protected

Determines nested element calls.

Parameters
string$table‪Name of the table
int$id‪Uid of the record
string$identifier‪Name of the action to be checked
Returns
‪bool

Definition at line 9475 of file DataHandler.php.

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

◆ isOuterMostInstance()

TYPO3\CMS\Core\DataHandling\DataHandler::isOuterMostInstance ( )

Determines whether this object is the outermost instance of itself Since DataHandler can create nested objects of itself, this method helps to determine the first (= outermost) one.

Definition at line 9462 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ isRecordCopied()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isRecordCopied (   $table,
  $uid 
)

Determine if a record was copied or if a record is the result of a copy action.

Parameters
string$table‪The tablename of the record
int$uid‪The uid of the record
Returns
‪bool Returns TRUE if the record is copied or is the result of a copy action

should only be used from within DataHandler

Definition at line 8765 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord().

◆ isRecordInWebMount()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isRecordInWebMount (   $table,
  $id 
)

Checking if a record with uid $id from $table is in the BE_USERS webmounts which is required for editing etc.

Parameters
string$table‪Table name
int$id‪UID of record
Returns
‪bool Returns TRUE if OK. Cached results.

should only be used from within DataHandler

Definition at line 6990 of file DataHandler.php.

◆ isRecordLocalized()

TYPO3\CMS\Core\DataHandling\DataHandler::isRecordLocalized ( string  $table,
int  $uid,
int  $language 
)
protected

Returns true if a localization of a record exists.

Definition at line 5045 of file DataHandler.php.

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

◆ isReferenceField()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isReferenceField (   $conf)

Returns TRUE if the TCA/columns field type is a DB reference field

Parameters
array$conf‪Config array for TCA/columns field
Returns
‪bool TRUE if DB reference field (group/db or select with foreign-table)

should only be used from within DataHandler

Definition at line 8594 of file DataHandler.php.

◆ isSubmittedValueEqualToStoredValue()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isSubmittedValueEqualToStoredValue (   $submittedValue,
  $storedValue,
  $storedType,
  $allowNull = false 
)
protected

Determines whether submitted values and stored values are equal. This prevents from adding superfluous field changes which would be shown in the record history as well. For NULL fields (see accordant TCA definition 'nullable'), a special handling is required since (!strcmp(NULL, '')) would be a false-positive.

Parameters
mixed$submittedValue‪Value that has submitted (e.g. from a backend form)
mixed$storedValue‪Value that is currently stored in the database
string$storedType‪SQL type of the stored value column (see mysql_field_type(), e.g 'int', 'string', ...)
bool$allowNull‪Whether NULL values are allowed by accordant TCA definition ('nullable')
Returns
‪bool Whether both values are considered to be equal

Definition at line 8230 of file DataHandler.php.

◆ isTableAllowedForThisPage()

bool TYPO3\CMS\Core\DataHandling\DataHandler::isTableAllowedForThisPage ( int  $pageUid,
  $checkTable 
)
protected

Checks if a table is allowed on a certain page id according to allowed tables set for the page "doktype" and its [ctrl][rootLevel]-settings if any.

Parameters
int$pageUidPage id for which to check, including 0 (zero) if checking for page tree root.
string$checkTable‪Table name to check
Returns
‪bool TRUE if OK

should only be used from within DataHandler

Definition at line 7110 of file DataHandler.php.

References $GLOBALS.

◆ localize()

int bool TYPO3\CMS\Core\DataHandling\DataHandler::localize (   $table,
  $uid,
  $language 
)

Localizes a record to another system language

Parameters
string$table‪Table name
int$uid‪Record uid (to be localized)
int$language‪Language ID
Returns
‪int|bool The uid (int) of the new translated record or FALSE (bool) if something went wrong

should only be used from within DataHandler

Definition at line 4703 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW.

◆ log()

int TYPO3\CMS\Core\DataHandling\DataHandler::log (   $table,
  $recuid,
  $action,
  $recpid,
  $error,
  $details,
  $details_nr = -1,
  $data = [],
  $event_pid = -1,
  $NEWid = '' 
)

Logging actions from DataHandler

Parameters
string$table‪Table name the log entry is concerned with. Blank if NA
int$recuid‪Record UID. Zero if NA
int$action‪Action number: 0=No category, 1=new record, 2=update record, 3= delete record, 4= move record, 5= Check/evaluate
int | string$recpid‪Normally 0 (zero). If set, it indicates that this log-entry is used to notify the backend of a record which is moved to another location
int$error‪The severity: 0 = message, 1 = error, 2 = System Error, 3 = security notice (admin), 4 warning
string$details‪Default error message in english
int$details_nr‪This number is unique for every combination of $type and $action. This is the error-message number, which can later be used to translate error messages. 0 if not categorized, -1 if temporary
array$data‪Array with special information that may go into $details by 's' marks / sprintf() when the log is shown
int$event_pid‪The page_uid (pid) where the event occurred. Used to select log-content for specific pages.
string$NEWid‪NEW id for new records
Returns
‪int Log entry UID (0 if no log entry was written or logging is disabled)
See also
‪\TYPO3\CMS\Core\SysLog\Action\Database for all available values of argument $action
‪\TYPO3\CMS\Core\SysLog\Error for all available values of argument $error

should only be used from within TYPO3 Core

Definition at line 9134 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForCheck(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForEmail(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForLink(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForPassword(), TYPO3\CMS\Core\DataHandling\DataHandler\getUnique(), TYPO3\CMS\Core\Resource\Security\FilePermissionAspect\logError(), TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest\logFormatsDetailMessageWithAdditionalDataInLocalErrorArray(), TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest\logFormatsDetailMessageWithPlaceholders(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Core\Hooks\BackendUserGroupIntegrityCheck\processDatamap_afterDatabaseOperations(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\sendStageChangeNotification(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_setStage(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ mmQueryShouldUseTablenamesColumn()

TYPO3\CMS\Core\DataHandling\DataHandler::mmQueryShouldUseTablenamesColumn ( array  $config)
private

Find out if a query to an MM table should have a "tablenames=myTable" where. This is the case if we're looking at it from the foreign side and if the table must have "tablenames" column due to various TCA combinations. Helper of versionPublishManyToManyRelations().

Definition at line 6364 of file DataHandler.php.

References $GLOBALS.

◆ mmRelationIsLocalSide()

TYPO3\CMS\Core\DataHandling\DataHandler::mmRelationIsLocalSide ( array  $config)
private

Find out if we're looking at an MM relation from local or foreign side. Helper of versionPublishManyToManyRelations().

Definition at line 6393 of file DataHandler.php.

◆ moveL10nOverlayRecords()

TYPO3\CMS\Core\DataHandling\DataHandler::moveL10nOverlayRecords (   $table,
  $uid,
  $destPid,
  $originalRecordDestinationPid 
)

Find l10n-overlay records and perform the requested move action for these records.

Parameters
string$table‪Record Table
int$uid‪Record UID
int$destPid‪Position to move to
int$originalRecordDestinationPid‪Position to move the original record to

should only be used from within DataHandler

Definition at line 4643 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_moveVersionedRecord().

◆ moveRecord()

TYPO3\CMS\Core\DataHandling\DataHandler::moveRecord (   $table,
  $uid,
  $destPid 
)

Moving single records

Parameters
string$table‪Table name to move
int$uid‪Record uid to move
int$destPid‪Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if

should only be used from within DataHandler

Definition at line 4338 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_DELETE.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFieldValue().

◆ moveRecord_procBasedOnFieldType()

TYPO3\CMS\Core\DataHandling\DataHandler::moveRecord_procBasedOnFieldType (   $table,
  $uid,
  $destPid,
  $value,
  $conf 
)

Move child records depending on the field type of the parent record.

Parameters
string$table‪Record Table
int$uid‪Record UID
int$destPid‪Position to move to
string$value‪Record field value
array$conf‪TCA configuration of current field

should only be used from within DataHandler

Definition at line 4611 of file DataHandler.php.

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

◆ moveRecord_procFields()

TYPO3\CMS\Core\DataHandling\DataHandler::moveRecord_procFields (   $table,
  $uid,
  $destPid 
)

Walk through all fields of the moved record and look for children of e.g. the inline type. If child records are found, they are also move to the new $destPid.

Parameters
string$table‪Record Table
int$uid‪Record UID
int$destPid‪Position to move to

should only be used from within DataHandler

Definition at line 4590 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$uid.

◆ moveRecord_raw()

TYPO3\CMS\Core\DataHandling\DataHandler::moveRecord_raw (   $table,
  $uid,
  $destPid 
)

Moves a record without checking security of any sort. USE ONLY INTERNALLY

Parameters
string$table‪Table name to move
int$uid‪Record uid to move
int$destPid‪Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
See also
moveRecord()

should only be used from within DataHandler

Definition at line 4417 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_moveVersionedRecord().

◆ newFieldArray()

array TYPO3\CMS\Core\DataHandling\DataHandler::newFieldArray (   $table)

Returns a fieldArray with default values. Values will be picked up from the TCA array looking at the config key "default" for each column. If values are set in ->defaultValues they will overrule though. Used for new records and during copy operations for defaults

Parameters
string$table‪Table name for which to set default values.
Returns
‪array Array with default values.

should only be used from within DataHandler

Definition at line 8082 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\applyDefaultsForFieldArray(), and TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ overlayAutoVersionId()

int TYPO3\CMS\Core\DataHandling\DataHandler::overlayAutoVersionId (   $table,
  $id 
)
protected

Overlays the automatically versionized id of a record.

Parameters
string$table‪Name of the table
int$id‪Uid of the record
Returns
‪int

Definition at line 9285 of file DataHandler.php.

◆ pageInfo()

string int null TYPO3\CMS\Core\DataHandling\DataHandler::pageInfo ( int  $id,
string  $field 
)
protected

Returns the value of the $field from page $id NOTICE; the function caches the result for faster delivery next time. You can use this function repeatedly without performance loss since it doesn't look up the same record twice!

Parameters
int$idPage uid
string$field‪Field name for which to return value
Returns
‪string|int|null Value of the field. Result is cached in $this->pageCache[$id][$field] and returned from there next time!

should only be used from within DataHandler

Definition at line 7372 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\fillInFieldArray().

◆ postProcessDatabaseInsert()

TYPO3\CMS\Core\DataHandling\DataHandler::postProcessDatabaseInsert ( Connection  $connection,
string  $tableName,
int  $suggestedUid 
)
protected

Entry point to post process a database insert. Currently bails early unless a UID has been forced and the database platform is not MySQL.

Definition at line 9634 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\lastInsertId().

◆ postProcessPostgresqlInsert()

TYPO3\CMS\Core\DataHandling\DataHandler::postProcessPostgresqlInsert ( Connection  $connection,
string  $tableName 
)
protected

PostgreSQL works with sequences for auto increment columns. A sequence is not updated when a value is written to such a column. To avoid clashes when the sequence returns an existing ID this helper will update the sequence to the current max value of the column.

Definition at line 9653 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\createQueryBuilder(), and TYPO3\CMS\Core\Database\Connection\quoteIdentifier().

◆ prepareCacheFlush()

array TYPO3\CMS\Core\DataHandling\DataHandler::prepareCacheFlush (   $table,
  $uid,
  $pid 
)
protected

Prepare the cache clearing

Parameters
string$table‪Table name of record that needs to be cleared
int$uid‪UID of record for which the cache needs to be cleared
int$pid‪Original pid of the page of the record which the cache needs to be cleared
Returns
‪array Array with tagsToClear and clearCacheCommands

This function is internal only it may be changed/removed also in minor version numbers.

Definition at line 8856 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ prependLabel()

string TYPO3\CMS\Core\DataHandling\DataHandler::prependLabel (   $table)
protected

Return "copy" label for a table. Although the name is "prepend" it actually APPENDs the label (after ...)

Parameters
string$table‪Table name
Returns
‪string Label to append, containing "%s" for the number
See also
getCopyHeader()

Definition at line 8678 of file DataHandler.php.

References $GLOBALS.

◆ printLogErrorMessages()

non empty string [] TYPO3\CMS\Core\DataHandling\DataHandler::printLogErrorMessages ( )

Print log error messages from the operations of this script instance and return a list of the erroneous records

should only be used from within TYPO3 Core

Returns
‪non-empty-string[]

Definition at line 9160 of file DataHandler.php.

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

◆ process_cmdmap()

void bool TYPO3\CMS\Core\DataHandling\DataHandler::process_cmdmap ( )

Processing the cmd-array See "TYPO3 Core API" for a description of the options.

Returns
‪void|bool

Definition at line 3354 of file DataHandler.php.

References $GLOBALS.

◆ process_datamap()

bool void TYPO3\CMS\Core\DataHandling\DataHandler::process_datamap ( )

Processing the data-array Call this function to process the data-array set by start()

Returns
‪bool|void

Definition at line 708 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\$enableLogging, $GLOBALS, TYPO3\CMS\Webhooks\Message\$identifier, TYPO3\CMS\Core\DataHandling\DataHandler\$registerDBList, TYPO3\CMS\Core\DataHandling\DataHandler\addDefaultPermittedLanguageIfNotSet(), TYPO3\CMS\Core\DataHandling\DataHandler\applyDefaultsForFieldArray(), TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Core\DataHandling\DataHandler\checkModifyAccessList(), TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordInsertAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordUpdateAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\compareFieldArrayWithCurrentAndUnset(), TYPO3\CMS\Core\DataHandling\DataHandler\controlActiveElements(), TYPO3\CMS\Core\DataHandling\DataHandler\dbAnalysisStoreExec(), TYPO3\CMS\Core\DataHandling\DataHandler\fillInFieldArray(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Core\DataHandling\DataHandler\getVersionizedIncomingFieldArray(), TYPO3\CMS\Core\DataHandling\DataHandler\hook_processDatamap_afterDatabaseOperations(), TYPO3\CMS\Core\DataHandling\DataHandler\initializeSlugFieldsToEmptyString(), TYPO3\CMS\Core\DataHandling\DataHandler\insertDB(), TYPO3\CMS\Core\DataHandling\DataHandler\isOuterMostInstance(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\DataHandling\DataHandler\newFieldArray(), TYPO3\CMS\Core\DataHandling\DataHandler\processClearCacheQueue(), TYPO3\CMS\Core\DataHandling\DataHandler\processRemapStack(), TYPO3\CMS\Core\DataHandling\DataHandler\recordInfo(), TYPO3\CMS\Core\DataHandling\DataHandler\registerElementsToBeDeleted(), TYPO3\CMS\Core\DataHandling\DataHandler\resetElementsToBeDeleted(), TYPO3\CMS\Core\DataHandling\DataHandler\resolveSortingAndPidForNewRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\tableReadOnly(), TYPO3\CMS\Core\DataHandling\DataHandler\unsetElementsToBeDeleted(), TYPO3\CMS\Core\DataHandling\DataHandler\updateDB(), TYPO3\CMS\Core\DataHandling\DataHandler\workspaceAllowAutoCreation(), and TYPO3\CMS\Core\DataHandling\DataHandler\workspaceCannotEditRecord().

Referenced by TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest\processDatamapForFrozenNonZeroWorkspaceReturnsFalse(), TYPO3\CMS\Tstemplate\Controller\ConstantEditorController\saveAction(), and TYPO3\CMS\Tstemplate\Controller\ActiveTypoScriptController\updateAction().

◆ processClearCacheQueue()

TYPO3\CMS\Core\DataHandling\DataHandler::processClearCacheQueue ( )
protected

Do the actual clear cache

Definition at line 8810 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ processRemapStack()

TYPO3\CMS\Core\DataHandling\DataHandler::processRemapStack ( )

Processes the $this->remapStack at the end of copying, inserting, etc. actions. The remapStack takes care about the correct mapping of new and old uids in case of relational data.

should only be used from within DataHandler

Definition at line 6710 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ recordInfo()

array null TYPO3\CMS\Core\DataHandling\DataHandler::recordInfo (   $table,
  $id 
)

Returns the row of a record given by $table and $id NOTICE: No check for deleted or access!

Parameters
string$table‪Table name
int$id‪UID of the record from $table
Returns
‪array|null Returns the selected record on success, otherwise NULL.

should only be used from within DataHandler

Definition at line 7399 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue(), TYPO3\CMS\Core\DataHandling\DataHandler\fillInFieldArray(), TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), and TYPO3\CMS\Core\DataHandling\DataHandler\resolveSortingAndPidForNewRecord().

◆ recordInfoWithPermissionCheck()

array<string,mixed> false TYPO3\CMS\Core\DataHandling\DataHandler::recordInfoWithPermissionCheck ( string  $table,
int  $id,
int  $perms,
string  $fieldList = '*' 
)
protected

Checks if record exists with and without permission check and returns that row

Parameters
string$table‪Record table name
int$id‪Record UID
int$perms‪Permission restrictions to observe: An integer that will be bitwise AND'ed.
string$fieldList‪- fields - default is '*'
Exceptions

Definition at line 7426 of file DataHandler.php.

References $GLOBALS, $output, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ registerElementsToBeDeleted()

TYPO3\CMS\Core\DataHandling\DataHandler::registerElementsToBeDeleted ( )
protected

Registers elements to be deleted in the registry.

See also
process_datamap

Definition at line 9528 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ registerNestedElementCall()

TYPO3\CMS\Core\DataHandling\DataHandler::registerNestedElementCall (   $table,
  $id,
  $identifier 
)
protected

Registers nested elements calls. This is used to track nested calls (e.g. for following m:n relations).

Parameters
string$table‪Name of the table
int$id‪Uid of the record
string$identifier‪Name of the action to be tracked

Definition at line 9490 of file DataHandler.php.

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

◆ registerRecordIdForPageCacheClearing()

TYPO3\CMS\Core\DataHandling\DataHandler::registerRecordIdForPageCacheClearing (   $table,
  $uid,
  $pid = null 
)

Clearing the cache based on a page being updated If the $table is 'pages' then cache is cleared for all pages on the same level (and subsequent?) Else just clear the cache for the parent page of the record.

Parameters
string$table‪Table name of record that was just updated.
int$uid‪UID of updated / inserted record
int$pid‪REAL PID of page of a deleted/moved record to get TSconfig in ClearCache.

This method is not meant to be called directly but only from the core itself or from hooks

Definition at line 8793 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ registerReferenceIndexRowsForDrop()

TYPO3\CMS\Core\DataHandling\DataHandler::registerReferenceIndexRowsForDrop ( string  $table,
int  $uid,
int  $workspace 
)

Delete rows from sys_refindex a table / uid combination is involved in: Either on left side (tablename + recuid) OR right side (ref_table + ref_uid). Useful in scenarios like workspace-discard where parents or children are hard deleted: The expensive updateRefIndex() does not need to be called since we can just drop straight ahead.

Parameters
string$table‪Table name, used as tablename and ref_table
int$uid‪Record uid, used as recuid and ref_uid
int$workspace‪Workspace the record lives in

should only be used from within DataHandler

Definition at line 7738 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ registerReferenceIndexUpdateForReferencesToItem()

TYPO3\CMS\Core\DataHandling\DataHandler::registerReferenceIndexUpdateForReferencesToItem ( string  $table,
int  $uid,
int  $workspace,
int  $targetWorkspace = null 
)

Helper method to access referenceIndexUpdater->registerUpdateForReferencesToItem() from within workspace DataHandlerHook.

Exists only for workspace DataHandlerHook. May vanish any time.

Definition at line 7749 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord().

◆ remapListedDBRecords()

TYPO3\CMS\Core\DataHandling\DataHandler::remapListedDBRecords ( )

Processes the fields with references as registered during the copy process. This includes all FlexForm fields which had references.

should only be used from within DataHandler

Definition at line 6426 of file DataHandler.php.

References $fields, $GLOBALS, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

◆ remapListedDBRecords_flexFormCallBack()

array TYPO3\CMS\Core\DataHandling\DataHandler::remapListedDBRecords_flexFormCallBack (   $pParams,
  $dsConf,
  $dataValue 
)

Callback function for traversing the FlexForm structure in relation to creating copied files of file relations inside of flex form structures.

Parameters
array$pParams‪Set of parameters in numeric array: table, uid, field
array$dsConf‪TCA config for field (from Data Structure of course)
string$dataValue‪Field value (from FlexForm XML)
Returns
‪array Array where the "value" key carries the value.
See also
checkValue_flex_procInData_travDS()
remapListedDBRecords()

should only be used from within DataHandler

Definition at line 6500 of file DataHandler.php.

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

◆ remapListedDBRecords_procDBRefs()

array null TYPO3\CMS\Core\DataHandling\DataHandler::remapListedDBRecords_procDBRefs (   $conf,
  $value,
  $MM_localUid,
  $table 
)

Performs remapping of old UID values to NEW uid values for a DB reference field.

Parameters
array$conf‪TCA field config
string$value‪Field value
int$MM_localUid‪UID of local record (for MM relations - might need to change if support for FlexForms should be done!)
string$table‪Table name
Returns
‪array|null Returns array of items ready to implode for field content.
See also
remapListedDBRecords()

should only be used from within DataHandler

Definition at line 6526 of file DataHandler.php.

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

◆ remapListedDBRecords_procFile()

TYPO3\CMS\Core\DataHandling\DataHandler::remapListedDBRecords_procFile (   $conf,
  $value,
  $uid,
  $table 
)

Performs remapping of old UID values to NEW uid values for an file field.

should only be used from within DataHandler

Definition at line 6658 of file DataHandler.php.

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

◆ remapListedDBRecords_procInline()

TYPO3\CMS\Core\DataHandling\DataHandler::remapListedDBRecords_procInline (   $conf,
  $value,
  $uid,
  $table 
)

Performs remapping of old UID values to NEW uid values for an inline field.

Parameters
array$conf‪TCA field config
string$value‪Field value
int$uid‪The uid of the ORIGINAL record
string$table‪Table name

should only be used from within DataHandler

Definition at line 6593 of file DataHandler.php.

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

◆ resetElementsToBeDeleted()

TYPO3\CMS\Core\DataHandling\DataHandler::resetElementsToBeDeleted ( )
protected

Resets the elements to be deleted in the registry.

See also
process_datamap

Definition at line 9539 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ resetNestedElementCalls()

TYPO3\CMS\Core\DataHandling\DataHandler::resetNestedElementCalls ( )
protected

Resets the nested element calls.

Definition at line 9500 of file DataHandler.php.

◆ resolveFieldConfigurationAndRespectColumnsOverrides()

TYPO3\CMS\Core\DataHandling\DataHandler::resolveFieldConfigurationAndRespectColumnsOverrides ( string  $table,
string  $field 
)
protected

Use columns overrides for evaluation.

Fetch the TCA ["config"] part for a specific field, including the columnsOverrides value. Used for checkValue purposes currently (as it takes the checkValue_currentRecord value).

Parameters
string$table
string$field

Definition at line 1411 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValue().

◆ resolvePid()

int TYPO3\CMS\Core\DataHandling\DataHandler::resolvePid (   $table,
  $pid 
)

Get the final pid based on $table and $pid ($destPid type... pos/neg)

Parameters
string$table‪Table name
int$pid‪"Destination pid" : If the value is >= 0 it's just returned directly (through (int)though) but if the value is <0 then the method looks up the record with the uid equal to abs($pid) (positive number) and returns the PID of that record! The idea is that negative numbers point to the record AFTER WHICH the position is supposed to be!
Returns
‪int

should only be used from within DataHandler

Definition at line 8691 of file DataHandler.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ resolveSortingAndPidForNewRecord()

array TYPO3\CMS\Core\DataHandling\DataHandler::resolveSortingAndPidForNewRecord ( string  $table,
int  $pid,
array  $fieldArray 
)
protected

Sets the "sorting" DB field and the "pid" field of an incoming record that should be added (NEW1234) depending on the record that should be added or where it should be added.

This method is called from process_datamap()

Parameters
string$table‪the table name of the record to insert
int$pid‪the real PID (numeric) where the record should be
array$fieldArray‪field+value pairs to add
Returns
‪array the modified field array

Definition at line 1120 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Core\DataHandling\DataHandler\getDefaultLanguagePageId(), TYPO3\CMS\Core\DataHandling\DataHandler\getSortNumber(), and TYPO3\CMS\Core\DataHandling\DataHandler\recordInfo().

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ resolveVersionedRecords()

array TYPO3\CMS\Core\DataHandling\DataHandler::resolveVersionedRecords (   $tableName,
  $fieldNames,
  $sortingField,
array  $liveIds 
)
protected

Resolves versioned records for the current workspace scope. Delete placeholders are substituted and removed.

Parameters
string$tableName‪Name of the table to be processed
string$fieldNames‪List of the field names to be fetched
string$sortingField‪Name of the sorting field to be used
array$liveIds‪Flat array of (live) record ids
Returns
‪array

Definition at line 9304 of file DataHandler.php.

◆ setControl()

TYPO3\CMS\Core\DataHandling\DataHandler::setControl ( array  $control)

Definition at line 503 of file DataHandler.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\$control.

◆ setCorrelationId()

TYPO3\CMS\Core\DataHandling\DataHandler::setCorrelationId ( CorrelationId  $correlationId)

Definition at line 9620 of file DataHandler.php.

◆ setDefaultsFromUserTS()

TYPO3\CMS\Core\DataHandling\DataHandler::setDefaultsFromUserTS (   $userTS)

Initializes default values coming from user TSconfig

Parameters
array$userTS‪User TSconfig array

should only be used from within DataHandler

Definition at line 596 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\applyDefaultsForFieldArray(), and TYPO3\CMS\Core\DataHandling\DataHandler\start().

◆ setHistory()

TYPO3\CMS\Core\DataHandling\DataHandler::setHistory (   $table,
  $id 
)

Setting sys_history record, based on content previously set in $this->historyRecords[$table . ':' . $id] (by compareFieldArrayWithCurrentAndUnset())

This functionality is now moved into the RecordHistoryStore and can be used instead.

Parameters
string$table‪Table name
int$id‪Record ID

should only be used from within DataHandler

Definition at line 7686 of file DataHandler.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ setMirror()

TYPO3\CMS\Core\DataHandling\DataHandler::setMirror (   $mirror)

Function that can mirror input values in datamap-array to other uid numbers. Example: $mirror[table][11] = '22,33' will look for content in $this->datamap[table][11] and copy it to $this->datamap[table][22] and $this->datamap[table][33]

Parameters
array$mirror‪This array has the syntax $mirror[table_name][uid] = [list of uids to copy data-value TO!]

Definition at line 569 of file DataHandler.php.

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

◆ setNullValues()

TYPO3\CMS\Core\DataHandling\DataHandler::setNullValues ( array  $active,
array &  $haystack 
)
protected

Sets NULL values in haystack array. The general behaviour in the user interface is to enable/activate fields. Thus, this method uses NULL as value to be stored if a field is not active.

Parameters
array$active‪hierarchical array with active elements
array$haystack‪hierarchical array with haystack to be modified

Definition at line 9603 of file DataHandler.php.

◆ sortAndDeleteFlexSectionContainerElements()

TYPO3\CMS\Core\DataHandling\DataHandler::sortAndDeleteFlexSectionContainerElements ( array  $valueArray,
array  $dataStructure 
)
private

Delete and resort section container elements.

Todo:
‪: It would be better if the magic _ACTION key would be a 'command array', not part of 'data array'

Definition at line 2550 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFlex().

◆ start()

TYPO3\CMS\Core\DataHandling\DataHandler::start ( array  $dataMap,
array  $commandMap,
?BackendUserAuthentication  $backendUser = null 
)

Initializing. For details, see 'TYPO3 Core API' document. This method does not start the processing of data, but merely initializes the object.

Parameters
array$dataMap‪Data to be modified or inserted in the database
array$commandMap‪Commands to copy, move, delete, localize, versionize records.
BackendUserAuthentication | null$backendUser‪An alternative user, default is $GLOBALS['BE_USER']

Definition at line 517 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Core\DataHandling\Model\CorrelationId\forScope(), TYPO3\CMS\Core\DataHandling\DataHandler\getExcludeListArray(), TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Core\DataHandling\DataHandler\setDefaultsFromUserTS().

Referenced by TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest\logFormatsDetailMessageWithAdditionalDataInLocalErrorArray(), TYPO3\CMS\Core\Tests\Unit\DataHandling\DataHandlerTest\logFormatsDetailMessageWithPlaceholders(), TYPO3\CMS\Tstemplate\Controller\ConstantEditorController\saveAction(), and TYPO3\CMS\Tstemplate\Controller\ActiveTypoScriptController\updateAction().

◆ tableAdminOnly()

bool TYPO3\CMS\Core\DataHandling\DataHandler::tableAdminOnly (   $table)

Checks if the $table is only editable by admin-users

Parameters
string$table‪Table name
Returns
‪bool TRUE, if readonly

should only be used from within DataHandler

Definition at line 7239 of file DataHandler.php.

References $GLOBALS.

◆ tableReadOnly()

bool TYPO3\CMS\Core\DataHandling\DataHandler::tableReadOnly (   $table)

Checks if the $table is readOnly

Parameters
string$table‪Table name
Returns
‪bool TRUE, if readonly

should only be used from within DataHandler

Definition at line 7226 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ undeleteRecord()

TYPO3\CMS\Core\DataHandling\DataHandler::undeleteRecord ( string  $table,
int  $uid 
)
protected

Restore live records by setting soft-delete flag to 0.

Usually only used by ext:recycler. Connected relations (eg. inline) are restored, too. Additional existing localizations are not restored.

Parameters
string$table‪Record table name
int$uid‪Record uid

Definition at line 5648 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, and TYPO3\CMS\Webhooks\Message\$uid.

◆ undeleteRecordRelations()

TYPO3\CMS\Core\DataHandling\DataHandler::undeleteRecordRelations ( string  $table,
int  $uid,
array  $record 
)
protected

Check if a to-restore record has inline references and restore them.

Parameters
string$table‪Record table name
int$uid‪Record uid
array$record‪Record row
Todo:
‪: Add functional test undelete coverage to verify details, some details seem to be missing.

Definition at line 5770 of file DataHandler.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$record, and TYPO3\CMS\Webhooks\Message\$uid.

◆ unsetElementsToBeDeleted()

TYPO3\CMS\Core\DataHandling\DataHandler::unsetElementsToBeDeleted ( array  $elements)
protected

Unsets elements (e.g. of the data map) that shall be deleted. This avoids to modify records that will be deleted later on.

Parameters
array$elements‪Elements to be modified

Definition at line 9550 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ updateDB()

TYPO3\CMS\Core\DataHandling\DataHandler::updateDB (   $table,
  $id,
  $fieldArray 
)

Update database record Does not check permissions but expects them to be verified on beforehand

Parameters
string$table‪Record table name
int$id‪Record uid
array$fieldArray‪Array of field=>value pairs to insert. FIELDS MUST MATCH the database FIELDS. No check is done.

should only be used from within DataHandler

Definition at line 7543 of file DataHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ updateFlexFormData()

TYPO3\CMS\Core\DataHandling\DataHandler::updateFlexFormData (   $flexFormId,
array  $modifications 
)
protected

Updates FlexForm data.

Parameters
string$flexFormId‪e.g.
‪<uid>:<field>
array$modifications‪Modifications with paths and values (e.g. 'sDEF/lDEV/field/vDEF' => 'TYPO3')

Definition at line 6857 of file DataHandler.php.

References TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Core\Utility\ArrayUtility\setValueByPath(), and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

◆ updateRefIndex()

TYPO3\CMS\Core\DataHandling\DataHandler::updateRefIndex (   $table,
  $uid,
int  $workspace = null 
)

Register a table/uid combination in current user workspace for reference updating. Should be called on almost any update to a record which could affect references inside the record.

Parameters
string$table‪Table name
int$uid‪Record UID
int$workspace‪Workspace the record lives in

should only be used from within DataHandler

Definition at line 7719 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\updateL10nOverlayRecordsOnPublish(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\updateReferenceIndexForL10nOverlays(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ validateValueForRequired()

bool TYPO3\CMS\Core\DataHandling\DataHandler::validateValueForRequired ( array  $tcaFieldConfig,
mixed  $value 
)
protected

Checks if required=true is set: if set: checks if the value is not empty (or not "0"). if not set: does not matter, always returns true:

Todo:
‪: If this requirement is not fulfilled, DataHandler should not execute any write statements, which could be properly covered by tests then
Returns
‪bool true if the required flag is set and the value is properly set, or if the required flag is not needed (and thus always valid).

Definition at line 2999 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForColor(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForDatetime(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForEmail(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForInput(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForJson(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForLink(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForNumber(), TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForPassword(), and TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForText().

◆ versionizeRecord()

int null TYPO3\CMS\Core\DataHandling\DataHandler::versionizeRecord (   $table,
  $id,
  $label,
  $delete = false 
)

Creates a new version of a record (Requires support in the table)

Parameters
string$table‪Table name
int$id‪Record uid to versionize
string$label‪Version label
bool$delete‪If TRUE, the version is created to delete the record.
Returns
‪int|null Returns the id of the new version (if any)
See also
copyRecord()

should only be used from within DataHandler

Definition at line 6173 of file DataHandler.php.

References $GLOBALS, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction().

◆ versionPublishManyToManyRelations()

TYPO3\CMS\Core\DataHandling\DataHandler::versionPublishManyToManyRelations ( string  $table,
array  $liveRecord,
array  $workspaceRecord,
int  $fromWorkspace 
)

Handle MM relations attached to a record when publishing a workspace record.

Strategy:

  • ‪Find all MM tables the record can be attached to by scanning TCA. Handle flex form "first level" fields too, but skip scanning for MM relations in container sections, since core does not support that since v7 - FormEngine throws an exception in this case.
  • ‪For each found MM table: Delete current MM rows of the live record, and update MM rows of the workspace record to now point to the live record.

should only be used from within DataHandler

Definition at line 6254 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ workspaceAllowAutoCreation()

bool TYPO3\CMS\Core\DataHandling\DataHandler::workspaceAllowAutoCreation ( string  $table,
  $id,
  $recpid 
)
protected

Evaluates if auto creation of a version of a record is allowed. Auto-creation of version: In offline workspace, test if versioning is enabled and look for workspace version of input record. If there is no versionized record found we will create one and save to that.

Parameters
string$table‪Table of the record
int$id‪UID of record
int | null$recpid‪PID of record
Returns
‪bool TRUE if ok.

should only be used from within TYPO3 Core

Definition at line 9343 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ workspaceCannotEditOfflineVersion()

string TYPO3\CMS\Core\DataHandling\DataHandler::workspaceCannotEditOfflineVersion ( string  $table,
array  $record 
)

Evaluates if a user is allowed to edit the offline version

Parameters
string$table‪Table of record
array$record‪array where fields are at least: pid, t3ver_wsid, t3ver_stage (if versioningWS is set)
Returns
‪string String error code, telling the failure state. FALSE=All ok
See also
workspaceCannotEditRecord()

this method will be moved to EXT:workspaces

Definition at line 9372 of file DataHandler.php.

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

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_setStage().

◆ workspaceCannotEditRecord()

string false TYPO3\CMS\Core\DataHandling\DataHandler::workspaceCannotEditRecord (   $table,
  $recData 
)

Checking if editing of an existing record is allowed in current workspace if that is offline. Rules for editing in offline mode:

  • ‪record supports versioning and is an offline version from workspace and has the current stage
  • ‪or record (any) is in a branch where there is a page which is a version from the workspace and where the stage is not preventing records
Parameters
string$table‪Table of record
array | int$recData‪Integer (record uid) or array where fields are at least: pid, t3ver_wsid, t3ver_oid, t3ver_stage (if versioningWS is set)
Returns
‪string|false String error code, telling the failure state. FALSE=All ok

should only be used from within TYPO3 Core

Definition at line 9393 of file DataHandler.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord(), and TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

Member Data Documentation

◆ $admin

bool TYPO3\CMS\Core\DataHandling\DataHandler::$admin

Will be set if user is admin

should only be used from within TYPO3 Core

Definition at line 294 of file DataHandler.php.

◆ $autoVersionIdMap

array TYPO3\CMS\Core\DataHandling\DataHandler::$autoVersionIdMap = []

Definition at line 217 of file DataHandler.php.

◆ $BE_USER

BackendUserAuthentication TYPO3\CMS\Core\DataHandling\DataHandler::$BE_USER

The user-object the script uses. If not set from outside, this is set to the current global $BE_USER.

Definition at line 280 of file DataHandler.php.

◆ $bypassAccessCheckForRecords

bool TYPO3\CMS\Core\DataHandling\DataHandler::$bypassAccessCheckForRecords = false

If TRUE, access check, check for deleted etc. for records is bypassed. YOU MUST KNOW what you are doing if you use this feature!

Definition at line 157 of file DataHandler.php.

◆ $bypassWorkspaceRestrictions

bool TYPO3\CMS\Core\DataHandling\DataHandler::$bypassWorkspaceRestrictions = false

If TRUE, workspace restrictions are bypassed on edit and create actions (process_datamap()). YOU MUST KNOW what you do if you use this feature!

should only be used from within TYPO3 Core

Definition at line 151 of file DataHandler.php.

◆ $cacheManager

readonly CacheManager TYPO3\CMS\Core\DataHandling\DataHandler::$cacheManager
private

Definition at line 471 of file DataHandler.php.

◆ $callBackObj

object TYPO3\CMS\Core\DataHandling\DataHandler::$callBackObj = null

Object. Call back object for FlexForm traversal. Useful when external classes wants to use the iteration functions inside DataHandler for traversing a FlexForm structure.

should only be used from within TYPO3 Core

Definition at line 200 of file DataHandler.php.

◆ $checkModifyAccessListHookObjects

array TYPO3\CMS\Core\DataHandling\DataHandler::$checkModifyAccessListHookObjects = null
protected

◆ $checkStoredRecords

TYPO3\CMS\Core\DataHandling\DataHandler::$checkStoredRecords = true

Definition at line 119 of file DataHandler.php.

◆ $checkStoredRecords_loose

TYPO3\CMS\Core\DataHandling\DataHandler::$checkStoredRecords_loose = true

Definition at line 121 of file DataHandler.php.

◆ $checkValue_currentRecord

array TYPO3\CMS\Core\DataHandling\DataHandler::$checkValue_currentRecord = array( )

Set to "currentRecord" during checking of values.

Definition at line 445 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\checkValueForFlex().

◆ $cmdmap

array TYPO3\CMS\Core\DataHandling\DataHandler::$cmdmap = []

Definition at line 327 of file DataHandler.php.

◆ $connectionPool

readonly ConnectionPool TYPO3\CMS\Core\DataHandling\DataHandler::$connectionPool
private

Definition at line 473 of file DataHandler.php.

◆ $control

array TYPO3\CMS\Core\DataHandling\DataHandler::$control = []
protected

Data submitted from the form view, used to control behaviours, e.g. this is used to activate/deactivate fields and thus store NULL values

Definition at line 307 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\setControl().

◆ $copyMappingArray

array TYPO3\CMS\Core\DataHandling\DataHandler::$copyMappingArray = []

Definition at line 407 of file DataHandler.php.

◆ $copyMappingArray_merged

array TYPO3\CMS\Core\DataHandling\DataHandler::$copyMappingArray_merged = []

This array is the sum of all copying operations in this class.

should only be used from within TYPO3 Core

Definition at line 245 of file DataHandler.php.

◆ $copyTree

int TYPO3\CMS\Core\DataHandling\DataHandler::$copyTree = 0

If 0 then branch is NOT copied. If 1 then pages on the 1st level is copied. If 2 then pages on the second level is copied ... and so on

Definition at line 173 of file DataHandler.php.

◆ $copyWhichTables

string TYPO3\CMS\Core\DataHandling\DataHandler::$copyWhichTables = '*'

Comma-separated list. This list of tables decides which tables will be copied. If empty then none will. If '*' then all will (that the user has permission to of course)

should only be used from within TYPO3 Core

Definition at line 165 of file DataHandler.php.

◆ $correlationId

CorrelationId TYPO3\CMS\Core\DataHandling\DataHandler::$correlationId = null
protected

A string which can be used as correlationId for RecordHistory entries. The string can later be used to rollback multiple changes at once.

Definition at line 206 of file DataHandler.php.

◆ $datamap

array TYPO3\CMS\Core\DataHandling\DataHandler::$datamap = []

Definition at line 317 of file DataHandler.php.

◆ $dbAnalysisStore

array TYPO3\CMS\Core\DataHandling\DataHandler::$dbAnalysisStore = []

For accumulation of MM relations that must be written after new records are created.

Definition at line 379 of file DataHandler.php.

◆ $defaultValues

array TYPO3\CMS\Core\DataHandling\DataHandler::$defaultValues = []

[table][fields]=value: New records are created with default values and you can set this array on the form $defaultValues[$table][$field] = $value to override the default values fetched from TCA. If ->setDefaultsFromUserTS is called UserTSconfig default values will overrule existing values in this array (thus UserTSconfig overrules externally set defaults which overrules TCA defaults)

should only be used from within TYPO3 Core

Definition at line 183 of file DataHandler.php.

◆ $deletedRecords

array TYPO3\CMS\Core\DataHandling\DataHandler::$deletedRecords = []
protected

Per-table array with UIDs that have been deleted.

Definition at line 250 of file DataHandler.php.

◆ $disableDeleteClause

bool TYPO3\CMS\Core\DataHandling\DataHandler::$disableDeleteClause = false
protected

Disable delete clause

Definition at line 450 of file DataHandler.php.

◆ $dontProcessTransformations

bool TYPO3\CMS\Core\DataHandling\DataHandler::$dontProcessTransformations = false

If set, then transformations are NOT performed on the input.

Definition at line 136 of file DataHandler.php.

◆ $enableLogging

bool TYPO3\CMS\Core\DataHandling\DataHandler::$enableLogging = true

If TRUE, actions are logged to sys_log.

Definition at line 110 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap().

◆ $errorLog

array TYPO3\CMS\Core\DataHandling\DataHandler::$errorLog = []

Errors are collected in this variable.

should only be used from within TYPO3 Core

Definition at line 257 of file DataHandler.php.

◆ $excludedTablesAndFields

array TYPO3\CMS\Core\DataHandling\DataHandler::$excludedTablesAndFields = []
protected

The list of

<fields> that cannot be edited by user. This is compiled from TCA/exclude-flag combined with non_exclude_fields for the user.

Definition at line 301 of file DataHandler.php.

◆ $historyRecords

array TYPO3\CMS\Core\DataHandling\DataHandler::$historyRecords = []
protected

List of changed old record ids to new records ids

Definition at line 337 of file DataHandler.php.

◆ $isImporting

bool TYPO3\CMS\Core\DataHandling\DataHandler::$isImporting = false

If set, then the TCE class has been instantiated during an import action of a T3D

Definition at line 131 of file DataHandler.php.

◆ $isInWebMount_Cache

array TYPO3\CMS\Core\DataHandling\DataHandler::$isInWebMount_Cache = []
protected

Caching array for page ids in webmounts

Definition at line 364 of file DataHandler.php.

◆ $isRecordInWebMount_Cache

array TYPO3\CMS\Core\DataHandling\DataHandler::$isRecordInWebMount_Cache = []
protected

Caching array for check of whether records are in a webmount

Definition at line 359 of file DataHandler.php.

◆ $mmHistoryRecords

array TYPO3\CMS\Core\DataHandling\DataHandler::$mmHistoryRecords = []
protected

List of changed old record ids to new records ids

Definition at line 332 of file DataHandler.php.

◆ $neverHideAtCopy

bool TYPO3\CMS\Core\DataHandling\DataHandler::$neverHideAtCopy = false

If set, then the 'hideAtCopy' flag for tables will be ignored.

Definition at line 126 of file DataHandler.php.

◆ $newRelatedIDs

array TYPO3\CMS\Core\DataHandling\DataHandler::$newRelatedIDs = []

Holds the tables and there the ids of newly created child records from IRRE

should only be used from within TYPO3 Core

Definition at line 238 of file DataHandler.php.

◆ $outerMostInstance

self TYPO3\CMS\Core\DataHandling\DataHandler::$outerMostInstance = null
protected

The outermost instance of \TYPO3\CMS\Core\DataHandling\DataHandler: This object instantiates itself on versioning and localization ...

Definition at line 458 of file DataHandler.php.

◆ $pageCache

array TYPO3\CMS\Core\DataHandling\DataHandler::$pageCache = []
protected

Definition at line 371 of file DataHandler.php.

◆ $pagePermissionAssembler

PagePermissionAssembler TYPO3\CMS\Core\DataHandling\DataHandler::$pagePermissionAssembler
protected

Definition at line 296 of file DataHandler.php.

◆ $pagetreeNeedsRefresh

bool TYPO3\CMS\Core\DataHandling\DataHandler::$pagetreeNeedsRefresh = false

Indicates whether the pagetree needs a refresh because of important changes

should only be used from within TYPO3 Core

Definition at line 269 of file DataHandler.php.

◆ $pagetreeRefreshFieldsFromPages

array TYPO3\CMS\Core\DataHandling\DataHandler::$pagetreeRefreshFieldsFromPages = ['pid', 'sorting', 'deleted', 'hidden', 'title', 'doktype', 'is_siteroot', 'fe_group', 'nav_hide', 'nav_title', 'module', 'starttime', 'endtime', 'content_from_pid', 'extendToSubpages']

Fields from the pages-table for which changes will trigger a pagetree refresh

Definition at line 262 of file DataHandler.php.

◆ $recInsertAccessCache

array TYPO3\CMS\Core\DataHandling\DataHandler::$recInsertAccessCache = []
protected

User by function checkRecordInsertAccess() to store whether a record can be inserted on a page id

Definition at line 354 of file DataHandler.php.

◆ $recordPidsForDeletedRecords

array TYPO3\CMS\Core\DataHandling\DataHandler::$recordPidsForDeletedRecords = []
staticprotected

Internal cache for pids of records which were deleted. It's not possible to retrieve the parent folder/page at a later stage

Definition at line 469 of file DataHandler.php.

◆ $recordsToClearCacheFor

array TYPO3\CMS\Core\DataHandling\DataHandler::$recordsToClearCacheFor = []
staticprotected

Internal cache for collecting records that should trigger cache clearing

Definition at line 463 of file DataHandler.php.

◆ $referenceIndexUpdater

ReferenceIndexUpdater TYPO3\CMS\Core\DataHandling\DataHandler::$referenceIndexUpdater
protected

Registry object to gather reference index update requests and perform updates after main processing has been done. It is created upon first __construct() call and hand over when dealing with internal sub instances. The final update() call is done at the end of process_cmdmap() or process_datamap() in the outermost instance.

Definition at line 436 of file DataHandler.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\__construct().

◆ $registerDBList

array TYPO3\CMS\Core\DataHandling\DataHandler::$registerDBList = []

◆ $registerDBPids

array TYPO3\CMS\Core\DataHandling\DataHandler::$registerDBPids = []

Used for tracking references that might need correction in pid field after operations (e.g. IRRE)

Definition at line 394 of file DataHandler.php.

◆ $remapStack

array TYPO3\CMS\Core\DataHandling\DataHandler::$remapStack = []

Array used for remapping uids and values at the end of process_datamap

Definition at line 414 of file DataHandler.php.

◆ $remapStackActions

array TYPO3\CMS\Core\DataHandling\DataHandler::$remapStackActions = []
protected

Array used for executing addition actions after remapping happened (set processRemapStack())

Definition at line 427 of file DataHandler.php.

◆ $remapStackRecords

array TYPO3\CMS\Core\DataHandling\DataHandler::$remapStackRecords = []

Array used for remapping uids and values at the end of process_datamap (e.g. $remapStackRecords[

[<uid>] = <index in $remapStack>)

Definition at line 422 of file DataHandler.php.

◆ $reverseOrder

bool TYPO3\CMS\Core\DataHandling\DataHandler::$reverseOrder = false

If TRUE, the datamap array is reversed in the order, which is a nice thing if you're creating a whole new bunch of records.

Definition at line 116 of file DataHandler.php.

◆ $runtimeCache

readonly FrontendInterface TYPO3\CMS\Core\DataHandling\DataHandler::$runtimeCache
private

Definition at line 472 of file DataHandler.php.

◆ $sortIntervals

int TYPO3\CMS\Core\DataHandling\DataHandler::$sortIntervals = 256

The interval between sorting numbers used with tables with a 'sorting' field defined.

Min 1, should be power of 2

should only be used from within TYPO3 Core

Definition at line 348 of file DataHandler.php.

◆ $storeLogMessages

bool TYPO3\CMS\Core\DataHandling\DataHandler::$storeLogMessages = true

If TRUE, the default log-messages will be stored. This should not be necessary if the locallang-file for the log-display is properly configured. So disabling this will just save some database-space as the default messages are not saved.

Definition at line 105 of file DataHandler.php.

◆ $substNEWwithIDs

array TYPO3\CMS\Core\DataHandling\DataHandler::$substNEWwithIDs = []

When new elements are created, this array contains a map between their "NEW..." string IDs and the final uid they got when stored in database. This public array is rather important since it is used by many DH consumers to further work with records after creation.

Definition at line 224 of file DataHandler.php.

◆ $substNEWwithIDs_table

array TYPO3\CMS\Core\DataHandling\DataHandler::$substNEWwithIDs_table = []

Like $substNEWwithIDs, but where each old "NEW..." id is mapped to the table it was from.

should only be used from within TYPO3 Core

Definition at line 231 of file DataHandler.php.

◆ $suggestedInsertUids

array TYPO3\CMS\Core\DataHandling\DataHandler::$suggestedInsertUids = []

Use this array to validate suggested uids for tables by setting [table]:[uid]. This is a dangerous option since it will force the inserted record to have a certain UID. The value just have to be TRUE, but if you set it to "DELETE" it will make sure any record with that UID will be deleted first (raw delete). The option is used for import of T3D files when synchronizing between two mirrored servers. As a security measure this feature is available only for Admin Users (for now)

Definition at line 192 of file DataHandler.php.

◆ $userid

int TYPO3\CMS\Core\DataHandling\DataHandler::$userid

Will be set to uid of be_user executing this script

should only be used from within TYPO3 Core

Definition at line 287 of file DataHandler.php.

◆ $useTransOrigPointerField

bool TYPO3\CMS\Core\DataHandling\DataHandler::$useTransOrigPointerField = true
protected

Will distinguish between translations (with parent) and localizations (without parent) while still using the same methods to copy the records TRUE: translation of a record connected to the default language FALSE: localization of a record without connection to the default language

Definition at line 143 of file DataHandler.php.

◆ CACHE_IDENTIFIER_ELEMENTS_TO_BE_DELETED

const TYPO3\CMS\Core\DataHandling\DataHandler::CACHE_IDENTIFIER_ELEMENTS_TO_BE_DELETED = 'core-datahandler-elementsToBeDeleted'
protected

Definition at line 479 of file DataHandler.php.

◆ CACHE_IDENTIFIER_NESTED_ELEMENT_CALLS_PREFIX

const TYPO3\CMS\Core\DataHandling\DataHandler::CACHE_IDENTIFIER_NESTED_ELEMENT_CALLS_PREFIX = 'core-datahandler-nestedElementCalls-'
protected

Prefix for the cache entries of nested element calls since the runtimeCache has a global scope.

Definition at line 478 of file DataHandler.php.