Documentation TYPO3 par Ameos

t3lib_TCEmain Class Reference

List of all members.

Public Member Functions

 start ($data, $cmd, $altUserObject='')
 setMirror ($mirror)
 setDefaultsFromUserTS ($userTS)
 process_uploads ($postFiles)
 process_uploads_traverseArray (&$outputArr, $inputArr, $keyToSet)
 process_datamap ()
 fillInFieldArray ($table, $id, $fieldArray, $incomingFieldArray, $realPid, $status, $tscPID)
 checkModifyAccessList ($table)
 isRecordInWebMount ($table, $id)
 isInWebMount ($pid)
 checkRecordUpdateAccess ($table, $id)
 checkRecordInsertAccess ($insertTable, $pid, $action=1)
 isTableAllowedForThisPage ($page_uid, $checkTable)
 doesRecordExist ($table, $id, $perms)
 doesRecordExist_pageLookUp ($id, $perms)
 doesBranchExist ($inList, $pid, $perms, $recurse)
 pageInfo ($id, $field)
 recordInfo ($table, $id, $fieldList)
 getRecordProperties ($table, $id)
 getRecordPropertiesFromRow ($table, $row)
 setTSconfigPermissions ($fieldArray, $TSConfig_p)
 newFieldArray ($table)
 overrideFieldArray ($table, $data)
 assemblePermissions ($string)
 checkValue ($table, $field, $value, $id, $status, $realPid, $tscPID)
 checkValue_SW ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $uploadedFiles, $tscPID)
 checkValue_input ($res, $value, $tcaFieldConf, $PP, $field='')
 checkValue_check ($res, $value, $tcaFieldConf, $PP)
 checkValue_radio ($res, $value, $tcaFieldConf, $PP)
 checkValue_group_select ($res, $value, $tcaFieldConf, $PP, $uploadedFiles, $field)
 checkValue_group_select_file ($valueArray, $tcaFieldConf, $curValue, $uploadedFileArray, $status, $table, $id, $recFID)
 checkValue_flex ($res, $value, $tcaFieldConf, $PP, $uploadedFiles, $field)
 checkValue_flexArray2Xml ($array)
 _DELETE_FLEX_FORMdata (&$valueArrayToRemoveFrom, $deleteCMDS)
 getUnique ($table, $field, $value, $id, $newPid=0)
 checkValue_input_Eval ($value, $evalArray, $is_in)
 checkValue_group_select_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $type)
 checkValue_group_select_explodeSelectGroupValue ($value)
 checkValue_flex_procInData ($dataPart, $dataPart_current, $uploadedFiles, $dataStructArray, $pParams, $callBackFunc='')
 checkValue_flex_procInData_travDS (&$dataValues, $dataValues_current, $uploadedFiles, $DSelements, $pParams, $callBackFunc='')
 updateDB ($table, $id, $fieldArray)
 compareFieldArrayWithCurrentAndUnset ($table, $id, $fieldArray)
 insertDB ($table, $id, $fieldArray, $newVersion=FALSE)
 checkStoredRecord ($table, $id, $fieldArray, $action)
 dbAnalysisStoreExec ()
 removeRegisteredFiles ()
 clear_cache ($table, $uid)
 getPID ($table, $uid)
 process_cmdmap ()
 moveRecord ($table, $uid, $destPid)
 copyRecord ($table, $uid, $destPid, $first=0, $overrideValues=array(), $excludeFields='')
 copyRecord_raw ($table, $uid, $pid, $overrideArray=array())
 insertNewCopyVersion ($table, $fieldArray, $realPid)
 copyRecord_procBasedOnFieldType ($table, $uid, $field, $value, $row, $conf)
 copyRecord_localize ($table, $uid, $language)
 copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 copyRecord_procFilesRefs ($conf, $uid, $value)
 copyPages ($uid, $destPid)
 copySpecificPage ($uid, $destPid, $copyTablesArray, $first=0)
 versionizeRecord ($table, $id, $label)
 versionizePages ($uid, $label)
 rawCopyPageContent ($old_pid, $new_pid, $copyTablesArray)
 version_swap ($table, $id, $swapWith, $swapContent)
 int_pageTreeInfo ($CPtable, $pid, $counter, $rootID)
 compileAdminTables ()
 fixUniqueInPid ($table, $uid)
 fixCopyAfterDuplFields ($table, $uid, $prevUid, $update, $newData=array())
 extFileFields ($table)
 getCopyHeader ($table, $pid, $field, $value, $count, $prevTitle='')
 prependLabel ($table)
 resolvePid ($table, $pid)
 clearPrefixFromValue ($table, $value)
 remapListedDBRecords ()
 remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid)
 extFileFunctions ($table, $field, $filelist, $func)
 deleteRecord ($table, $uid, $noRecordCheck)
 deletePages ($uid)
 deleteSpecificPage ($uid)
 noRecordsFromUnallowedTables ($inList)
 getSortNumber ($table, $uid, $pid)
 resorting ($table, $pid, $sortRow, $return_SortNumber_After_This_Uid)
 rmComma ($input)
 convNumEntityToByteValue ($input)
 destPathFromUploadFolder ($folder)
 destNotInsideSelf ($dest, $id)
 getExcludeListArray ()
 doesPageHaveUnallowedTables ($page_uid, $doktype)
 deleteClause ($table)
 tableReadOnly ($table)
 tableAdminOnly ($table)
 getInterfacePagePositionID ($uid)
 isReferenceField ($conf)
 getTCEMAIN_TSconfig ($tscPID)
 getTableEntries ($table, $TSconfig)
 setHistory ($table, $id, $logId)
 clearHistory ($table, $id, $keepEntries=10, $maxAgeSeconds=604800)
 log ($table, $recuid, $action, $recpid, $error, $details, $details_nr=0, $data=array(), $event_pid=-1, $NEWid='')
 printLogErrorMessages ($redirect)
 clear_cacheCmd ($cacheCmd)
 removeCacheFiles ()
 start ($data, $cmd, $altUserObject='')
 setMirror ($mirror)
 setDefaultsFromUserTS ($userTS)
 process_uploads ($postFiles)
 process_uploads_traverseArray (&$outputArr, $inputArr, $keyToSet)
 process_datamap ()
 fillInFieldArray ($table, $id, $fieldArray, $incomingFieldArray, $realPid, $status, $tscPID)
 checkModifyAccessList ($table)
 isRecordInWebMount ($table, $id)
 isInWebMount ($pid)
 checkRecordUpdateAccess ($table, $id)
 checkRecordInsertAccess ($insertTable, $pid, $action=1)
 isTableAllowedForThisPage ($page_uid, $checkTable)
 doesRecordExist ($table, $id, $perms)
 doesRecordExist_pageLookUp ($id, $perms)
 doesBranchExist ($inList, $pid, $perms, $recurse)
 pageInfo ($id, $field)
 recordInfo ($table, $id, $fieldList)
 getRecordProperties ($table, $id)
 getRecordPropertiesFromRow ($table, $row)
 setTSconfigPermissions ($fieldArray, $TSConfig_p)
 newFieldArray ($table)
 overrideFieldArray ($table, $data)
 assemblePermissions ($string)
 checkValue ($table, $field, $value, $id, $status, $realPid, $tscPID)
 checkValue_SW ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $uploadedFiles, $tscPID)
 checkValue_input ($res, $value, $tcaFieldConf, $PP, $field='')
 checkValue_check ($res, $value, $tcaFieldConf, $PP)
 checkValue_radio ($res, $value, $tcaFieldConf, $PP)
 checkValue_group_select ($res, $value, $tcaFieldConf, $PP, $uploadedFiles, $field)
 checkValue_group_select_file ($valueArray, $tcaFieldConf, $curValue, $uploadedFileArray, $status, $table, $id, $recFID)
 checkValue_flex ($res, $value, $tcaFieldConf, $PP, $uploadedFiles, $field)
 checkValue_flexArray2Xml ($array)
 _DELETE_FLEX_FORMdata (&$valueArrayToRemoveFrom, $deleteCMDS)
 getUnique ($table, $field, $value, $id, $newPid=0)
 checkValue_input_Eval ($value, $evalArray, $is_in)
 checkValue_group_select_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $type)
 checkValue_group_select_explodeSelectGroupValue ($value)
 checkValue_flex_procInData ($dataPart, $dataPart_current, $uploadedFiles, $dataStructArray, $pParams, $callBackFunc='')
 checkValue_flex_procInData_travDS (&$dataValues, $dataValues_current, $uploadedFiles, $DSelements, $pParams, $callBackFunc='')
 updateDB ($table, $id, $fieldArray)
 compareFieldArrayWithCurrentAndUnset ($table, $id, $fieldArray)
 insertDB ($table, $id, $fieldArray, $newVersion=FALSE)
 checkStoredRecord ($table, $id, $fieldArray, $action)
 dbAnalysisStoreExec ()
 removeRegisteredFiles ()
 clear_cache ($table, $uid)
 getPID ($table, $uid)
 process_cmdmap ()
 moveRecord ($table, $uid, $destPid)
 copyRecord ($table, $uid, $destPid, $first=0, $overrideValues=array(), $excludeFields='')
 copyRecord_raw ($table, $uid, $pid, $overrideArray=array())
 insertNewCopyVersion ($table, $fieldArray, $realPid)
 copyRecord_procBasedOnFieldType ($table, $uid, $field, $value, $row, $conf)
 copyRecord_localize ($table, $uid, $language)
 copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 copyRecord_procFilesRefs ($conf, $uid, $value)
 copyPages ($uid, $destPid)
 copySpecificPage ($uid, $destPid, $copyTablesArray, $first=0)
 versionizeRecord ($table, $id, $label)
 versionizePages ($uid, $label)
 rawCopyPageContent ($old_pid, $new_pid, $copyTablesArray)
 version_swap ($table, $id, $swapWith, $swapContent)
 int_pageTreeInfo ($CPtable, $pid, $counter, $rootID)
 compileAdminTables ()
 fixUniqueInPid ($table, $uid)
 fixCopyAfterDuplFields ($table, $uid, $prevUid, $update, $newData=array())
 extFileFields ($table)
 getCopyHeader ($table, $pid, $field, $value, $count, $prevTitle='')
 prependLabel ($table)
 resolvePid ($table, $pid)
 clearPrefixFromValue ($table, $value)
 remapListedDBRecords ()
 remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid)
 extFileFunctions ($table, $field, $filelist, $func)
 deleteRecord ($table, $uid, $noRecordCheck)
 deletePages ($uid)
 deleteSpecificPage ($uid)
 noRecordsFromUnallowedTables ($inList)
 getSortNumber ($table, $uid, $pid)
 resorting ($table, $pid, $sortRow, $return_SortNumber_After_This_Uid)
 rmComma ($input)
 convNumEntityToByteValue ($input)
 destPathFromUploadFolder ($folder)
 destNotInsideSelf ($dest, $id)
 getExcludeListArray ()
 doesPageHaveUnallowedTables ($page_uid, $doktype)
 deleteClause ($table)
 tableReadOnly ($table)
 tableAdminOnly ($table)
 getInterfacePagePositionID ($uid)
 isReferenceField ($conf)
 getTCEMAIN_TSconfig ($tscPID)
 getTableEntries ($table, $TSconfig)
 setHistory ($table, $id, $logId)
 clearHistory ($table, $id, $keepEntries=10, $maxAgeSeconds=604800)
 log ($table, $recuid, $action, $recpid, $error, $details, $details_nr=0, $data=array(), $event_pid=-1, $NEWid='')
 printLogErrorMessages ($redirect)
 clear_cacheCmd ($cacheCmd)
 removeCacheFiles ()

