TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
DataHandler Class Reference

Public Member Functions

 __construct ()
 
 setControl (array $control)
 
 start ($data, $cmd, $altUserObject=null)
 
 setMirror ($mirror)
 
 setDefaultsFromUserTS ($userTS)
 
 process_uploads ($postFiles)
 
 process_uploads_traverseArray (&$outputArr, $inputArr, $keyToSet)
 
 hook_processDatamap_afterDatabaseOperations (&$hookObjectsArr, &$status, &$table, &$id, &$fieldArray)
 
 placeholderShadowing ($table, $id)
 
 getPlaceholderTitleForTableLabel ($table, $placeholderContent=null)
 
 fillInFieldArray ($table, $id, $fieldArray, $incomingFieldArray, $realPid, $status, $tscPID)
 
 checkValue ($table, $field, $value, $id, $status, $realPid, $tscPID)
 
 checkValue_SW ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $uploadedFiles, $tscPID, array $additionalData=null)
 
 checkValue_inline ($res, $value, $tcaFieldConf, $PP, $field, array $additionalData=null)
 
 checkValueForInline ($res, $value, $tcaFieldConf, $table, $id, $status, $field, array $additionalData=null)
 
 checkValue_checkMax ($tcaFieldConf, $valueArray)
 
 getUnique ($table, $field, $value, $id, $newPid=0)
 
 getRecordsWithSameValue ($tableName, $uid, $fieldName, $value, $pageId=0)
 
 checkValue_text_Eval ($value, $evalArray, $is_in)
 
 checkValue_input_Eval ($value, $evalArray, $is_in)
 
 checkValue_group_select_explodeSelectGroupValue ($value)
 
 checkValue_flex_procInData ($dataPart, $dataPart_current, $uploadedFiles, $dataStructure, $pParams, $callBackFunc= '', array $workspaceOptions=[])
 
 checkValue_flex_procInData_travDS (&$dataValues, $dataValues_current, $uploadedFiles, $DSelements, $pParams, $callBackFunc, $structurePath, array $workspaceOptions=[])
 
 copyPages ($uid, $destPid)
 
 copySpecificPage ($uid, $destPid, $copyTablesArray, $first=false)
 
 copyRecord_raw ($table, $uid, $pid, $overrideArray=[], array $workspaceOptions=[])
 
 insertNewCopyVersion ($table, $fieldArray, $realPid)
 
 copyRecord_procBasedOnFieldType ($table, $uid, $field, $value, $row, $conf, $realDestPid, $language=0, array $workspaceOptions=[])
 
 copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $_1, $_2, $_3, $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, $field, $value, $conf)
 
 moveL10nOverlayRecords ($table, $uid, $destPid, $originalRecordDestinationPid)
 
 deleteAction ($table, $id)
 
 deleteEl ($table, $uid, $noRecordCheck=false, $forceHardDelete=false)
 
 deleteVersionsForRecord ($table, $uid, $forceHardDelete)
 
 undeleteRecord ($table, $uid)
 
 deleteRecord ($table, $uid, $noRecordCheck=false, $forceHardDelete=false, $undeleteRecord=false)
 
 deleteSpecificPage ($uid, $forceHardDelete=false)
 
 canDeletePage ($uid)
 
 cannotDeleteRecord ($table, $id)
 
 isRecordUndeletable ($table, $uid)
 
 deleteRecord_procFields ($table, $uid, $undeleteRecord=false)
 
 deleteL10nOverlayRecords ($table, $uid)
 
 versionizeRecord ($table, $id, $label, $delete=false)
 
 version_remapMMForVersionSwap_execSwap ($table, $id, $swapWith)
 
 remapListedDBRecords ()
 
 remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 
 remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid, $table)
 
 processRemapStack ()
 
 addRemapAction ($table, $id, array $callback, array $arguments)
 
 addRemapStackRefIndex ($table, $id)
 
 getVersionizedIncomingFieldArray ($table, $id, &$incomingFieldArray, &$registerDBList)
 
 isRecordInWebMount ($table, $id)
 
 isInWebMount ($pid)
 
 checkRecordUpdateAccess ($table, $id, $data=false, $hookObjectsArr=null)
 
 checkRecordInsertAccess ($insertTable, $pid, $action=1)
 
 isTableAllowedForThisPage ($page_uid, $checkTable)
 
 doesRecordExist ($table, $id, $perms)
 
 doesBranchExist ($inList, $pid, $perms, $recurse)
 
 tableReadOnly ($table)
 
 tableAdminOnly ($table)
 
 destNotInsideSelf ($destinationId, $id)
 
 getExcludeListArray ()
 
 doesPageHaveUnallowedTables ($page_uid, $doktype)
 
 pageInfo ($id, $field)
 
 recordInfo ($table, $id, $fieldList)
 
 getRecordProperties ($table, $id, $noWSOL=false)
 
 getRecordPropertiesFromRow ($table, $row)
 
 eventPid ($table, $uid, $pid)
 
 updateDB ($table, $id, $fieldArray)
 
 insertDB ($table, $id, $fieldArray, $newVersion=false, $suggestedUid=0, $dontSetNewIdIndex=false)
 
 checkStoredRecord ($table, $id, $fieldArray, $action)
 
 setHistory ($table, $id, $logId)
 
 getSortNumber ($table, $uid, $pid)
 
 resorting ($table, $pid, $sortRow, $return_SortNumber_After_This_Uid)
 
 setTSconfigPermissions ($fieldArray, $TSConfig_p)
 
 newFieldArray ($table)
 
 addDefaultPermittedLanguageIfNotSet ($table, &$incomingFieldArray)
 
 overrideFieldArray ($table, $data)
 
 compareFieldArrayWithCurrentAndUnset ($table, $id, $fieldArray)
 
 assemblePermissions ($string)
 
 rmComma ($input)
 
 convNumEntityToByteValue ($input)
 
 destPathFromUploadFolder ($folder)
 
 disableDeleteClause ()
 
 deleteClause ($table)
 
 getTCEMAIN_TSconfig ($tscPID)
 
 getTableEntries ($table, $TSconfig)
 
 getPID ($table, $uid)
 
 dbAnalysisStoreExec ()
 
 removeRegisteredFiles ()
 
 int_pageTreeInfo ($CPtable, $pid, $counter, $rootID)
 
 compileAdminTables ()
 
 fixUniqueInPid ($table, $uid)
 
 fixCopyAfterDuplFields ($table, $uid, $prevUid, $update, $newData=[])
 
 extFileFields ($table)
 
 isReferenceField ($conf)
 
 getInlineFieldType ($conf)
 
 getCopyHeader ($table, $pid, $field, $value, $count, $prevTitle= '')
 
 prependLabel ($table)
 
 resolvePid ($table, $pid)
 
 clearPrefixFromValue ($table, $value)
 
 extFileFunctions ($table, $field, $filelist, $func)
 
 noRecordsFromUnallowedTables ($inList)
 
 isRecordCopied ($table, $uid)
 
 registerRecordIdForPageCacheClearing ($table, $uid, $pid=null)
 
 clear_cacheCmd ($cacheCmd)
 
 log ($table, $recuid, $action, $recpid, $error, $details, $details_nr=-1, $data=[], $event_pid=-1, $NEWid= '')
 
 newlog ($message, $error=0)
 
 newlog2 ($message, $table, $uid, $pid=null, $error=0)
 
 insertUpdateDB_preprocessBasedOnFieldType ($table, $fieldArray)
 
 hasDeletedRecord ($tableName, $uid)
 
 getAutoVersionId ($table, $id)
 
 isOuterMostInstance ()
 

Public Attributes

 $storeLogMessages = true
 
 $enableLogging = true
 
 $reverseOrder = false
 
 $checkSimilar = true
 
 $checkStoredRecords = true
 
 $checkStoredRecords_loose = true
 
 $deleteTree = false
 
 $neverHideAtCopy = false
 
 $isImporting = false
 
 $dontProcessTransformations = false
 
 $updateModeL10NdiffData = true
 
 $updateModeL10NdiffDataClear = false
 
 $bypassWorkspaceRestrictions = false
 
 $bypassFileHandling = false
 
 $bypassAccessCheckForRecords = false
 
 $copyWhichTables = '*'
 
 $copyTree = 0
 
 $defaultValues = []
 
 $overrideValues = []
 
 $alternativeFileName = []
 
 $alternativeFilePath = []
 
 $data_disableFields = []
 
 $suggestedInsertUids = []
 
 $callBackObj
 
 $autoVersionIdMap = []
 
 $substNEWwithIDs = []
 
 $substNEWwithIDs_table = []
 
 $newRelatedIDs = []
 
 $copyMappingArray_merged = []
 
 $copiedFileMap = []
 
 $RTEmagic_copyIndex = []
 
 $errorLog = []
 
 $pagetreeRefreshFieldsFromPages = ['pid', 'sorting', 'deleted', 'hidden', 'title', 'doktype', 'is_siteroot', 'fe_group', 'nav_hide', 'nav_title', 'module', 'starttime', 'endtime', 'content_from_pid']
 
 $pagetreeNeedsRefresh = false
 
 $BE_USER
 
 $userid
 
 $username
 
 $admin
 
 $defaultPermissions
 
 $datamap = []
 
 $cmdmap = []
 
 $pMap
 
 $sortIntervals = 256
 
 $recUpdateAccessCache = []
 
 $recInsertAccessCache = []
 
 $isRecordInWebMount_Cache = []
 
 $isInWebMount_Cache = []
 
 $cachedTSconfig = []
 
 $pageCache = []
 
 $checkWorkspaceCache = []
 
 $dbAnalysisStore = []
 
 $removeFilesStore = []
 
 $uploadedFileArray = []
 
 $registerDBList = []
 
 $registerDBPids = []
 
 $copyMappingArray = []
 
 $remapStack = []
 
 $remapStackRecords = []
 
 $updateRefIndexStack = []
 
 $callFromImpExp = false
 
 $newIndexMap = []
 
 $fileFunc
 
 $checkValue_currentRecord = []
 
 $autoVersioningUpdate = false
 