Public Attributes

 $log_table = 'sys_log'
 $checkStoredRecords = 1
 $checkStoredRecords_loose = 1
 $sortIntervals = 256
 $deleteTree = 0
 $copyTree = 0
 $versionizeTree = 0
 $neverHideAtCopy = 0
 $reverseOrder = 0
 $copyWhichTables = '*'
 $stripslashes_values = 1
 $storeLogMessages = 1
 $enableLogging = 1
 $checkSimilar = 1
 $dontProcessTransformations = 0
 $pMap
 $defaultPermissions
 $alternativeFileName = array()
 $data_disableFields = array()
 $defaultValues = array()
 $overrideValues = array()
 $fileFunc
 $last_log_id
 $BE_USER
 $userid
 $username
 $admin
 $exclude_array
 $data = Array()
 $datamap = Array()
 $cmd = Array()
 $cmdmap = Array()
 $uploadedFileArray = array()
 $cachedTSconfig = array()
 $substNEWwithIDs = Array()
 $substNEWwithIDs_table = Array()
 $recUpdateAccessCache = Array()
 $recInsertAccessCache = Array()
 $isRecordInWebMount_Cache = array()
 $isInWebMount_Cache = array()
 $pageCache = Array()
 $copyMappingArray = Array()
 $copyMappingArray_merged = Array()
 $registerDBList = array()
 $dbAnalysisStore = array()
 $removeFilesStore = array()
 $copiedFileMap = array()
 $checkValue_currentRecord = array()

Detailed Description

Definition at line 199 of file class.t3lib_tcemain.php.


Member Function Documentation

t3lib_TCEmain::_DELETE_FLEX_FORMdata &$  valueArrayToRemoveFrom,
deleteCMDS
 

[Describe function...]

Parameters:
[type] $$valueArrayToRemoveFrom: ...
[type] $deleteCMDS: ...
Returns:
[type] ...

Definition at line 1779 of file class.t3lib_tcemain.php.

t3lib_TCEmain::_DELETE_FLEX_FORMdata &$  valueArrayToRemoveFrom,
deleteCMDS
 

[Describe function...]

Parameters:
[type] $$valueArrayToRemoveFrom: ...
[type] $deleteCMDS: ...
Returns:
[type] ...

Definition at line 1779 of file class.t3lib_tcemain.php.

t3lib_TCEmain::assemblePermissions string  ) 
 

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

Parameters:
[type] $string: ...
Returns:
[type] ...

Definition at line 1208 of file class.t3lib_tcemain.php.

References t3lib_div::trimExplode().

t3lib_TCEmain::assemblePermissions string  ) 
 

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

Parameters:
[type] $string: ...
Returns:
[type] ...

Definition at line 1208 of file class.t3lib_tcemain.php.

References t3lib_div::trimExplode().