Protected Member Functions

 getCheckModifyAccessListHookObjects ()
 
 transformRichtextContentToDatabase ($value, $table, $field, $defaultExtras, $thisConfig, $pid)
 
 checkValueForText ($value, $tcaFieldConf)
 
 checkValueForInput ($value, $tcaFieldConf, $table, $id, $realPid, $field)
 
 checkValueForRadio ($res, $value, $tcaFieldConf, $table, $id, $pid, $field)
 
 checkValueForGroupSelect ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $recFID, $uploadedFiles, $field)
 
 applyFiltersToValues (array $tcaFieldConfiguration, array $values)
 
 checkValueForFlex ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $tscPID, $uploadedFiles, $field)
 
 _ACTION_FLEX_FORMdata (&$valueArray, $actionCMDs)
 
 getUniqueCountStatement (string $value, string $table, string $field, int $uid, int $pid)
 
 getLocalTCE ()
 
 updateFlexFormData ($flexFormId, array $modifications)
 
 triggerRemapAction ($table, $id, array $callback, array $arguments, $forceRemapStackActions=false)
 
 doesRecordExist_pageLookUp ($id, $perms)
 
 getPreviousLocalizedRecordUid ($table, $uid, $pid, $language)
 
 isSubmittedValueEqualToStoredValue ($submittedValue, $storedValue, $storedType, $allowNull=false)
 
 addDeleteRestriction (QueryRestrictionContainerInterface $restrictions)
 
 getOriginalParentOfRecord ($table, $uid)
 
 castReferenceValue ($value, array $configuration)
 
 prepareCacheFlush ($table, $uid, $pid)
 
 overlayAutoVersionId ($table, $id)
 
 addNewValuesToRemapStackChildIds (array $idValues)
 
 getOuterMostInstance ()
 
 getRuntimeCache ()
 
 isNestedElementCallRegistered ($table, $id, $identifier)
 
 registerNestedElementCall ($table, $id, $identifier)
 
 resetNestedElementCalls ()
 
 isElementToBeDeleted ($table, $id)
 
 registerElementsToBeDeleted ()
 
 resetElementsToBeDeleted ()
 
 unsetElementsToBeDeleted (array $elements)
 
 getCommandMapElements ($needle)
 
 controlActiveElements ()
 
 setNullValues (array $active, array &$haystack)
 
 getFieldEvalCacheIdentifier ($additionalIdentifier)
 
 createRelationHandlerInstance ()
 
 getCacheManager ()
 
 getResourceFactory ()
 

Protected Attributes

 $deletedRecords = []
 
 $excludedTablesAndFields = []
 
 $control = []
 
 $mmHistoryRecords = []
 
 $historyRecords = []
 
 $remapStackChildIds = []
 
 $remapStackActions = []
 
 $remapStackRefIndex = []
 
 $disableDeleteClause = false
 
 $checkModifyAccessListHookObjects
 
 $version_remapMMForVersionSwap_reg
 
 $outerMostInstance = null
 
 $runtimeCache = null
 
 $cachePrefixNestedElementCalls = 'core-datahandler-nestedElementCalls-'
 

Static Protected Attributes

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

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.php script which provides an the interface for POST forms to this class.

Dependencies:

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

tce_db.php for further comments and SYNTAX! Also see document 'TYPO3 Core API' for details.

Definition at line 60 of file DataHandler.php.

Constructor & Destructor Documentation

__construct ( )

Definition at line 690 of file DataHandler.php.

References DataHandler\getRuntimeCache().

Member Function Documentation

_ACTION_FLEX_FORMdata ( $valueArray,
  $actionCMDs 
)
protected

Actions for flex form element (move, delete) allows to remove and move flexform sections

Parameters
array$valueArrayby reference
array$actionCMDs

Definition at line 2425 of file DataHandler.php.

Referenced by DataHandler\checkValueForFlex().

addDefaultPermittedLanguageIfNotSet (   $table,
$incomingFieldArray 
)

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.

Parameters
string$tableTable name
array$incomingFieldArrayIncoming array (passed by reference)
Returns
void

Definition at line 7324 of file DataHandler.php.

References GeneralUtility\makeInstance().

addNewValuesToRemapStackChildIds ( array  $idValues)
protected

Adds new values to the remapStackChildIds array.

Parameters
array$idValuesuid values
Returns
void

Definition at line 8583 of file DataHandler.php.

Referenced by DataHandler\checkValueForGroupSelect(), and DataHandler\checkValueForInline().

addRemapAction (   $table,
  $id,
array  $callback,
array  $arguments 
)

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

Parameters
string$tableThe affected table
int$idThe affected ID
array$callbackThe callback information (object and method)
array$argumentsThe arguments to be used with the callback
Returns
void

Definition at line 6143 of file DataHandler.php.

Referenced by DataHandler\triggerRemapAction(), and DataHandlerHook\version_swap_processFields().

addRemapStackRefIndex (   $table,
  $id 
)

Adds a table-id-pair to the reference index remapping stack.

Parameters
string$table
int$id
Returns
void

Definition at line 6162 of file DataHandler.php.

applyFiltersToValues ( array  $tcaFieldConfiguration,
array  $values 
)
protected

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

Parameters
array$tcaFieldConfiguration
array$values
Returns
array|mixed
Exceptions
RuntimeException

Definition at line 2023 of file DataHandler.php.

References GeneralUtility\callUserFunction().

Referenced by DataHandler\checkValueForGroupSelect().

assemblePermissions (   $string)

Calculates the bitvalue of the permissions given in a string, comma-separated

Parameters
string$stringList of pMap strings
Returns
int Integer mask
See also
setTSconfigPermissions(), newFieldArray()

Definition at line 7465 of file DataHandler.php.

References GeneralUtility\trimExplode().

Referenced by DataHandler\newFieldArray(), and DataHandler\setTSconfigPermissions().

canDeletePage (   $uid)

Used to evaluate if a page can be deleted

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

Definition at line 5247 of file DataHandler.php.

References DataHandler\doesBranchExist(), DataHandler\doesRecordExist(), DataHandler\noRecordsFromUnallowedTables(), and GeneralUtility\trimExplode().

Referenced by DataHandler\cannotDeleteRecord().

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$tableRecord Table
int$idRecord UID
Returns
string Returns a string IF there is an error (error string explaining). FALSE means record can be deleted

Definition at line 5300 of file DataHandler.php.

References DataHandler\canDeletePage(), and DataHandler\doesRecordExist().

Referenced by DataHandler\versionizeRecord().

castReferenceValue (   $value,
array  $configuration 
)
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$valueThe value to be casted (e.g. '', '0', '1,2,3')
array$configurationThe TCA configuration of the accordant field
Returns
int|string

Definition at line 7829 of file DataHandler.php.

Referenced by DataHandler\checkValueForGroupSelect(), and DataHandler\processRemapStack().

checkRecordInsertAccess (   $insertTable,
  $pid,
  $action = 1 
)

Checks if user may insert a record from $insertTable on $pid Does not check for workspace, use BE_USER->workspaceAllowLiveRecordsInPID for this in addition to this function call.

Parameters
string$insertTableTablename to check
int$pidInteger PID
int$actionFor logging: Action number.
Returns
bool Returns TRUE if the user may insert a record from table $insertTable on page $pid

Definition at line 6301 of file DataHandler.php.

References DataHandler\doesRecordExist(), DataHandler\getRecordProperties(), BackendUtility\isRootLevelRestrictionIgnored(), DataHandler\isTableAllowedForThisPage(), and DataHandler\log().

Referenced by DataHandler\moveRecord().

checkRecordUpdateAccess (   $table,
  $id,
  $data = false,
  $hookObjectsArr = null 
)

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

Parameters
string$tableRecord table
int$idRecord UID
array | bool$dataRecord data
array$hookObjectsArrHook objects
Returns
bool Returns TRUE if the user may update the record given by $table and $id

Definition at line 6264 of file DataHandler.php.

References DataHandler\doesRecordExist().

Referenced by DataHandler\moveRecord(), DataHandlerHook\version_clearWSID(), and DataHandlerHook\version_setStage().

checkStoredRecord (   $table,
  $id,
  $fieldArray,
  $action 
)

Checking stored record to see if the written values are properly updated.

Parameters
string$tableRecord table name
int$idRecord uid
array$fieldArrayArray of field=>value pairs to insert/update
string$actionAction, for logging only.
Returns
array|NULL Selected row
See also
insertDB(), updateDB()

Definition at line 6922 of file DataHandler.php.

References DataHandler\log(), and GeneralUtility\makeInstance().

Referenced by DataHandler\insertDB(), and DataHandler\updateDB().

checkValue (   $table,
  $field,
  $value,
  $id,
  $status,
  $realPid,
  $tscPID 
)

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! (files are copied and so on) 2) That files registered for deletion IS deleted at the end (with ->removeRegisteredFiles() )

Parameters
string$tableTable name
string$fieldField name
string$valueValue 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.
string$idThe record-uid, mainly - but not exclusively - used for logging
string$status'update' or 'new' flag
int$realPidThe 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. If $realPid is -1 it means that a new version of the record is being inserted.
int$tscPIDTSconfig PID
Returns
array Returns the evaluated $value as key "value" in this array. Can be checked with isset($res['value']) ...

Definition at line 1587 of file DataHandler.php.

References DataHandler\checkValue_SW(), DataHandler\doesPageHaveUnallowedTables(), DataHandler\getRecordProperties(), GeneralUtility\inList(), DataHandler\log(), and DataHandler\recordInfo().

Referenced by DataHandler\fillInFieldArray(), and DataHandler\insertNewCopyVersion().

checkValue_checkMax (   $tcaFieldConf,
  $valueArray 
)

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

Parameters
array$tcaFieldConfField configuration from TCA
array$valueArrayCurrent value array of items
Returns
array The truncated value array of items

Definition at line 2527 of file DataHandler.php.

Referenced by DataHandler\checkValueForGroupSelect(), and DataHandler\processRemapStack().