t3lib_TCEmain::checkModifyAccessList table  ) 
 

Checking group modify_table access list

Returns true if the user has general access to modify the $table

Parameters:
[type] $table: ...
Returns:
[type] ...

Definition at line 816 of file class.t3lib_tcemain.php.

References t3lib_div::inList(), and tableAdminOnly().

t3lib_TCEmain::checkModifyAccessList table  ) 
 

Checking group modify_table access list

Returns true if the user has general access to modify the $table

Parameters:
[type] $table: ...
Returns:
[type] ...

Definition at line 816 of file class.t3lib_tcemain.php.

References t3lib_div::inList(), and tableAdminOnly().

Referenced by process_datamap().

t3lib_TCEmain::checkRecordInsertAccess insertTable,
pid,
action = 1
 

Checks if user may insert a certain record.

Returns true if the user may insert a record from table $insertTable on page $pid

Parameters:
[type] $insertTable: ...
[type] $pid: ...
[type] $action: ...
Returns:
[type] ...

Definition at line 884 of file class.t3lib_tcemain.php.

References doesRecordExist(), getRecordProperties(), isTableAllowedForThisPage(), and log().

t3lib_TCEmain::checkRecordInsertAccess insertTable,
pid,
action = 1
 

Checks if user may insert a certain record.

Returns true if the user may insert a record from table $insertTable on page $pid

Parameters:
[type] $insertTable: ...
[type] $pid: ...
[type] $action: ...
Returns:
[type] ...

Definition at line 884 of file class.t3lib_tcemain.php.

References doesRecordExist(), getRecordProperties(), isTableAllowedForThisPage(), and log().

Referenced by process_datamap().

t3lib_TCEmain::checkRecordUpdateAccess table,
id
 

Checks if user may update a certain record.

Returns true if the user may update the record given by $table and $id

Parameters:
[type] $table: ...
[type] $id: ...
Returns:
[type] ...

Definition at line 859 of file class.t3lib_tcemain.php.

References doesRecordExist().

t3lib_TCEmain::checkRecordUpdateAccess table,
id
 

Checks if user may update a certain record.

Returns true if the user may update the record given by $table and $id

Parameters:
[type] $table: ...
[type] $id: ...
Returns:
[type] ...

Definition at line 859 of file class.t3lib_tcemain.php.

References doesRecordExist().

Referenced by process_datamap().

t3lib_TCEmain::checkStoredRecord table,
id,
fieldArray,
action
 

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

Parameters:
string Record table name
integer Record uid
array Array of field=>value pairs to insert/update
string Action, for logging only.
Returns:
array Selected row
See also:
insertDB(), updateDB()

Definition at line 2340 of file class.t3lib_tcemain.php.

t3lib_TCEmain::checkStoredRecord table,
id,
fieldArray,
action
 

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

Parameters:
string Record table name
integer Record uid
array Array of field=>value pairs to insert/update
string Action, for logging only.
Returns:
array Selected row
See also:
insertDB(), updateDB()

Definition at line 2340 of file class.t3lib_tcemain.php.

t3lib_TCEmain::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 Table name
string Field name
string Value to be evaluated. Notice, this is the INPUT value from the form. The original value (from any existing record) must be manually looked up inside the function if needed - or taken from $currentRecord array.
string The record-uid, mainly - but not exclusively - used for logging
string 'update' or 'new' flag
integer The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted. If $realPid is -1 it means that a new version of the record is being inserted.
integer $tscPID
Returns:
array Returns the evaluated $value as key "value" in this array. Can be checked with isset($res['value']) ...

Definition at line 1258 of file class.t3lib_tcemain.php.

References t3lib_div::inList(), and t3lib_div::loadTCA().

t3lib_TCEmain::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 Table name
string Field name
string Value to be evaluated. Notice, this is the INPUT value from the form. The original value (from any existing record) must be manually looked up inside the function if needed - or taken from $currentRecord array.
string The record-uid, mainly - but not exclusively - used for logging
string 'update' or 'new' flag
integer The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted. If $realPid is -1 it means that a new version of the record is being inserted.
integer $tscPID
Returns:
array Returns the evaluated $value as key "value" in this array. Can be checked with isset($res['value']) ...

Definition at line 1258 of file class.t3lib_tcemain.php.

References t3lib_div::inList(), and t3lib_div::loadTCA().

Referenced by fillInFieldArray().

t3lib_TCEmain::checkValue_check res,
value,
tcaFieldConf,
PP
 

Evaluates 'check' type values.

Parameters:
array The result array. The processed value (if any!) is set in the 'value' key.
string The value to set.
array Field configuration from TCA
array Additional parameters in a numeric array: $table,$id,$curValue,$status,$realPid,$recFID
Returns:
array Modified $res array

Definition at line 1402 of file class.t3lib_tcemain.php.

t3lib_TCEmain::checkValue_check res,
value,
tcaFieldConf,
PP
 

Evaluates 'check' type values.

Parameters:
array The result array. The processed value (if any!) is set in the 'value' key.
string The value to set.
array Field configuration from TCA
array Additional parameters in a numeric array: $table,$id,$curValue,$status,$realPid,$recFID
Returns:
array Modified $res array

Definition at line 1402 of file class.t3lib_tcemain.php.

t3lib_TCEmain::checkValue_flex res,
value,
tcaFieldConf,
PP,
uploadedFiles,
field
 

Evaluates 'flex' type values.

Parameters:
array The result array. The processed value (if any!) is set in the 'value' key.
string The value to set.
array Field configuration from TCA
array Additional parameters in a numeric array: $table,$id,$curValue,$status,$realPid,$recFID
array Uploaded files for the field
array Current record array.
string Field name
Returns:
array Modified $res array

Definition at line 1704 of file class.t3lib_tcemain.php.

References t3lib_div::_GP(), t3lib_div::array_merge_recursive_overrule(), t3lib_BEfunc::getFlexFormDS(), and t3lib_div::xml2array().

t3lib_TCEmain::checkValue_flex res,
value,
tcaFieldConf,
PP,
uploadedFiles,
field
 

Evaluates 'flex' type values.

Parameters:
array The result array. The processed value (if any!) is set in the 'value' key.
string The value to set.
array Field configuration from TCA
array Additional parameters in a numeric array: $table,$id,$curValue,$status,$realPid,$recFID
array Uploaded files for the field
array Current record array.
string Field name
Returns:
array Modified $res array

Definition at line 1704 of file class.t3lib_tcemain.php.

References t3lib_div::_GP(), t3lib_div::array_merge_recursive_overrule(), t3lib_BEfunc::getFlexFormDS(), and t3lib_div::xml2array().

t3lib_TCEmain::checkValue_flex_procInData dataPart,
dataPart_current,
uploadedFiles,
dataStructArray,
pParams,
callBackFunc = ''
 

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.

Parameters:
array The 'data' part of the INPUT flexform data
array The 'data' part of the CURRENT flexform data
array The uploaded files for the 'data' part of the INPUT flexform data
array Data structure for the form (might be sheets or not). Only values in the data array which has a configuration in the data structure will be processed.
array A set of parameters to pass through for the calling of the evaluation functions
string Optional call back function, see checkValue_flex_procInData_travDS()
Returns:
array The modified 'data' part.
See also:
checkValue_flex_procInData_travDS()

Definition at line 2009 of file class.t3lib_tcemain.php.

References t3lib_div::resolveSheetDefInDS().

t3lib_TCEmain::checkValue_flex_procInData dataPart,
dataPart_current,
uploadedFiles,
dataStructArray,
pParams,
callBackFunc = ''
 

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.

Parameters:
array The 'data' part of the INPUT flexform data
array The 'data' part of the CURRENT flexform data
array The uploaded files for the 'data' part of the INPUT flexform data
array Data structure for the form (might be sheets or not). Only values in the data array which has a configuration in the data structure will be processed.
array A set of parameters to pass through for the calling of the evaluation functions
string Optional call back function, see checkValue_flex_procInData_travDS()
Returns:
array The modified 'data' part.
See also:
checkValue_flex_procInData_travDS()

Definition at line 2009 of file class.t3lib_tcemain.php.

References t3lib_div::resolveSheetDefInDS().

t3lib_TCEmain::checkV