checkValue_flex_procInData (   $dataPart,
  $dataPart_current,
  $uploadedFiles,
  $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

Parameters
array$dataPartThe 'data' part of the INPUT flexform data
array$dataPart_currentThe 'data' part of the CURRENT flexform data
array$uploadedFilesThe uploaded files for the 'data' part of the INPUT flexform data
array$dataStructureData 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$pParamsA set of parameters to pass through for the calling of the evaluation functions
string$callBackFuncOptional call back function, see checkValue_flex_procInData_travDS() DEPRECATED, use instead for traversal!
array$workspaceOptions
Returns
array The modified 'data' part.
See also
checkValue_flex_procInData_travDS()

Definition at line 2934 of file DataHandler.php.

References DataHandler\checkValue_flex_procInData_travDS().

Referenced by DataHandler\checkValueForFlex(), DataHandler\copyRecord_procBasedOnFieldType(), and DataHandler\remapListedDBRecords().

checkValue_flex_procInData_travDS ( $dataValues,
  $dataValues_current,
  $uploadedFiles,
  $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$dataValuesNew values (those being processed): Multidimensional Data array for sheet/language, passed by reference!
array$dataValues_currentCurrent values: Multidimensional Data array. May be empty array() if not needed (for callBackFunctions)
array$uploadedFilesUploaded files array for sheet/language. May be empty array() if not needed (for callBackFunctions)
array$DSelementsData structure which fits the data array
array$pParamsA set of parameters to pass through for the calling of the evaluation functions / call back function
string$callBackFuncCall 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
array$workspaceOptions
Returns
void
See also
checkValue_flex_procInData()

Definition at line 2971 of file DataHandler.php.

References DataHandler\checkValue_SW(), BackendUtility\getPagesTSconfig(), BackendUtility\getSpecConfParts(), BackendUtility\getTCAtypeValue(), BackendUtility\RTEsetup(), and DataHandler\transformRichtextContentToDatabase().

Referenced by DataHandler\checkValue_flex_procInData().

checkValue_group_select_explodeSelectGroupValue (   $value)

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

Parameters
string$valueInput 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.

Definition at line 2908 of file DataHandler.php.

References GeneralUtility\trimExplode().

Referenced by DataHandler\checkValueForGroupSelect().

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$resThe result array. The processed value (if any!) is set in the 'value' key.
string$valueThe value to set.
array$tcaFieldConfField configuration from TCA
array$PPAdditional parameters in a numeric array: $table,$id,$curValue,$status,$realPid,$recFID
string$fieldField name
array$additionalDataAdditional data to be forwarded to sub-processors
Returns
array Modified $res array

Definition at line 2469 of file DataHandler.php.

References DataHandler\checkValueForInline().

checkValue_input_Eval (   $value,
  $evalArray,
  $is_in 
)

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

Parameters
string$valueValue to evaluate
array$evalArrayArray of evaluations to traverse.
string$is_inIs-in string for 'is_in' evaluation
Returns
array Modified $value in key 'value' or empty array

Definition at line 2694 of file DataHandler.php.

References GeneralUtility\idnaEncode(), and GeneralUtility\makeInstance().

Referenced by DataHandler\checkValueForInput(), and DataHandler\getPlaceholderTitleForTableLabel().

checkValue_SW (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $curValue,
  $status,
  $realPid,
  $recFID,
  $field,
  $uploadedFiles,
  $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.

Parameters
array$resThe result array. The processed value (if any!) is set in the "value" key.
string$valueThe value to set.
array$tcaFieldConfField configuration from $GLOBALS['TCA']
string$tableTable name
int$idUID of record
mixed$curValueCurrent value of the field
string$status'update' or 'new' flag
int$realPidThe 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. If $realPid is -1 it means that a new version of the record is being inserted.
string$recFIDField identifier [table:uid:field] for flexforms
string$fieldField name. Must NOT be set if the call is for a flexform field (since flexforms are not allowed within flexforms).
array$uploadedFiles
int$tscPIDTSconfig PID
array$additionalDataAdditional data to be forwarded to sub-processors
Returns
array Returns the evaluated $value as key "value" in this array.

Definition at line 1665 of file DataHandler.php.

References DataHandler\checkValueForFlex(), DataHandler\checkValueForGroupSelect(), DataHandler\checkValueForInline(), DataHandler\checkValueForInput(), DataHandler\checkValueForRadio(), DataHandler\checkValueForText(), and GeneralUtility\inList().

Referenced by DataHandler\checkValue(), and DataHandler\checkValue_flex_procInData_travDS().

checkValue_text_Eval (   $value,
  $evalArray,
  $is_in 
)
Parameters
string$valueThe field value to be evaluated
array$evalArrayArray of evaluations to traverse.
string$is_inThe "is_in" value of the field configuration from TCA
Returns
array

Definition at line 2655 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\checkValueForText().

checkValueForFlex (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $curValue,
  $status,
  $realPid,
  $recFID,
  $tscPID,
  $uploadedFiles,
  $field 
)
protected

Evaluates 'flex' type values.

Parameters
array$resThe result array. The processed value (if any!) is set in the 'value' key.
string | array$valueThe value to set.
array$tcaFieldConfField configuration from TCA
string$tableTable name
int$idUID of record
mixed$curValueCurrent value of the field
string$status'update' or 'new' flag
int$realPidThe 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. If $realPid is -1 it means that a new version of the record is being inserted.
string$recFIDField identifier [table:uid:field] for flexforms
int$tscPIDTSconfig PID
array$uploadedFilesUploaded files for the field
string$fieldField name
Returns
array Modified $res array

Definition at line 2339 of file DataHandler.php.

References DataHandler\$checkValue_currentRecord, DataHandler\_ACTION_FLEX_FORMdata(), GeneralUtility\_GP(), DataHandler\checkValue_flex_procInData(), GeneralUtility\getUserObj(), GeneralUtility\makeInstance(), ArrayUtility\mergeRecursiveWithOverrule(), and GeneralUtility\xml2array().

Referenced by DataHandler\checkValue_SW().

checkValueForGroupSelect (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $curValue,
  $status,
  $recFID,
  $uploadedFiles,
  $field 
)
protected

Evaluates 'group' or 'select' type values.

Parameters
array$resThe result array. The processed value (if any!) is set in the 'value' key.
string$valueThe value to set.
array$tcaFieldConfField configuration from TCA
string$tableTable name
int$idUID of record
mixed$curValueCurrent value of the field
string$status'update' or 'new' flag
string$recFIDField identifier [table:uid:field] for flexforms
array$uploadedFiles
string$fieldField name
Returns
array Modified $res array

Definition at line 1935 of file DataHandler.php.

References DataHandler\addNewValuesToRemapStackChildIds(), DataHandler\applyFiltersToValues(), DataHandler\castReferenceValue(), DataHandler\checkValue_checkMax(), DataHandler\checkValue_group_select_explodeSelectGroupValue(), DataHandler\convNumEntityToByteValue(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkValue_SW().

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$resThe result array. The processed value (if any!) is set in the 'value' key.
string$valueThe value to set.
array$tcaFieldConfField configuration from TCA
string$tableTable name
int$idUID of record
string$status'update' or 'new' flag
string$fieldField name
array$additionalDataAdditional data to be forwarded to sub-processors
Returns
array Modified $res array

Definition at line 2489 of file DataHandler.php.

References DataHandler\addNewValuesToRemapStackChildIds(), MathUtility\canBeInterpretedAsInteger(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkValue_inline(), and DataHandler\checkValue_SW().

checkValueForInput (   $value,
  $tcaFieldConf,
  $table,
  $id,
  $realPid,
  $field 
)
protected

Evaluate "input" type values.

Parameters
string$valueThe value to set.
array$tcaFieldConfField configuration from TCA
string$tableTable name
int$idUID of record
int$realPidThe 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. If $realPid is -1 it means that a new version of the record is being inserted.
string$fieldField name
Returns
array $res The result array. The processed value (if any!) is set in the "value" key.

Definition at line 1743 of file DataHandler.php.

References DataHandler\checkValue_input_Eval(), QueryHelper\getDateTimeFormats(), DataHandler\getFieldEvalCacheIdentifier(), DataHandler\getUnique(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkValue_SW().

checkValueForRadio (   $res,
  $value,
  $tcaFieldConf,
  $table,
  $id,
  $pid,
  $field 
)
protected

Evaluates 'radio' type values.

Parameters
array$resThe result array. The processed value (if any!) is set in the 'value' key.
string$valueThe value to set.
array$tcaFieldConfField configuration from TCA
array$tableThe table of the record
int$idThe id of the record
int$pidThe pid of the record
string$fieldThe field to check
Returns
array Modified $res array

Definition at line 1892 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\checkValue_SW().

checkValueForText (   $value,
  $tcaFieldConf 
)
protected

Evaluate "text" type values.

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

Definition at line 1717 of file DataHandler.php.

References DataHandler\checkValue_text_Eval(), DataHandler\getFieldEvalCacheIdentifier(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkValue_SW().

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'

  • cache_md5params: RDCT redirects.
  • cache_imagesizes: Clearing this table would cause a lot of unneeded Imagemagick calls because the size informations have to be fetched again after clearing.
  • all caches inside the cache manager that are inside the group "system"
  • they are only needed to build up the core system and templates, use "temp_cached" or "system" to do that

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

$cacheCmd='cacheTag:[string]' Flush page and pagesection 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
string$cacheCmdThe cache command, see above description
Returns
void

Definition at line 8309 of file DataHandler.php.

References GeneralUtility\callUserFunction(), MathUtility\canBeInterpretedAsInteger(), GeneralUtility\deprecationLog(), DataHandler\getCacheManager(), GeneralUtility\isFirstPartOfStr(), and GeneralUtility\makeInstance().

clearPrefixFromValue (   $table,
  $value 
)

Removes the prependAtCopy prefix on values

Parameters
string$tableTable name
string$valueThe value to fix
Returns
string Clean name

Definition at line 7977 of file DataHandler.php.

References DataHandler\prependLabel().

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$tableRecord table name
int$idRecord uid
array$fieldArrayArray 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!

Definition at line 7374 of file DataHandler.php.

References GeneralUtility\inList(), DataHandler\isSubmittedValueEqualToStoredValue(), and GeneralUtility\makeInstance().

compileAdminTables ( )

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

Returns
array Array of all TCA table names

Definition at line 7733 of file DataHandler.php.

Referenced by DataHandler\copyPages().

controlActiveElements ( )
protected

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

Returns
void

Definition at line 8796 of file DataHandler.php.

References DataHandler\setNullValues().

convNumEntityToByteValue (   $input)

Converts a HTML entity (like {) to the character '123'

Parameters
string$inputInput string
Returns
string Output string

Definition at line 7494 of file DataHandler.php.

Referenced by DataHandler\checkValueForGroupSelect().

copyL10nOverlayRecords (   $table,
  $uid,
  $destPid,
  $first = false,
  $overrideValues = [],
  $excludeFields = '' 
)

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

Parameters
string$tableRecord Table
string$uidRecord UID
string$destPidPosition to copy to
bool$first
array$overrideValues
string$excludeFields
Returns
void

Definition at line 4117 of file DataHandler.php.

References DataHandler\$overrideValues, BackendUtility\getRecordsByField(), BackendUtility\getTSconfig_pidValue(), and BackendUtility\isTableLocalizable().

copyPages (   $uid,
  $destPid 
)

Copying pages Main function for copying pages.

Parameters
int$uidPage UID to copy
int$destPidDestination 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
Returns
void

Definition at line 3457 of file DataHandler.php.

References DataHandler\compileAdminTables(), DataHandler\copySpecificPage(), DataHandler\int_pageTreeInfo(), DataHandler\log(), and GeneralUtility\trimExplode().

copyRecord_flexFormCallBack (   $pParams,
  $dsConf,
  $dataValue,
  $_1,
  $_2,
  $_3,
  $workspaceOptions 
)

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

Parameters
array$pParamsArray of parameters in num-indexes: table, uid, field
array$dsConfTCA field configuration (from Data Structure XML)
string$dataValueThe value of the flexForm field
string$_1Not used.
string$_2Not used.
string$_3Not used.
array$workspaceOptions
Returns
array Result array with key "value" containing the value of the processing.
See also
copyRecord(), checkValue_flex_procInData_travDS()

Definition at line 3936 of file DataHandler.php.

References DataHandler\copyRecord_procBasedOnFieldType(), DataHandler\getInlineFieldType(), and DataHandler\isReferenceField().

copyRecord_procBasedOnFieldType (   $table,
  $uid,
  $field,
  $value,
  $row,
  $conf,
  $realDestPid,
  $language = 0,
array  $workspaceOptions = [] 
)

Processing/Preparing content for copyRecord() function

Parameters
string$tableTable name
int$uidRecord uid
string$fieldField name being processed
string$valueInput value to be processed.
array$rowRecord array
array$confTCA field configuration
int$realDestPidReal page id (pid) the record is copied to
int$languageLanguage ID (from sys_language table) used in the duplicated record
array$workspaceOptionsOptions to be forwarded if actions happen on a workspace currently
Returns
array|string private
See also
copyRecord()

Definition at line 3743 of file DataHandler.php.

References DataHandler\checkValue_flex_procInData(), DataHandler\getInlineFieldType(), BackendUtility\getInlineLocalizationMode(), DataHandler\isReferenceField(), GeneralUtility\makeInstance(), and GeneralUtility\xml2array().

Referenced by DataHandler\copyRecord_flexFormCallBack(), and DataHandler\copyRecord_raw().

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$tableElement table
int$uidElement UID
int$pidElement PID (real PID, not checked)
array$overrideArrayOverride array - must NOT contain any fields not in the table!
array$workspaceOptionsOptions to be forwarded if actions happen on a workspace currently
Returns
int Returns the new ID of the record (if applicable)

Definition at line 3619 of file DataHandler.php.

References DataHandler\copyRecord_procBasedOnFieldType(), DataHandler\dbAnalysisStoreExec(), DataHandler\doesRecordExist(), DataHandler\insertNewCopyVersion(), DataHandler\isElementToBeDeleted(), DataHandler\isRecordCopied(), DataHandler\log(), DataHandler\recordInfo(), and BackendUtility\wsMapId().

Referenced by DataHandler\versionizeRecord().

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$destPidDestination 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$copyTablesArrayTable on pages to copy along with the page.
bool$firstIs 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.

Definition at line 3511 of file DataHandler.php.

References $fields, DataHandler\addDeleteRestriction(), BackendUtility\isTableLocalizable(), BackendUtility\isTableWorkspaceEnabled(), DataHandler\log(), GeneralUtility\makeInstance(), and DataHandler\processRemapStack().

Referenced by DataHandler\copyPages().

createRelationHandlerInstance ( )
protected

function to make the static call to GeneralUtility mockable

Returns
RelationHandler

Definition at line 8848 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\moveRecord_procBasedOnFieldType(), and DataHandler\remapListedDBRecords_procDBRefs().

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

Returns
void

Definition at line 7636 of file DataHandler.php.

References MathUtility\canBeInterpretedAsInteger(), and BackendUtility\wsMapId().

Referenced by DataHandler\copyRecord_raw().

deleteAction (   $table,
  $id 
)

Delete a single record

Parameters
string$tableTable name
int$idRecord UID
Returns
void

Definition at line 4842 of file DataHandler.php.

References DataHandler\deleteEl(), BackendUtility\getRecord(), and GeneralUtility\getUserObj().

Referenced by DataHandler\deleteL10nOverlayRecords(), and FileExtensionFilter\filterInlineChildren().

deleteClause (   $table)

Returns delete-clause for the $table

Parameters
string$tableTable name
Returns
string Delete clause

Definition at line 7539 of file DataHandler.php.

References DataHandler\disableDeleteClause().

deleteEl (   $table,
  $uid,
  $noRecordCheck = false,
  $forceHardDelete = false 
)

Delete element from any table

Parameters
string$tableTable name
int$uidRecord UID
bool$noRecordCheckFlag: If $noRecordCheck is set, then the function does not check permission to delete record
bool$forceHardDeleteIf TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Returns
void

Definition at line 4872 of file DataHandler.php.

References DataHandler\deleteRecord(), and DataHandler\deleteVersionsForRecord().

Referenced by DataHandler\deleteAction(), DataHandler\deleteVersionsForRecord(), DataHandlerHook\processCmdmap_deleteAction(), and DataHandlerHook\version_clearWSID().

deleteL10nOverlayRecords (   $table,
  $uid 
)

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

Parameters
string$tableRecord Table
string$uidRecord UID
Returns
void

Definition at line 5418 of file DataHandler.php.

References Enumeration\cast(), VersionState\DELETE_PLACEHOLDER, DataHandler\deleteAction(), BackendUtility\getRecordsByField(), BackendUtility\isTableLocalizable(), BackendUtility\isTableWorkspaceEnabled(), and BackendUtility\workspaceOL().

Referenced by DataHandler\deleteRecord(), and DataHandlerHook\processCmdmap_deleteAction().

deleteRecord (   $table,
  $uid,
  $noRecordCheck = false,
  $forceHardDelete = false,
  $undeleteRecord = false 
)

Deleting/Undeleting 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$tableTable name
int$uidRecord UID
bool$noRecordCheckFlag: If $noRecordCheck is set, then the function does not check permission to delete record
bool$forceHardDeleteIf TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
bool$undeleteRecordIf TRUE, the "deleted" flag is set to 0 again and thus, the item is undeleted.
Returns
void

Definition at line 4942 of file DataHandler.php.

References DataHandler\deleteL10nOverlayRecords(), DataHandler\deleteRecord_procFields(), DataHandler\doesRecordExist(), DataHandler\extFileFields(), DataHandler\extFileFunctions(), DataHandler\getRecordProperties(), BackendUtility\getRecordRaw(), BackendUtility\getTSCpid(), DataHandler\log(), GeneralUtility\makeInstance(), and DataHandler\registerRecordIdForPageCacheClearing().

Referenced by DataHandler\deleteEl(), DataHandler\deleteSpecificPage(), DataHandler\deleteVersionsForRecord(), and DataHandler\undeleteRecord().

deleteRecord_procFields (   $table,
  $uid,
  $undeleteRecord = false 
)

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$tableRecord Table
string$uidRecord UID
bool$undeleteRecordIf a record should be undeleted (e.g. from history/undo)
Returns
void
See also
deleteRecord()

Definition at line 5346 of file DataHandler.php.

References BackendUtility\getRecord().

Referenced by DataHandler\deleteRecord().

deleteSpecificPage (   $uid,
  $forceHardDelete = false 
)

Delete a page and all records on it.

Parameters
int$uidPage id
bool$forceHardDeleteIf TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Returns
void private
See also
deletePages()

Definition at line 5163 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), DataHandler\deleteRecord(), DataHandler\deleteVersionsForRecord(), and GeneralUtility\makeInstance().

deleteVersionsForRecord (   $table,
  $uid,
  $forceHardDelete 
)

Delete versions for element from any table

Parameters
string$tableTable name
int$uidRecord UID
bool$forceHardDeleteIf TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Returns
void

Definition at line 4890 of file DataHandler.php.

References Enumeration\cast(), DataHandler\deleteEl(), DataHandler\deleteRecord(), BackendUtility\getMovePlaceholder(), VersionState\MOVE_POINTER, and BackendUtility\selectVersionsOfRecord().

Referenced by DataHandler\deleteEl(), and DataHandler\deleteSpecificPage().

destNotInsideSelf (   $destinationId,
  $id 
)

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

Parameters
int$destinationIdDestination 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)

Definition at line 6564 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), BackendUtility\fixVersioningPid(), and GeneralUtility\makeInstance().

Referenced by DataHandler\moveRecord_raw().

destPathFromUploadFolder (   $folder)

Returns absolute destination path for the upload folder, $folder

Parameters
string$folderUpload folder name, relative to PATH_site
Returns
string Input string prefixed with PATH_site

Definition at line 7516 of file DataHandler.php.

Referenced by DataHandler\extFileFunctions().

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.

Returns
void

Definition at line 7528 of file DataHandler.php.

Referenced by DataHandler\addDeleteRestriction(), and DataHandler\deleteClause().

doesBranchExist (   $inList,
  $pid,
  $perms,
  $recurse 
)

Checks if a whole branch of pages exists

Tests the branch under $pid (like doesRecordExist). It doesn't test the page with $pid as uid. Use doesRecordExist() for this purpose Returns an ID-list or "" if OK. Else -1 which means that somewhere there was no permission (eg. to delete). if $recurse is set, then the function will follow subpages. This MUST be set, if we need the idlist for deleting pages or else we get an incomplete list

Parameters
string$inListList of page uids, this is added to and outputted in the end
int$pidPage ID to select subpages from.
int$permsPerms integer to check each page record for.
bool$recurseRecursion flag: If set, it will go out through the branch.
Returns
string List of integers in branch

Definition at line 6499 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), and GeneralUtility\makeInstance().

Referenced by DataHandler\canDeletePage().

doesPageHaveUnallowedTables (   $page_uid,
  $doktype 
)

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

Parameters
int$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

Definition at line 6624 of file DataHandler.php.

References GeneralUtility\makeInstance(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkValue().

doesRecordExist (   $table,
  $id,
  $perms 
)

Checks if record can be selected based on given permission criteria

Parameters
string$tableRecord table name
int$idRecord UID
int | string$permsPermission restrictions to observe: Either an integer that will be bitwise AND'ed or a string, which points to a key in the ->pMap array
Returns
bool Returns TRUE if the record given by $table, $id and $perms can be selected
Exceptions
RuntimeException

Definition at line 6386 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), MathUtility\canBeInterpretedAsInteger(), DataHandler\doesRecordExist_pageLookUp(), BackendUtility\fixVersioningPid(), BackendUtility\getRecordRaw(), DataHandler\isRecordInWebMount(), BackendUtility\isRootLevelRestrictionIgnored(), BackendUtility\isWebMountRestrictionIgnored(), and GeneralUtility\makeInstance().

Referenced by DataHandler\canDeletePage(), DataHandler\cannotDeleteRecord(), DataHandler\checkRecordInsertAccess(), DataHandler\checkRecordUpdateAccess(), DataHandler\copyRecord_raw(), DataHandler\deleteRecord(), DataHandler\moveRecord(), and DataHandler\versionizeRecord().

doesRecordExist_pageLookUp (   $id,
  $perms 
)
protected

Looks up a page based on permissions.

Parameters
int$idPage id
int$permsPermission integer
Returns
QueryBuilder private
See also
doesRecordExist()

Definition at line 6461 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), Permission\CONTENT_EDIT, GeneralUtility\makeInstance(), Permission\PAGE_DELETE, and Permission\PAGE_EDIT.

Referenced by DataHandler\doesRecordExist().

eventPid (   $table,
  $uid,
  $pid 
)
Parameters
string$table
int$uid
int$pid
Returns
int

Definition at line 6767 of file DataHandler.php.

Referenced by DataHandler\getRecordPropertiesFromRow(), and DataHandler\newlog2().

extFileFields (   $table)

Returns all fieldnames from a table which are a list of files

Parameters
string$tableTable name
Returns
array Array of fieldnames that are either "group" or "file" types.

Definition at line 7804 of file DataHandler.php.

Referenced by DataHandler\deleteRecord().

extFileFunctions (   $table,
  $field,
  $filelist,
  $func 
)

File functions on external file references. eg. deleting files when deleting record

Parameters
string$tableTable name
string$fieldField name
string$filelistList of files to work on from field
string$funcFunction, eg. "deleteAll" which will delete all files listed.
Returns
void

Definition at line 7992 of file DataHandler.php.

References DataHandler\destPathFromUploadFolder(), DataHandler\getResourceFactory(), and DataHandler\log().

Referenced by DataHandler\deleteRecord().

fillInFieldArray (   $table,
  $id,
  $fieldArray,
  $incomingFieldArray,
  $realPid,
  $status,
  $tscPID 
)

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

Parameters
string$tableTable name
int$idRecord ID
array$fieldArrayDefault values, Preset $fieldArray with 'pid' maybe (pid and uid will be not be overridden anyway)
array$incomingFieldArrayIs which fields/values you want to set. There are processed and put into $fieldArray if OK
int$realPidThe 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$statusIs 'new' or 'update'
int$tscPIDTSconfig PID
Returns
array Field Array

Definition at line 1400 of file DataHandler.php.

References DataHandler\checkValue(), BackendUtility\fixVersioningPid(), BackendUtility\getPagesTSconfig(), BackendUtility\getTCAtypes(), BackendUtility\getTCAtypeValue(), ArrayUtility\mergeRecursiveWithOverrule(), DataHandler\pageInfo(), DataHandler\recordInfo(), BackendUtility\RTEsetup(), DataHandler\transformRichtextContentToDatabase(), and BackendUtility\workspaceOL().

fixCopyAfterDuplFields (   $table,
  $uid,
  $prevUid,
  $update,
  $newData = [] 
)

When er record is copied you can specify fields from the previous record which should be copied into the new one This function is also called with new elements. But then $update must be set to zero and $newData containing the data array. In that case data in the incoming array is NOT overridden. (250202)

Parameters
string$tableTable name
int$uidRecord UID
int$prevUidUID of previous record
bool$updateIf set, updates the record
array$newDataInput array. If fields are already specified AND $update is not set, values are not set in output array.
Returns
array Output array (For when the copying operation needs to get the information instead of updating the info)

Definition at line 7781 of file DataHandler.php.

References DataHandler\recordInfo(), GeneralUtility\trimExplode(), and DataHandler\updateDB().

Referenced by DataHandler\moveRecord_raw().

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$tableTable name
int$uidRecord UID
Returns
void

Definition at line 7745 of file DataHandler.php.

References DataHandler\getUnique(), DataHandler\recordInfo(), GeneralUtility\trimExplode(), and DataHandler\updateDB().

Referenced by DataHandler\moveRecord_raw().

getAutoVersionId (   $table,
  $id 
)

Gets the automatically versionized id of a record.

Parameters
string$tableName of the table
int$idUid of the record
Returns
int

Definition at line 8552 of file DataHandler.php.

Referenced by DataHandler\overlayAutoVersionId().

getCacheManager ( )
protected

Create and returns an instance of the CacheManager

Returns
CacheManager

Definition at line 8858 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\clear_cacheCmd(), and DataHandler\getRuntimeCache().

getCheckModifyAccessListHookObjects ( )
protected

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

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

Definition at line 909 of file DataHandler.php.

References DataHandler\$checkModifyAccessListHookObjects, $GLOBALS, and GeneralUtility\getUserObj().

getCommandMapElements (   $needle)
protected

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

Parameters
string$needleThe command to be matched
Returns
array

Definition at line 8775 of file DataHandler.php.

Referenced by DataHandler\registerElementsToBeDeleted(), and DataHandler\unsetElementsToBeDeleted().

getCopyHeader (   $table,
  $pid,
  $field,
  $value,
  $count,
  $prevTitle = '' 
)

Get modified header for a copied record

Parameters
string$tableTable name
int$pidPID value in which other records to test might be
string$fieldField name to get header value for.
string$valueCurrent field value
int$countCounter (number of recursions)
string$prevTitlePrevious title we checked for (in previous recursion)
Returns
string The field value, possibly appended with a "copy label

Definition at line 7892 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), GeneralUtility\makeInstance(), and DataHandler\prependLabel().

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.

Definition at line 6601 of file DataHandler.php.

References GeneralUtility\trimExplode().

Referenced by DataHandler\start().

getFieldEvalCacheIdentifier (   $additionalIdentifier)
protected

Return the cache entry identifier for field evals

Parameters
string$additionalIdentifier
Returns
string

Definition at line 8838 of file DataHandler.php.

Referenced by DataHandler\checkValueForInput(), and DataHandler\checkValueForText().

getInlineFieldType (   $conf)

Returns the subtype as a string of an inline field. If it's not an inline field at all, it returns FALSE.

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

Definition at line 7864 of file DataHandler.php.

Referenced by DataHandler\copyRecord_flexFormCallBack(), DataHandler\copyRecord_procBasedOnFieldType(), DataHandler\moveRecord_procBasedOnFieldType(), DataHandlerHook\moveRecord_processFieldValue(), and DataHandlerHook\version_swap_processFields().

getLocalTCE ( )
protected

Returns an instance of DataHandler for handling local datamaps/cmdmaps

Returns
DataHandler

Definition at line 5707 of file DataHandler.php.

References DataHandler\$cachedTSconfig, DataHandler\$copyTree, DataHandler\$enableLogging, DataHandler\$isImporting, and GeneralUtility\makeInstance().

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$tableTable where record lives/lived
int$uidRecord UID
Returns
int[] Parent UIDs

Definition at line 7570 of file DataHandler.php.

References BackendUtility\getTSCpid().

getOuterMostInstance ( )
protected

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

Returns
DataHandler

Definition at line 8635 of file DataHandler.php.

References DataHandler\$outerMostInstance.

Referenced by DataHandler\isOuterMostInstance().

getPID (   $table,
  $uid 
)

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

Parameters
string$tableTable name
int$uidRecord uid
Returns
int|FALSE PID value (unless the record did not exist in which case FALSE is returned)

Definition at line 7616 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\prepareCacheFlush().

getPlaceholderTitleForTableLabel (   $table,
  $placeholderContent = null 
)

Create a placeholder title for the label field that does match the field requirements

Parameters
string$tableThe table name
string$placeholderContentPlaceholder content to be used
Returns
string placeholder value

Definition at line 1371 of file DataHandler.php.

References DataHandler\checkValue_input_Eval(), and GeneralUtility\trimExplode().

Referenced by DataHandlerHook\moveRecord_wsPlaceholders().

getPreviousLocalizedRecordUid (   $table,
  $uid,
  $pid,
  $language 
)
protected

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

Parameters
string$tableTable name
int$uidUid of default language record
int$pidPid of default language record
int$languageLanguage of localization
Returns
int uid of record after which the localized record should be inserted

Definition at line 7203 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), BackendUtility\getRecord(), BackendUtility\getRecordLocalization(), and GeneralUtility\makeInstance().

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$tableTable name
int$idUid of record
bool$noWSOLIf set, no workspace overlay is performed
Returns
array Properties of record

Definition at line 6729 of file DataHandler.php.

References DataHandler\getRecordPropertiesFromRow(), DataHandler\recordInfo(), and BackendUtility\workspaceOL().

Referenced by DataHandler\checkRecordInsertAccess(), DataHandler\checkValue(), DataHandler\deleteRecord(), DataHandler\getSortNumber(), DataHandler\insertDB(), DataHandler\isRecordInWebMount(), DataHandler\moveRecord(), DataHandler\moveRecord_raw(), and DataHandler\newlog2().

getRecordPropertiesFromRow (   $table,
  $row 
)

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

Parameters
string$tableTable name
array$rowInput row
Returns
array|NULL Output array

Definition at line 6745 of file DataHandler.php.

References DataHandler\eventPid(), BackendUtility\fixVersioningPid(), and BackendUtility\getRecordTitle().

Referenced by DataHandler\getRecordProperties(), DataHandler\insertDB(), and DataHandler\updateDB().

getRecordsWithSameValue (   $tableName,
  $uid,
  $fieldName,
  $value,
  $pageId = 0 
)

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

Parameters
string$tableNameTable name
int$uidUID to filter out in the lookup (the record itself...)
string$fieldNameField name for which $value must be unique
string$valueValue string.
int$pageIdIf set, the value will be unique for this PID
Returns
array

Definition at line 2637 of file DataHandler.php.

References BackendUtility\getRecordsByField().

getResourceFactory ( )
protected

Gets the resourceFactory

Returns
ResourceFactory

Definition at line 8868 of file DataHandler.php.

References ResourceFactory\getInstance().

Referenced by DataHandler\extFileFunctions(), and DataHandler\removeRegisteredFiles().

getRuntimeCache ( )
protected

Gets an instance of the runtime cache.

Returns
VariableFrontend

Definition at line 8666 of file DataHandler.php.

References DataHandler\getCacheManager().

Referenced by DataHandler\__construct().

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.

Parameters
string$tableTable name
int$uidUid of record to find sorting number for. May be zero in case of new.
int$pidPositioning 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.

Definition at line 7026 of file DataHandler.php.

References DataHandler\$sortIntervals, DataHandler\addDeleteRestriction(), BackendUtility\getLiveVersionOfRecord(), BackendUtility\getMovePlaceholder(), DataHandler\getRecordProperties(), DataHandler\log(), GeneralUtility\makeInstance(), and DataHandler\resorting().

Referenced by DataHandler\moveRecord_raw().

getTableEntries (   $table,
  $TSconfig 
)

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

Parameters
string$tableTable name
array$TSconfigTSconfig for page
Returns
array TSconfig merged
See also
getTCEMAIN_TSconfig()

Definition at line 7601 of file DataHandler.php.

References ArrayUtility\mergeRecursiveWithOverrule().

getTCEMAIN_TSconfig (   $tscPID)

Return TSconfig for a page id

Parameters
int$tscPIDPage id (PID) from which to get configuration.
Returns
array TSconfig array, if any

Definition at line 7585 of file DataHandler.php.

References BackendUtility\getPagesTSconfig().

Referenced by DataHandler\prepareCacheFlush().

getUnique (   $table,
  $field,
  $value,
  $id,
  $newPid = 0 
)

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

Parameters
string$tableTable name
string$fieldField name for which $value must be unique
string$valueValue string.
int$idUID to filter out in the lookup (the record itself...)
int$newPidIf 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).

Definition at line 2564 of file DataHandler.php.

References DataHandler\getUniqueCountStatement().

Referenced by DataHandler\checkValueForInput(), and DataHandler\fixUniqueInPid().

getUniqueCountStatement ( string  $value,
string  $table,
string  $field,
int  $uid,
int  $pid 
)
protected

Gets the count of records for a unique field

Parameters
string$valueThe string value which should be unique
string$tableTable name
string$fieldField name for which $value must be unique
int$uidUID to filter out in the lookup (the record itself...)
int$pidIf set, the value will be unique for this PID
Returns
Return the prepared statement to check uniqueness

Definition at line 2596 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), and GeneralUtility\makeInstance().

Referenced by DataHandler\getUnique().

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$tableTable name of the parent record
int$idUid of the parent record
array$incomingFieldArrayReference to the incomingFieldArray of process_datamap
array$registerDBListReference to the $registerDBList array that was created/updated by versionizing calls to DataHandler in process_datamap.
Returns
void

Definition at line 6179 of file DataHandler.php.

References DataHandler\$registerDBList.

hasDeletedRecord (   $tableName,
  $uid 
)

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

Parameters
string$tableName
string$uid
Returns
bool

Definition at line 8537 of file DataHandler.php.

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
Returns
void

Definition at line 884 of file DataHandler.php.

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$tableRecord table name
string$id"NEW...." uid string
array$fieldArrayArray 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$newVersionSet to TRUE if new version is created.
int$suggestedUidSuggested UID value for the inserted record. See the array $this->suggestedInsertUids; Admin-only feature
bool$dontSetNewIdIndexIf TRUE, the ->substNEWwithIDs array is not updated. Only useful in very rare circumstances!
Returns
int|NULL Returns ID on success.

Definition at line 6842 of file DataHandler.php.

References DataHandler\checkStoredRecord(), DataHandler\getRecordProperties(), DataHandler\getRecordPropertiesFromRow(), DataHandler\insertUpdateDB_preprocessBasedOnFieldType(), DataHandler\log(), GeneralUtility\makeInstance(), and DataHandler\registerRecordIdForPageCacheClearing().

Referenced by DataHandler\insertNewCopyVersion(), and DataHandlerHook\moveRecord_wsPlaceholders().

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$tableTable name
array$fieldArrayField array to insert as a record
int$realPidThe value of PID field. -1 is indication that we are creating a new version!
Returns
int Returns the new ID of the record (if applicable)

Definition at line 3690 of file DataHandler.php.

References DataHandler\$dontProcessTransformations, DataHandler\$userid, DataHandler\checkValue(), StringUtility\getUniqueId(), and DataHandler\insertDB().

Referenced by DataHandler\copyRecord_raw().

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$tableTable name
array$fieldArrayField array to check
Returns
array Updated field array

Definition at line 8512 of file DataHandler.php.

References MathUtility\canBeInterpretedAsInteger(), and GeneralUtility\trimExplode().

Referenced by DataHandler\insertDB(), and DataHandler\updateDB().

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$CPtableAccumulation of page uid=>pid pairs in branch of $pid
int$pidPage ID for which to find subpages
int$counterNumber of levels to go down.
int$rootIDID 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.

Definition at line 7671 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), and GeneralUtility\makeInstance().

Referenced by DataHandler\copyPages().

isElementToBeDeleted (   $table,
  $id 
)
protected

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

Parameters
string$tableName of the table
int$idUid of the record
Returns
bool
See also
registerElementsToBeDeleted
resetElementsToBeDeleted
copyRecord_raw
versionizeRecord

Definition at line 8722 of file DataHandler.php.

Referenced by DataHandler\copyRecord_raw(), and DataHandler\versionizeRecord().

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.

Definition at line 6247 of file DataHandler.php.

Referenced by DataHandler\isRecordInWebMount().

isNestedElementCallRegistered (   $table,
  $id,
  $identifier 
)
protected

Determines nested element calls.

Parameters
string$tableName of the table
int$idUid of the record
string$identifierName of the action to be checked
Returns
bool

Definition at line 8679 of file DataHandler.php.

isOuterMostInstance ( )

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

Returns
bool

Definition at line 8656 of file DataHandler.php.

References DataHandler\getOuterMostInstance().

isRecordCopied (   $table,
  $uid 
)

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

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

Definition at line 8055 of file DataHandler.php.

Referenced by DataHandler\copyRecord_raw(), and DataHandlerHook\moveRecord().

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$tableTable name
int$idUID of record
Returns
bool Returns TRUE if OK. Cached results.

Definition at line 6232 of file DataHandler.php.

References DataHandler\getRecordProperties(), and DataHandler\isInWebMount().

Referenced by DataHandler\doesRecordExist().

isRecordUndeletable (   $table,
  $uid 
)

Determines whether a record can be undeleted.

Parameters
string$tableTable name of the record
int$uiduid of the record
Returns
bool Whether the record can be undeleted

Definition at line 5317 of file DataHandler.php.

References BackendUtility\getRecord(), and DataHandler\log().

Referenced by DataHandler\undeleteRecord().

isReferenceField (   $conf)

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

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

Definition at line 7852 of file DataHandler.php.

Referenced by DataHandler\copyRecord_flexFormCallBack(), DataHandler\copyRecord_procBasedOnFieldType(), and DataHandler\remapListedDBRecords_flexFormCallBack().

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 'eval' = 'null'), a special handling is required since (!strcmp(NULL, '')) would be a false-positive.

Parameters
mixed$submittedValueValue that has submitted (e.g. from a backend form)
mixed$storedValueValue that is currently stored in the database
string$storedTypeSQL type of the stored value column (see mysql_field_type(), e.g 'int', 'string', ...)
bool$allowNullWhether NULL values are allowed by accordant TCA definition ('eval' = 'null')
Returns
bool Whether both values are considered to be equal

Definition at line 7436 of file DataHandler.php.

Referenced by DataHandler\compareFieldArrayWithCurrentAndUnset().

isTableAllowedForThisPage (   $page_uid,
  $checkTable 
)

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$page_uidPage id for which to check, including 0 (zero) if checking for page tree root.
string$checkTableTable name to check
Returns
bool TRUE if OK

Definition at line 6347 of file DataHandler.php.

References BackendUtility\isRootLevelRestrictionIgnored(), DataHandler\pageInfo(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkRecordInsertAccess().

log (   $table,
  $recuid,
  $action,
  $recpid,
  $error,
  $details,
  $details_nr = -1,
  $data = [],
  $event_pid = -1,
  $NEWid = '' 
)

Logging actions from DataHandler

Parameters
string$tableTable name the log entry is concerned with. Blank if NA
int$recuidRecord UID. Zero if NA
int$actionAction number: 0=No category, 1=new record, 2=update record, 3= delete record, 4= move record, 5= Check/evaluate
int$recpidNormally 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$errorThe severity: 0 = message, 1 = error, 2 = System Error, 3 = security notice (admin)
string$detailsDefault error message in english
int$details_nrThis 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$dataArray with special information that may go into $details by 's' marks / sprintf() when the log is shown
int$event_pidThe page_uid (pid) where the event occurred. Used to select log-content for specific pages.
string$NEWidNEW id for new records
Returns
int Log entry UID (0 if no log entry was written or logging is disabled)

Definition at line 8404 of file DataHandler.php.

Referenced by DataHandler\checkRecordInsertAccess(), DataHandler\checkStoredRecord(), DataHandler\checkValue(), DataHandler\copyPages(), DataHandler\copyRecord_raw(), DataHandler\copySpecificPage(), DataHandler\deleteRecord(), DataHandler\extFileFunctions(), DataHandler\getSortNumber(), DataHandler\insertDB(), DataHandler\isRecordUndeletable(), DataHandler\moveRecord(), DataHandler\moveRecord_raw(), DataHandler\newlog(), DataHandler\newlog2(), DataHandler\updateDB(), and DataHandlerHook\version_setStage().

moveL10nOverlayRecords (   $table,
  $uid,
  $destPid,
  $originalRecordDestinationPid 
)

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

Parameters
string$tableRecord Table
string$uidRecord UID
string$destPidPosition to move to
string$originalRecordDestinationPidPosition to move the original record to
Returns
void

Definition at line 4468 of file DataHandler.php.

References BackendUtility\getRecordsByField(), BackendUtility\isTableLocalizable(), and DataHandler\moveRecord().

Referenced by DataHandler\moveRecord_raw(), and DataHandlerHook\moveRecord_wsPlaceholders().

moveRecord (   $table,
  $uid,
  $destPid 
)

Moving single records

Parameters
string$tableTable name to move
int$uidRecord uid to move
int$destPidPosition 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
Returns
void

Definition at line 4169 of file DataHandler.php.

References DataHandler\checkRecordInsertAccess(), DataHandler\checkRecordUpdateAccess(), DataHandler\doesRecordExist(), BackendUtility\getLiveVersionOfRecord(), DataHandler\getRecordProperties(), GeneralUtility\getUserObj(), DataHandler\log(), DataHandler\moveRecord_raw(), and DataHandler\resolvePid().

Referenced by DataHandler\moveL10nOverlayRecords(), DataHandler\moveRecord_procBasedOnFieldType(), and DataHandlerHook\moveRecord_processFieldValue().

moveRecord_procBasedOnFieldType (   $table,
  $uid,
  $destPid,
  $field,
  $value,
  $conf 
)

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

Parameters
string$tableRecord Table
string$uidRecord UID
string$destPidPosition to move to
string$fieldRecord field
string$valueRecord field value
array$confTCA configuration of current field
Returns
void

Definition at line 4431 of file DataHandler.php.

References DataHandler\createRelationHandlerInstance(), DataHandler\getInlineFieldType(), and DataHandler\moveRecord().

Referenced by DataHandler\moveRecord_procFields().

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$tableRecord Table
string$uidRecord UID
string$destPidPosition to move to
Returns
void

Definition at line 4409 of file DataHandler.php.

References BackendUtility\getRecordWSOL(), and DataHandler\moveRecord_procBasedOnFieldType().

Referenced by DataHandler\moveRecord_raw().

moveRecord_raw (   $table,
  $uid,
  $destPid 
)

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

Parameters
string$tableTable name to move
int$uidRecord uid to move
int$destPidPosition 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
Returns
void
See also
moveRecord()

Definition at line 4256 of file DataHandler.php.

References DataHandler\destNotInsideSelf(), DataHandler\fixCopyAfterDuplFields(), DataHandler\fixUniqueInPid(), DataHandler\getRecordProperties(), DataHandler\getSortNumber(), BackendUtility\getTSCpid(), GeneralUtility\getUserObj(), DataHandler\log(), GeneralUtility\makeInstance(), DataHandler\moveL10nOverlayRecords(), DataHandler\moveRecord_procFields(), DataHandler\registerRecordIdForPageCacheClearing(), and DataHandler\resolvePid().

Referenced by DataHandler\moveRecord(), and DataHandlerHook\moveRecord_wsPlaceholders().

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$tableTable name for which to set default values.
Returns
array Array with default values.

Definition at line 7294 of file DataHandler.php.

References DataHandler\$userid, and DataHandler\assemblePermissions().

newlog (   $message,
  $error = 0 
)

Simple logging function meant to be used when logging messages is not yet fixed.

Parameters
string$messageMessage string
int$errorError code, see log()
Returns
int Log entry UID
See also
log()

Definition at line 8432 of file DataHandler.php.

References DataHandler\log().

Referenced by DataHandlerHook\moveRecord(), DataHandler\process_uploads(), DataHandlerHook\processCmdmap_deleteAction(), DataHandlerHook\version_clearWSID(), DataHandlerHook\version_setStage(), and DataHandler\versionizeRecord().

newlog2 (   $message,
  $table,
  $uid,
  $pid = null,
  $error = 0 
)

Simple logging function meant to bridge the gap between newlog() and log() with a little more info, in particular the record table/uid and event_pid so we can filter messages per page.

Parameters
string$messageMessage string
string$tableTable name
int$uidRecord uid
int$pidRecord PID (from page tree). Will be turned into an event_pid internally in function: Meaning that the PID for a page will be its own UID, not its page tree PID.
int$errorError code, see log()
Returns
int Log entry UID
See also
log()

Definition at line 8448 of file DataHandler.php.

References DataHandler\eventPid(), DataHandler\getRecordProperties(), and DataHandler\log().

Referenced by DataHandler\placeholderShadowing(), and DataHandlerHook\version_setStage().

noRecordsFromUnallowedTables (   $inList)

Used by the deleteFunctions to check if there are records from disallowed tables under the pages to be deleted.

Parameters
string$inListList of page integers
Returns
bool Return TRUE, if permission granted

Definition at line 8023 of file DataHandler.php.

References GeneralUtility\makeInstance(), DataHandler\rmComma(), and DataHandler\tableReadOnly().

Referenced by DataHandler\canDeletePage().

overlayAutoVersionId (   $table,
  $id 
)
protected

Overlays the automatically versionized id of a record.

Parameters
string$tableName of the table
int$idUid of the record
Returns
int

Definition at line 8568 of file DataHandler.php.

References DataHandler\getAutoVersionId().

overrideFieldArray (   $table,
  $data 
)

Returns the $data array from $table overridden in the fields defined in ->overrideValues.

Parameters
string$tableTable name
array$dataData array with fields from table. These will be overlaid with values in $this->overrideValues[$table]
Returns
array Data array, processed.

Definition at line 7357 of file DataHandler.php.

pageInfo (   $id,
  $field 
)

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$fieldField name for which to return value
Returns
string Value of the field. Result is cached in $this->pageCache[$id][$field] and returned from there next time!

Definition at line 6674 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\fillInFieldArray(), and DataHandler\isTableAllowedForThisPage().

placeholderShadowing (   $table,
  $id 
)

Fix shadowing of data in case we are editing an offline version of a live "New" placeholder record:

Parameters
string$tableTable name
int$idRecord uid
Returns
void

Definition at line 1337 of file DataHandler.php.

References Enumeration\cast(), BackendUtility\getLiveVersionOfRecord(), BackendUtility\getRecord(), DataHandler\newlog2(), GeneralUtility\trimExplode(), and DataHandler\updateDB().

prepareCacheFlush (   $table,
  $uid,
  $pid 
)
protected

Prepare the cache clearing

Parameters
string$tableTable name of record that needs to be cleared
int$uidUID of record for which the cache needs to be cleared
int$pidOriginal pid of the page of the record which the cache needs to be cleared
Returns
array Array with tagsToClear and clearCacheCommands

Definition at line 8147 of file DataHandler.php.

References GeneralUtility\callUserFunction(), DataHandler\getPID(), DataHandler\getTCEMAIN_TSconfig(), GeneralUtility\makeInstance(), and GeneralUtility\trimExplode().

prependLabel (   $table)

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

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

Definition at line 7928 of file DataHandler.php.

Referenced by DataHandler\clearPrefixFromValue(), and DataHandler\getCopyHeader().

process_uploads (   $postFiles)

Processing of uploaded files. It turns out that some versions of PHP arranges submitted data for files different if sent in an array. This function will unify this so the internal array $this->uploadedFileArray will always contain files arranged in the same structure.

Parameters
array$postFiles$_FILES array
Returns
void

Definition at line 816 of file DataHandler.php.

References DataHandler\newlog(), and DataHandler\process_uploads_traverseArray().

process_uploads_traverseArray ( $outputArr,
  $inputArr,
  $keyToSet 
)

Traverse the upload array if needed to rearrange values.

Parameters
array$outputArr$this->uploadedFileArray passed by reference
array$inputArrInput array ($_FILES parts)
string$keyToSetThe current $_FILES array key to set on the outermost level.
Returns
void private
See also
process_uploads()

Definition at line 854 of file DataHandler.php.

Referenced by DataHandler\process_uploads().

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.

Returns
void

Definition at line 5943 of file DataHandler.php.

References DataHandler\castReferenceValue(), DataHandler\checkValue_checkMax(), DataHandler\updateDB(), and DataHandler\updateFlexFormData().

Referenced by DataHandler\copySpecificPage().

recordInfo (   $table,
  $id,
  $fieldList 
)

Returns the row of a record given by $table and $id and $fieldList (list of fields, may be '*') NOTICE: No check for deleted or access!

Parameters
string$tableTable name
int$idUID of the record from $table
string$fieldListField list for the SELECT query, eg. "*" or "uid,pid,...
Returns
NULL|array Returns the selected record on success, otherwise NULL.

Definition at line 6701 of file DataHandler.php.

References GeneralUtility\makeInstance(), and GeneralUtility\trimExplode().

Referenced by DataHandler\checkValue(), DataHandler\copyRecord_raw(), DataHandler\fillInFieldArray(), DataHandler\fixCopyAfterDuplFields(), DataHandler\fixUniqueInPid(), DataHandler\getRecordProperties(), DataHandler\remapListedDBRecords(), DataHandler\updateFlexFormData(), and DataHandler\versionizeRecord().

registerElementsToBeDeleted ( )
protected

Registers elements to be deleted in the registry.

Returns
void
See also
process_datamap

Definition at line 8734 of file DataHandler.php.

References DataHandler\getCommandMapElements().

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$tableName of the table
int$idUid of the record
string$identifierName of the action to be tracked
Returns
void

Definition at line 8694 of file DataHandler.php.

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$tableTable name of record that was just updated.
int$uidUID of updated / inserted record
int$pidREAL PID of page of a deleted/moved record to get TSconfig in ClearCache.
Returns
void

Definition at line 8083 of file DataHandler.php.

Referenced by DataHandler\deleteRecord(), DataHandler\insertDB(), DataHandler\moveRecord_raw(), and DataHandler\updateDB().

remapListedDBRecords ( )

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

Returns
void

Definition at line 5727 of file DataHandler.php.

References $fields, DataHandler\checkValue_flex_procInData(), debug(), GeneralUtility\makeInstance(), DataHandler\recordInfo(), DataHandler\remapListedDBRecords_procDBRefs(), DataHandler\updateDB(), BackendUtility\workspaceOL(), BackendUtility\wsMapId(), and GeneralUtility\xml2array().

remapListedDBRecords_flexFormCallBack (   $pParams,
  $dsConf,
  $dataValue,
  $dataValue_ext1,
  $dataValue_ext2 
)

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

Parameters
array$pParamsSet of parameters in numeric array: table, uid, field
array$dsConfTCA config for field (from Data Structure of course)
string$dataValueField value (from FlexForm XML)
string$dataValue_ext1Not used
string$dataValue_ext2Not used
Returns
array Array where the "value" key carries the value.
See also
checkValue_flex_procInData_travDS(), remapListedDBRecords()

Definition at line 5798 of file DataHandler.php.

References DataHandler\isReferenceField(), and DataHandler\remapListedDBRecords_procDBRefs().

remapListedDBRecords_procDBRefs (   $conf,
  $value,
  $MM_localUid,
  $table 
)

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

Parameters
array$confTCA field config
string$valueField value
int$MM_localUidUID of local record (for MM relations - might need to change if support for FlexForms should be done!)
string$tableTable name
Returns
array|NULL Returns array of items ready to implode for field content.
See also
remapListedDBRecords()

Definition at line 5823 of file DataHandler.php.

References DataHandler\createRelationHandlerInstance(), BackendUtility\getLiveVersionIdOfRecord(), and GeneralUtility\trimExplode().

Referenced by DataHandler\remapListedDBRecords(), and DataHandler\remapListedDBRecords_flexFormCallBack().

removeRegisteredFiles ( )

Removing files registered for removal before exit

Returns
void

Definition at line 7651 of file DataHandler.php.

References DataHandler\getResourceFactory().

resetElementsToBeDeleted ( )
protected

Resets the elements to be deleted in the registry.

Returns
void
See also
process_datamap

Definition at line 8746 of file DataHandler.php.

resetNestedElementCalls ( )
protected

Resets the nested element calls.

Returns
void

Definition at line 8706 of file DataHandler.php.

resolvePid (   $table,
  $pid 
)

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

Parameters
string$tableTable 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

Definition at line 7945 of file DataHandler.php.

References BackendUtility\getLiveVersionOfRecord(), and GeneralUtility\makeInstance().

Referenced by DataHandler\moveRecord(), and DataHandler\moveRecord_raw().

resorting (   $table,
  $pid,
  $sortRow,
  $return_SortNumber_After_This_Uid 
)

Resorts a table. Used internally by getSortNumber()

Parameters
string$tableTable name
int$pidPid in which to resort records.
string$sortRowSorting row
int$return_SortNumber_After_This_UidUid of record from $table in this $pid and for which the return value will be set to a free sorting number after that record. This is used to return a sortingValue if the list is resorted because of inserting records inside the list and not in the top
Returns
int|NULL If $return_SortNumber_After_This_Uid is set, will contain usable sorting number after that record if found (otherwise 0) private
See also
getSortNumber()

Definition at line 7157 of file DataHandler.php.

References DataHandler\$sortIntervals, DataHandler\addDeleteRestriction(), and GeneralUtility\makeInstance().

Referenced by DataHandler\getSortNumber().

rmComma (   $input)

Returns the $input string without a comma in the end

Parameters
string$inputInput string
Returns
string Output string with any comma in the end removed, if any.

Definition at line 7483 of file DataHandler.php.

Referenced by DataHandler\noRecordsFromUnallowedTables().

setControl ( array  $control)
Parameters
array$control

Definition at line 698 of file DataHandler.php.

References DataHandler\$control.

setDefaultsFromUserTS (   $userTS)

Initializes default values coming from User TSconfig

Parameters
array$userTSUser TSconfig array
Returns
void

Definition at line 789 of file DataHandler.php.

References $GLOBALS.

setHistory (   $table,
  $id,
  $logId 
)

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

Parameters
string$tableTable name
int$idRecord ID
int$logIdLog entry ID, important for linking between log and history views
Returns
void

Definition at line 6978 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\updateDB().

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$mirrorThis array has the syntax $mirror[table_name][uid] = [list of uids to copy data-value TO!]
Returns
void

Definition at line 759 of file DataHandler.php.

References GeneralUtility\trimExplode().

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$activehierarchical array with active elements
array$haystackhierarchical array with haystack to be modified
Returns
void

Definition at line 8815 of file DataHandler.php.

Referenced by DataHandler\controlActiveElements().

setTSconfigPermissions (   $fieldArray,
  $TSConfig_p 
)

Setting up perms_* fields in $fieldArray based on TSconfig input Used for new pages

Parameters
array$fieldArrayField Array, returned with modifications
array$TSConfig_pTSconfig properties
Returns
array Modified Field Array

Definition at line 7267 of file DataHandler.php.

References DataHandler\assemblePermissions(), and MathUtility\canBeInterpretedAsInteger().

start (   $data,
  $cmd,
  $altUserObject = null 
)

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

Parameters
array$dataData to be modified or inserted in the database
array$cmdCommands to copy, move, delete, localize, versionize records.
BackendUserAuthentication | NULL$altUserObjectAn alternative userobject you can set instead of the default, which is $GLOBALS['BE_USER']
Returns
void

Definition at line 713 of file DataHandler.php.

References DataHandler\$defaultPermissions, $GLOBALS, and DataHandler\getExcludeListArray().

tableAdminOnly (   $table)

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

Parameters
string$tableTable name
Returns
bool TRUE, if readonly

Definition at line 6550 of file DataHandler.php.

tableReadOnly (   $table)

Checks if the $table is readOnly

Parameters
string$tableTable name
Returns
bool TRUE, if readonly

Definition at line 6538 of file DataHandler.php.

Referenced by DataHandler\noRecordsFromUnallowedTables().

transformRichtextContentToDatabase (   $value,
  $table,
  $field,
  $defaultExtras,
  $thisConfig,
  $pid 
)
protected

Performs transformation of content from richtext element to database.

Parameters
string$valueValue to transform.
string$tableThe table name
string$fieldThe field name
array$defaultExtrasDefault extras configuration of this field - typically "richtext:rte_transform"
array$thisConfigConfiguration for RTEs; A mix between TSconfig and others. Configuration for additional transformation information
int$pidPID value of record (true parent page id)
Returns
string Transformed content

Definition at line 1556 of file DataHandler.php.

References GeneralUtility\makeInstance().

Referenced by DataHandler\checkValue_flex_procInData_travDS(), and DataHandler\fillInFieldArray().

triggerRemapAction (   $table,
  $id,
array  $callback,
array  $arguments,
  $forceRemapStackActions = false 
)
protected

Triggers a remap action for a specific record.

Some records are post-processed by the processRemapStack() method (e.g. IRRE children). This method determines whether an action/modification is executed directly to a record or is postponed to happen after remapping data.

Parameters
string$tableName of the table
string$idId of the record (can also be a "NEW..." string)
array$callbackThe method to be called
array$argumentsThe arguments to be submitted to the callback method
bool$forceRemapStackActionsWhether to force to use the stack
Returns
void
See also
processRemapStack

Definition at line 6124 of file DataHandler.php.

References DataHandler\addRemapAction().

undeleteRecord (   $table,
  $uid 
)

Undelete a single record

Parameters
string$tableTable name
int$uidRecord UID
Returns
void

Definition at line 4922 of file DataHandler.php.

References DataHandler\deleteRecord(), and DataHandler\isRecordUndeletable().

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$elementsElements to be modified
Returns
array

Definition at line 8758 of file DataHandler.php.

References ArrayUtility\arrayDiffAssocRecursive(), and DataHandler\getCommandMapElements().

updateDB (   $table,
  $id,
  $fieldArray 
)

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

Parameters
string$tableRecord table name
int$idRecord uid
array$fieldArrayArray of field=>value pairs to insert. FIELDS MUST MATCH the database FIELDS. No check is done.
Returns
void

Definition at line 6786 of file DataHandler.php.

References DataHandler\checkStoredRecord(), DataHandler\getRecordPropertiesFromRow(), DataHandler\insertUpdateDB_preprocessBasedOnFieldType(), DataHandler\log(), GeneralUtility\makeInstance(), DataHandler\registerRecordIdForPageCacheClearing(), and DataHandler\setHistory().

Referenced by DataHandler\fixCopyAfterDuplFields(), DataHandler\fixUniqueInPid(), DataHandler\placeholderShadowing(), DataHandler\processRemapStack(), DataHandler\remapListedDBRecords(), and DataHandler\updateFlexFormData().

updateFlexFormData (   $flexFormId,
array  $modifications 
)
protected

Updates FlexForm data.

Parameters
string$flexFormId,e.g.
<uid>:<field>
array$modificationsModifications with paths and values (e.g. 'sDEF/lDEV/field/vDEF' => 'TYPO3')
Returns
void

Definition at line 6073 of file DataHandler.php.

References MathUtility\canBeInterpretedAsInteger(), DataHandler\recordInfo(), ArrayUtility\setValueByPath(), DataHandler\updateDB(), BackendUtility\workspaceOL(), and GeneralUtility\xml2array().

Referenced by DataHandler\processRemapStack().

version_remapMMForVersionSwap_execSwap (   $table,
  $id,
  $swapWith 
)

Performing the remapping operations found necessary in version_remapMMForVersionSwap() It must be done in three steps with an intermediate "fake" uid. The UID can be something else than -$id (fx. 9999999+$id if you dare... :-)- as long as it is unique.

Parameters
string$tableTable for the two input records
int$idCurrent record (about to go offline)
int$swapWithSwap record (about to go online)
Returns
void
See also
version_remapMMForVersionSwap()

Definition at line 5677 of file DataHandler.php.

versionizeRecord (   $table,
  $id,
  $label,
  $delete = false 
)

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

Parameters
string$tableTable name
int$idRecord uid to versionize
string$labelVersion label
bool$deleteIf TRUE, the version is created to delete the record.
Returns
int|NULL Returns the id of the new version (if any)
See also
copyRecord()

Definition at line 5460 of file DataHandler.php.

References DataHandler\addDeleteRestriction(), DataHandler\cannotDeleteRecord(), Enumeration\cast(), DataHandler\copyRecord_raw(), VersionState\DEFAULT_STATE, VersionState\DELETE_PLACEHOLDER, DataHandler\doesRecordExist(), BackendUtility\getWorkspaceVersionOfRecord(), DataHandler\isElementToBeDeleted(), GeneralUtility\makeInstance(), VersionState\MOVE_PLACEHOLDER, DataHandler\newlog(), and DataHandler\recordInfo().

Referenced by DataHandlerHook\moveRecord(), DataHandlerHook\processCmdmap(), and DataHandlerHook\processCmdmap_deleteAction().

Member Data Documentation

$admin

Definition at line 373 of file DataHandler.php.

$alternativeFileName = []

Definition at line 224 of file DataHandler.php.

$alternativeFilePath = []

Definition at line 231 of file DataHandler.php.

$autoVersionIdMap = []

Definition at line 269 of file DataHandler.php.

$autoVersioningUpdate = false

Definition at line 631 of file DataHandler.php.

$BE_USER

Definition at line 352 of file DataHandler.php.

$bypassAccessCheckForRecords = false

Definition at line 179 of file DataHandler.php.

$bypassFileHandling = false

Definition at line 171 of file DataHandler.php.

$bypassWorkspaceRestrictions = false

Definition at line 163 of file DataHandler.php.

$cachedTSconfig = []

Definition at line 488 of file DataHandler.php.

Referenced by DataHandler\getLocalTCE().

$cachePrefixNestedElementCalls = 'core-datahandler-nestedElementCalls-'
protected

Definition at line 685 of file DataHandler.php.

$callBackObj

Definition at line 259 of file DataHandler.php.

$callFromImpExp = false

Definition at line 601 of file DataHandler.php.

$checkModifyAccessListHookObjects
protected

Definition at line 643 of file DataHandler.php.

Referenced by DataHandler\getCheckModifyAccessListHookObjects().

$checkSimilar = true

Definition at line 94 of file DataHandler.php.

$checkStoredRecords = true

Definition at line 102 of file DataHandler.php.

$checkStoredRecords_loose = true

Definition at line 109 of file DataHandler.php.

$checkValue_currentRecord = []

Definition at line 624 of file DataHandler.php.

Referenced by DataHandler\checkValueForFlex().

$checkWorkspaceCache = []

Definition at line 502 of file DataHandler.php.

$cmdmap = []

Definition at line 413 of file DataHandler.php.

$control = []
protected

Definition at line 399 of file DataHandler.php.

Referenced by DataHandler\setControl().

$copiedFileMap = []

Definition at line 311 of file DataHandler.php.

$copyMappingArray = []

Definition at line 550 of file DataHandler.php.

$copyMappingArray_merged = []

Definition at line 297 of file DataHandler.php.

$copyTree = 0

Definition at line 196 of file DataHandler.php.

Referenced by DataHandler\getLocalTCE().

$copyWhichTables = '*'

Definition at line 187 of file DataHandler.php.

$data_disableFields = []

Definition at line 240 of file DataHandler.php.

$datamap = []

Definition at line 406 of file DataHandler.php.

$dbAnalysisStore = []

Definition at line 510 of file DataHandler.php.

$defaultPermissions
Initial value:
= [
'user' => 'show,edit,delete,new,editcontent'

Definition at line 380 of file DataHandler.php.

Referenced by DataHandler\start().

$defaultValues = []

Definition at line 206 of file DataHandler.php.

$deletedRecords = []
protected

Definition at line 304 of file DataHandler.php.

$deleteTree = false

Definition at line 117 of file DataHandler.php.

$disableDeleteClause = false
protected

Definition at line 638 of file DataHandler.php.

$dontProcessTransformations = false

Definition at line 138 of file DataHandler.php.

Referenced by DataHandler\insertNewCopyVersion().

$enableLogging = true

Definition at line 78 of file DataHandler.php.

Referenced by DataHandler\getLocalTCE().

$errorLog = []

Definition at line 325 of file DataHandler.php.

$excludedTablesAndFields = []
protected

Definition at line 391 of file DataHandler.php.

$fileFunc

Definition at line 617 of file DataHandler.php.

$historyRecords = []
protected

Definition at line 427 of file DataHandler.php.

$isImporting = false

Definition at line 131 of file DataHandler.php.

Referenced by DataHandler\getLocalTCE().

$isInWebMount_Cache = []

Definition at line 481 of file DataHandler.php.

$isRecordInWebMount_Cache = []

Definition at line 474 of file DataHandler.php.

$mmHistoryRecords = []
protected

Definition at line 420 of file DataHandler.php.

$neverHideAtCopy = false

Definition at line 124 of file DataHandler.php.

$newIndexMap = []

Definition at line 608 of file DataHandler.php.

$newRelatedIDs = []

Definition at line 290 of file DataHandler.php.

$outerMostInstance = null
protected

Definition at line 656 of file DataHandler.php.

Referenced by DataHandler\getOuterMostInstance().

$overrideValues = []

Definition at line 215 of file DataHandler.php.

Referenced by DataHandler\copyL10nOverlayRecords().

$pageCache = []

Definition at line 495 of file DataHandler.php.

$pagetreeNeedsRefresh = false

Definition at line 339 of file DataHandler.php.

$pagetreeRefreshFieldsFromPages = ['pid', 'sorting', 'deleted', 'hidden', 'title', 'doktype', 'is_siteroot', 'fe_group', 'nav_hide', 'nav_title', 'module', 'starttime', 'endtime', 'content_from_pid']

Definition at line 332 of file DataHandler.php.

$pMap
Initial value:
= [
'show' => 1

Definition at line 435 of file DataHandler.php.

$recInsertAccessCache = []

Definition at line 467 of file DataHandler.php.

$recordPidsForDeletedRecords = []
staticprotected

Definition at line 671 of file DataHandler.php.

$recordsToClearCacheFor = []
staticprotected

Definition at line 663 of file DataHandler.php.

$recUpdateAccessCache = []

Definition at line 460 of file DataHandler.php.

$registerDBList = []

Definition at line 531 of file DataHandler.php.

Referenced by DataHandler\getVersionizedIncomingFieldArray().

$registerDBPids = []

Definition at line 538 of file DataHandler.php.

$remapStack = []

Definition at line 557 of file DataHandler.php.

$remapStackActions = []
protected

Definition at line 579 of file DataHandler.php.

$remapStackChildIds = []
protected

Definition at line 572 of file DataHandler.php.

$remapStackRecords = []

Definition at line 565 of file DataHandler.php.

$remapStackRefIndex = []
protected

Definition at line 586 of file DataHandler.php.

$removeFilesStore = []

Definition at line 517 of file DataHandler.php.

$reverseOrder = false

Definition at line 86 of file DataHandler.php.

$RTEmagic_copyIndex = []

Definition at line 318 of file DataHandler.php.

$runtimeCache = null
protected

Definition at line 678 of file DataHandler.php.

$sortIntervals = 256

Definition at line 452 of file DataHandler.php.

Referenced by DataHandler\getSortNumber(), and DataHandler\resorting().

$storeLogMessages = true

Definition at line 71 of file DataHandler.php.

$substNEWwithIDs = []

Definition at line 276 of file DataHandler.php.

$substNEWwithIDs_table = []

Definition at line 283 of file DataHandler.php.

$suggestedInsertUids = []

Definition at line 251 of file DataHandler.php.

$updateModeL10NdiffData = true

Definition at line 147 of file DataHandler.php.

$updateModeL10NdiffDataClear = false

Definition at line 155 of file DataHandler.php.

$updateRefIndexStack = []

Definition at line 593 of file DataHandler.php.

$uploadedFileArray = []

Definition at line 524 of file DataHandler.php.

$userid

Definition at line 359 of file DataHandler.php.

Referenced by DataHandler\insertNewCopyVersion(), and DataHandler\newFieldArray().

$username

Definition at line 366 of file DataHandler.php.

$version_remapMMForVersionSwap_reg
protected

Definition at line 648 of file DataHandler.php.