t3lib_TCEmain Klassenreferenz

Aufstellung aller Elemente

Öffentliche Methoden

 start ($data, $cmd, $altUserObject='')
 setMirror ($mirror)
 setDefaultsFromUserTS ($userTS)
 process_uploads ($postFiles)
 process_uploads_traverseArray (&$outputArr, $inputArr, $keyToSet)
 hook_processDatamap_afterDatabaseOperations (&$hookObjectsArr, &$status, &$table, &$id, &$fieldArray)
 process_datamap ()
 placeholderShadowing ($table, $id)
 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)
 checkValue_text ($res, $value, $tcaFieldConf, $PP, $field='')
 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, $addPrologue=FALSE)
 _ACTION_FLEX_FORMdata (&$valueArray, $actionCMDs)
 checkValue_inline ($res, $value, $tcaFieldConf, $PP, $field)
 checkValue_checkMax ($tcaFieldConf, $valueArray)
 getUnique ($table, $field, $value, $id, $newPid=0)
 checkValue_text_Eval ($value, $evalArray, $is_in)
 checkValue_input_Eval ($value, $evalArray, $is_in)
 checkValue_group_select_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $type, $currentTable)
 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, $structurePath)
 process_cmdmap ()
 copyRecord ($table, $uid, $destPid, $first=0, $overrideValues=array(), $excludeFields='', $language=0)
 copyPages ($uid, $destPid)
 copySpecificPage ($uid, $destPid, $copyTablesArray, $first=0)
 copyRecord_raw ($table, $uid, $pid, $overrideArray=array())
 rawCopyPageContent ($old_pid, $new_pid, $copyTablesArray)
 insertNewCopyVersion ($table, $fieldArray, $realPid)
 copyRecord_procBasedOnFieldType ($table, $uid, $field, $value, $row, $conf, $realDestPid, $language=0)
 copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 copyRecord_procFilesRefs ($conf, $uid, $value)
 copyRecord_fixRTEmagicImages ($table, $theNewSQLID)
 moveRecord ($table, $uid, $destPid)
 moveRecord_wsPlaceholders ($table, $uid, $destPid, $wsUid)
 moveRecord_raw ($table, $uid, $destPid)
 moveRecord_procFields ($table, $uid, $destPid)
 moveRecord_procBasedOnFieldType ($table, $uid, $destPid, $field, $value, $conf)
 localize ($table, $uid, $language)
 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)
 deleteRecord_flexFormCallBack ($dsArr, $dataValue, $PA, $structurePath, &$pObj)
 deletePages ($uid, $force=FALSE, $forceHardDelete=FALSE)
 deleteSpecificPage ($uid, $forceHardDelete=FALSE)
 canDeletePage ($uid)
 cannotDeleteRecord ($table, $id)
 deleteRecord_procFields ($table, $uid, $undeleteRecord=false)
 deleteRecord_procBasedOnFieldType ($table, $uid, $field, $value, $conf, $undeleteRecord=false)
 versionizeRecord ($table, $id, $label, $delete=FALSE, $versionizeTree=-1)
 versionizePages ($uid, $label, $versionizeTree)
 version_swap ($table, $id, $swapWith, $swapIntoWS=0)
 version_clearWSID ($table, $id, $flush=FALSE)
 version_setStage ($table, $id, $stageId, $comment='', $accumulateForNotifEmail=FALSE)
 version_swap_procBasedOnFieldType ($table, $field, $conf, &$curVersion, &$swapVersion)
 version_remapMMForVersionSwap ($table, $id, $swapWith)
 version_remapMMForVersionSwap_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path)
 version_remapMMForVersionSwap_execSwap ($table, $id, $swapWith)
 remapListedDBRecords ()
 remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid, $table)
 remapListedDBRecords_procInline ($conf, $value, $uid, $table)
 processRemapStack ()
 getVersionizedIncomingFieldArray ($table, $id, &$incomingFieldArray, &$registerDBList)
 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)
 tableReadOnly ($table)
 tableAdminOnly ($table)
 destNotInsideSelf ($dest, $id)
 getExcludeListArray ()
 doesPageHaveUnallowedTables ($page_uid, $doktype)
 pageInfo ($id, $field)
 recordInfo ($table, $id, $fieldList)
 getRecordProperties ($table, $id, $noWSOL=FALSE)
 getRecordPropertiesFromRow ($table, $row)
 updateDB ($table, $id, $fieldArray)
 insertDB ($table, $id, $fieldArray, $newVersion=FALSE, $suggestedUid=0, $dontSetNewIdIndex=FALSE)
 checkStoredRecord ($table, $id, $fieldArray, $action)
 setHistory ($table, $id, $logId)
 clearHistory ($maxAgeSeconds=604800, $table)
 updateRefIndex ($table, $id)
 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)
 deleteClause ($table)
 getTCEMAIN_TSconfig ($tscPID)
 getTableEntries ($table, $TSconfig)
 getPID ($table, $uid)
 dbAnalysisStoreExec ()
 removeRegisteredFiles ()
 removeCacheFiles ()
 int_pageTreeInfo ($CPtable, $pid, $counter, $rootID)
 compileAdminTables ()
 fixUniqueInPid ($table, $uid)
 fixCopyAfterDuplFields ($table, $uid, $prevUid, $update, $newData=array())
 extFileFields ($table)
 getUniqueFields ($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)
 notifyStageChange ($stat, $stageId, $table, $id, $comment)
 notifyStageChange_getEmails ($listOfUsers, $noTablePrefix=FALSE)
 isRecordCopied ($table, $uid)
 clear_cache ($table, $uid)
 clear_cacheCmd ($cacheCmd)
 log ($table, $recuid, $action, $recpid, $error, $details, $details_nr=-1, $data=array(), $event_pid=-1, $NEWid='')
 newlog ($message, $error=0)
 printLogErrorMessages ($redirect)
 internal_clearPageCache ()
 findPageIdsForVersionStateChange ($table, $idList, $workspaceId, &$pageIdList, &$elementList)
 findPageElementsForVersionStageChange ($pageIdList, $workspaceId, &$elementList)
 findRealPageIds (&$idList)
 findPageElementsForVersionSwap ($table, $id, $offlineId)
 insertUpdateDB_preprocessBasedOnFieldType ($table, $fieldArray)

Öffentliche Attribute

 $storeLogMessages = TRUE
 $enableLogging = TRUE
 $reverseOrder = FALSE
 $checkSimilar = TRUE
 $stripslashes_values = TRUE
 $checkStoredRecords = TRUE
 $checkStoredRecords_loose = TRUE
 $deleteTree = FALSE
 $neverHideAtCopy = FALSE
 $dontProcessTransformations = FALSE
 $clear_flexFormData_vDEFbase = FALSE
 $updateModeL10NdiffData = TRUE
 $bypassWorkspaceRestrictions = FALSE
 $bypassFileHandling = FALSE
 $bypassAccessCheckForRecords = FALSE
 $copyWhichTables = '*'
 $generalComment = ''
 $copyTree = 0
 $defaultValues = array()
 $overrideValues = array()
 $alternativeFileName = array()
 $data_disableFields = array()
 $suggestedInsertUids = array()
 $callBackObj
 $autoVersionIdMap = Array()
 $substNEWwithIDs = Array()
 $substNEWwithIDs_table = Array()
 $newRelatedIDs = Array()
 $copyMappingArray_merged = Array()
 $copiedFileMap = Array()
 $RTEmagic_copyIndex = Array()
 $errorLog = Array()
 $accumulateForNotifEmail = Array()
 $BE_USER
 $userid
 $username
 $admin
 $defaultPermissions
 $exclude_array
 $datamap = Array()
 $cmdmap = Array()
 $pMap
 $sortIntervals = 256
 $recUpdateAccessCache = Array()
 $recInsertAccessCache = Array()
 $isRecordInWebMount_Cache = array()
 $isInWebMount_Cache = array()
 $cachedTSconfig = array()
 $pageCache = Array()
 $checkWorkspaceCache = Array()
 $dbAnalysisStore = array()
 $removeFilesStore = array()
 $uploadedFileArray = array()
 $registerDBList = array()
 $registerDBPids = array()
 $copyMappingArray = Array()
 $remapStack = array()
 $remapStackRecords = array()
 $updateRefIndexStack = array()
 $callFromImpExp = false
 $newIndexMap = array()
 $fileFunc
 $checkValue_currentRecord = array()
 $autoVersioningUpdate = FALSE

Geschützte Methoden

 checkValue_inline_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $table, $field)
 inlineLocalizeSynchronize ($table, $id, $command)

Dokumentation der Elementfunktionen

t3lib_TCEmain::_ACTION_FLEX_FORMdata ( &$  valueArray,
actionCMDs 
)

Actions for flex form element (move, delete)

Parameter:
array &$valueArrayToRemoveFrom: by reference
array $deleteCMDS: ... *
Rückgabe:
void
t3lib_TCEmain::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.

Parameter:
string Table name
array Incoming array (passed by reference)
Rückgabe:
void
t3lib_TCEmain::assemblePermissions ( string  ) 

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

Parameter:
string List of pMap strings
Rückgabe:
integer Integer mask
Siehe auch:
setTSconfigPermissions(), newFieldArray()
t3lib_TCEmain::canDeletePage ( uid  ) 

Used to evaluate if a page can be deleted

Parameter:
integer Page id
Rückgabe:
mixed If array: List of page uids to traverse and delete (means OK), if string: error code.
t3lib_TCEmain::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.

Parameter:
string Record Table
integer Record UID
Rückgabe:
string Returns a string IF there is an error (error string explaining). FALSE means record can be deleted
t3lib_TCEmain::checkModifyAccessList ( table  ) 

Checking group modify_table access list

Parameter:
string Table name
Rückgabe:
boolean Returns true if the user has general access to modify the $table
t3lib_TCEmain::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.

Parameter:
string Tablename to check
integer Integer PID
integer For logging: Action number.
Rückgabe:
boolean Returns true if the user may insert a record from table $insertTable on page $pid
t3lib_TCEmain::checkRecordUpdateAccess ( table,
id 
)

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

Parameter:
string Record table
integer Record UID
Rückgabe:
boolean Returns true if the user may update the record given by $table and $id
t3lib_TCEmain::checkStoredRecord ( table,
id,
fieldArray,
action 
)

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

Parameter:
string Record table name
integer Record uid
array Array of field=>value pairs to insert/update
string Action, for logging only.
Rückgabe:
array Selected row
Siehe auch:
insertDB(), updateDB()
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() )

Parameter:
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
Rückgabe:
array Returns the evaluated $value as key "value" in this array. Can be checked with isset($res['value']) ...
t3lib_TCEmain::checkValue_check ( res,
value,
tcaFieldConf,
PP 
)

Evaluates 'check' type values.

Parameter:
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
Rückgabe:
array Modified $res array
t3lib_TCEmain::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.

Parameter:
array $tcaFieldConf: Field configuration from TCA
array $valueArray: Current value array of items
Rückgabe:
array The truncated value array of items
t3lib_TCEmain::checkValue_flex ( res,
value,
tcaFieldConf,
PP,
uploadedFiles,
field 
)

Evaluates 'flex' type values.

Parameter:
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
Rückgabe:
array Modified $res array
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. 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 class.t3lib_flexformtools.php

Parameter:
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() DEPRICATED, use class.t3lib_flexformtools.php instead for traversal!
Rückgabe:
array The modified 'data' part.
Siehe auch:
checkValue_flex_procInData_travDS()
t3lib_TCEmain::checkValue_flex_procInData_travDS ( &$  dataValues,
dataValues_current,
uploadedFiles,
DSelements,
pParams,
callBackFunc,
structurePath 
)

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.

Parameter:
array New values (those being processed): Multidimensional Data array for sheet/language, passed by reference!
array Current values: Multidimensional Data array. May be empty array() if not needed (for callBackFunctions)
array Uploaded files array for sheet/language. May be empty array() if not needed (for callBackFunctions)
array Data structure which fits the data array
array A set of parameters to pass through for the calling of the evaluation functions / call back function
string Call back function, default is checkValue_SW(). If $this->callBackObj is set to an object, the callback function in that object is called instead.
[type] $structurePath: ...
Rückgabe:
void
Siehe auch:
checkValue_flex_procInData()
t3lib_TCEmain::checkValue_flexArray2Xml ( array,
addPrologue = FALSE 
)

Converts an array to FlexForm XML

Parameter:
array Array with FlexForm data
boolean If set, the XML prologue is returned as well.
Rückgabe:
string Input array converted to XML
t3lib_TCEmain::checkValue_group_select ( res,
value,
tcaFieldConf,
PP,
uploadedFiles,
field 
)

Evaluates 'group' or 'select' type values.

Parameter:
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
[type] $uploadedFiles: ...
string Field name
Rückgabe:
array Modified $res array
t3lib_TCEmain::checkValue_group_select_explodeSelectGroupValue ( value  ) 

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

Parameter:
string Input string, comma separated values. For each part it will also be detected if a '|' is found and the first part will then be used if that is the case. Further the value will be rawurldecoded.
Rückgabe:
array The value array.
t3lib_TCEmain::checkValue_group_select_file ( valueArray,
tcaFieldConf,
curValue,
uploadedFileArray,
status,
table,
id,
recFID 
)

Handling files for group/select function

Parameter:
array Array of incoming file references. Keys are numeric, values are files (basically, this is the exploded list of incoming files)
array Configuration array from TCA of the field
string Current value of the field
array Array of uploaded files, if any
string Status ("update" or ?)
string tablename of record
integer UID of record
string Field identifier ([table:uid:field:....more for flexforms?]
Rückgabe:
array Modified value array
Siehe auch:
checkValue_group_select()
t3lib_TCEmain::checkValue_group_select_processDBdata ( valueArray,
tcaFieldConf,
id,
status,
type,
currentTable 
)

Returns data for group/db and select fields

Parameter:
array Current value array
array TCA field config
integer Record id, used for look-up of MM relations (local_uid)
string Status string ('update' or 'new')
string The type, either 'select', 'group' or 'inline'
string Table name, needs to be passed to t3lib_loadDBGroup
Rückgabe:
array Modified value array
t3lib_TCEmain::checkValue_inline ( res,
value,
tcaFieldConf,
PP,
field 
)

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

Parameter:
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
string Field name
Rückgabe:
array Modified $res array
t3lib_TCEmain::checkValue_inline_processDBdata ( valueArray,
tcaFieldConf,
id,
status,
table,
field 
) [protected]

Returns data for inline fields.

Parameter:
array Current value array
array TCA field config
integer Record id
string Status string ('update' or 'new')
string Table name, needs to be passed to t3lib_loadDBGroup
string The current field the values are modified for
Rückgabe:
string Modified values
t3lib_TCEmain::checkValue_input ( res,
value,
tcaFieldConf,
PP,
field = '' 
)

Evaluate "input" type values.

Parameter:
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
string Field name
Rückgabe:
array Modified $res array
t3lib_TCEmain::checkValue_input_Eval ( value,
evalArray,
is_in 
)

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

Parameter:
string Value to evaluate
array Array of evaluations to traverse.
string Is-in string for 'is_in' evaluation
Rückgabe:
array Modified $value in key 'value' or empty array
t3lib_TCEmain::checkValue_radio ( res,
value,
tcaFieldConf,
PP 
)

Evaluates 'radio' type values.

Parameter:
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
Rückgabe:
array Modified $res array
t3lib_TCEmain::checkValue_SW ( res,
value,
tcaFieldConf,
table,
id,
curValue,
status,
realPid,
recFID,
field,
uploadedFiles,
tscPID 
)

Branches out evaluation of a field value based on its type as configured in TCA Can be called for FlexForm pseudo fields as well, BUT must not have $field set if so.

Parameter:
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
string Table name
integer Return UID
[type] $curValue: ...
[type] $status: ...
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.
[type] $recFID: ...
string Field name. Must NOT be set if the call is for a flexform field (since flexforms are not allowed within flexforms).
[type] $uploadedFiles: ...
[type] $tscPID: ...
Rückgabe:
array Returns the evaluated $value as key "value" in this array.
t3lib_TCEmain::checkValue_text ( res,
value,
tcaFieldConf,
PP,
field = '' 
)

Evaluate "text" type values.

Parameter:
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
string Field name
Rückgabe:
array Modified $res array
t3lib_TCEmain::clear_cache ( table,
uid 
)

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.

Parameter:
string Table name of record that was just updated.
integer UID of updated / inserted record
Rückgabe:
void
t3lib_TCEmain::clear_cacheCmd ( cacheCmd  ) 

Clears the cache based on the command $cacheCmd.

$cacheCmd='pages': Clears cache for all pages. 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.

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

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

Note: The following cache_* are intentionally not cleared by $cacheCmd='all':

  • cache_md5params: Clearing this table would destroy all simulateStatic URLs, simulates file name and 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.
  • cache_extensions: Clearing this table would make the extension manager unusable until a new extension list is fetched from the TER.
Parameter:
string the cache command, see above description
Rückgabe:
void
t3lib_TCEmain::clearHistory ( maxAgeSeconds = 604800,
table 
)

Clearing sys_history table from older entries that are expired.

Parameter:
integer $maxAgeSeconds (int+) however will set a max age in seconds so that any entry older than current time minus the age removed no matter what. If zero, this is not effective.
string table where the history should be cleared
Rückgabe:
void
t3lib_TCEmain::clearPrefixFromValue ( table,
value 
)

Removes the prependAtCopy prefix on values

Parameter:
string Table name
string The value to fix
Rückgabe:
string Clean name
t3lib_TCEmain::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

Parameter:
string Record table name
integer Record uid
array Array of field=>value pairs intended to be inserted into the database. All keys with values matching exactly the current value will be unset!
Rückgabe:
array Returns $fieldArray. If the returned array is empty, then the record should not be updated!
t3lib_TCEmain::compileAdminTables (  ) 

List of all tables (those administrators has access to = array_keys of $TCA)

Rückgabe:
array Array of all TCA table names
t3lib_TCEmain::convNumEntityToByteValue ( input  ) 

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

Parameter:
string Input string
Rückgabe:
string Output string
t3lib_TCEmain::copyPages ( uid,
destPid 
)

Copying pages Main function for copying pages.

Parameter:
integer Page UID to copy
integer Destination PID: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
Rückgabe:
void
t3lib_TCEmain::copyRecord ( table,
uid,
destPid,
first = 0,
overrideValues = array(),
excludeFields = '',
language = 0 
)

Copying a single record

Parameter:
string Element table
integer Element UID
integer $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
boolean $first is a flag set, if the record copied is NOT a 'slave' to another record copied. That is, if this record was asked to be copied in the cmd-array
array Associative array with field/value pairs to override directly. Notice; Fields must exist in the table record and NOT be among excluded fields!
string Commalist of fields to exclude from the copy process (might get default values)
integer Language ID (from sys_language table)
Rückgabe:
integer ID of new record, if any
t3lib_TCEmain::copyRecord_fixRTEmagicImages ( table,
theNewSQLID 
)

Copies any "RTEmagic" image files found in record with table/id to new names. Usage: After copying a record this function should be called to search for "RTEmagic"-images inside the record. If such are found they should be duplicated to new names so all records have a 1-1 relation to them. Reason for copying RTEmagic files: a) if you remove an RTEmagic image from a record it will remove the file - any other record using it will have a lost reference! b) RTEmagic images keeps an original and a copy. The copy always is re-calculated to have the correct physical measures as the HTML tag inserting it defines. This is calculated from the original. Two records using the same image could have difference HTML-width/heights for the image and the copy could only comply with one of them. If you don't want a 1-1 relation you should NOT use RTEmagic files but just insert it as a normal file reference to a file inside fileadmin/ folder

Parameter:
string Table name
integer Record UID
Rückgabe:
void
t3lib_TCEmain::copyRecord_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.

Parameter:
array Array of parameters in num-indexes: table, uid, field
array TCA field configuration (from Data Structure XML)
string The value of the flexForm field
string Not used.
string Not used.
Rückgabe:
array Result array with key "value" containing the value of the processing.
Siehe auch:
copyRecord(), checkValue_flex_procInData_travDS()
t3lib_TCEmain::copyRecord_procBasedOnFieldType ( table,
uid,
field,
value,
row,
conf,
realDestPid,
language = 0 
)

Processing/Preparing content for copyRecord() function

Parameter:
string Table name
integer Record uid
string Field name being processed
string Input value to be processed.
array Record array
array TCA field configuration
integer Real page id (pid) the record is copied to
integer Language ID (from sys_language table) used in the duplicated record
Rückgabe:
mixed Processed value. Normally a string/integer, but can be an array for flexforms! private
Siehe auch:
copyRecord()
t3lib_TCEmain::copyRecord_procFilesRefs ( conf,
uid,
value 
)

Modifying a field value for any situation regarding files/references: For attached files: take current filenames and prepend absolute paths so they get copied. For DB references: Nothing done.

Parameter:
array TCE field config
integer Record UID
string Field value (eg. list of files)
Rückgabe:
string The (possibly modified) value
Siehe auch:
copyRecord(), copyRecord_flexFormCallBack()
t3lib_TCEmain::copyRecord_raw ( table,
uid,
pid,
overrideArray = array() 
)

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 tcemain 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.

Parameter:
string Element table
integer Element UID
integer Element PID (real PID, not checked)
array Override array - must NOT contain any fields not in the table!
Rückgabe:
integer Returns the new ID of the record (if applicable)
t3lib_TCEmain::copySpecificPage ( uid,
destPid,
copyTablesArray,
first = 0 
)

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

Parameter:
integer Page uid
integer Destination PID: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
array Table on pages to copy along with the page.
boolean $first is a flag set, if the record copied is NOT a 'slave' to another record copied. That is, if this record was asked to be copied in the cmd-array
Rückgabe:
integer The id of the new page, if applicable.
t3lib_TCEmain::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

Rückgabe:
void
t3lib_TCEmain::deleteAction ( table,
id 
)

Delete a single record

Parameter:
string Table name
integer Record UID
Rückgabe:
void
t3lib_TCEmain::deleteClause ( table  ) 

Returns delete-clause for the $table

Parameter:
string Table name
Rückgabe:
string Delete clause
t3lib_TCEmain::deleteEl ( table,
uid,
noRecordCheck = FALSE,
forceHardDelete = FALSE 
)

Delete element from any table

Parameter:
string Table name
integer Record UID
boolean Flag: If $noRecordCheck is set, then the function does not check permission to delete record
boolean If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Rückgabe:
void
t3lib_TCEmain::deletePages ( uid,
force = FALSE,
forceHardDelete = FALSE 
)

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

Parameter:
integer Page id
boolean If TRUE, pages are not checked for permission.
boolean If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Rückgabe:
void
t3lib_TCEmain::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!

Parameter:
string Table name
integer Record UID
boolean Flag: If $noRecordCheck is set, then the function does not check permission to delete record
boolean If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
boolean If TRUE, the "deleted" flag is set to 0 again and thus, the item is undeleted.
Rückgabe:
void
t3lib_TCEmain::deleteRecord_flexFormCallBack ( dsArr,
dataValue,
PA,
structurePath,
&$  pObj 
)

Call back function for deleting file relations for flexform fields in records which are being completely deleted.

Parameter:
[type] $dsArr: ...
[type] $dataValue: ...
[type] $PA: ...
[type] $structurePath: ...
[type] $pObj: ...
Rückgabe:
[type] ...
t3lib_TCEmain::deleteRecord_procBasedOnFieldType ( table,
uid,
field,
value,
conf,
undeleteRecord = false 
)

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

Parameter:
string $table: Record Table
string $uid: Record UID
string $field: Record field
string $value: Record field value
array $conf: TCA configuration of current field
boolean $undeleteRecord: If a record should be undeleted (e.g. from history/undo)
Rückgabe:
void
Siehe auch:
deleteRecord()
t3lib_TCEmain::deleteRecord_procFields ( table,
uid,
undeleteRecord = false 
)

Beford 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.

Parameter:
string $table: Record Table
string $uid: Record UID
boolean $undeleteRecord: If a record should be undeleted (e.g. from history/undo)
Rückgabe:
void
Siehe auch:
deleteRecord()
t3lib_TCEmain::deleteSpecificPage ( uid,
forceHardDelete = FALSE 
)

Delete a page and all records on it.

Parameter:
integer Page id
boolean If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Rückgabe:
void private
Siehe auch:
deletePages()
t3lib_TCEmain::deleteVersionsForRecord ( table,
uid,
forceHardDelete 
)

Delete versions for element from any table

Parameter:
string Table name
integer Record UID
boolean If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Rückgabe:
void
t3lib_TCEmain::destNotInsideSelf ( dest,
id 
)

Checks if piage $id is a uid in the rootline from page id, $dest Used when moving a page

Parameter:
integer Destination Page ID to test
integer Page ID to test for presence inside Destination
Rückgabe:
boolean Returns false if ID is inside destination (including equal to)
t3lib_TCEmain::destPathFromUploadFolder ( folder  ) 

Returns absolute destination path for the uploadfolder, $folder

Parameter:
string Upload folder name, relative to PATH_site
Rückgabe:
string Input string prefixed with PATH_site
t3lib_TCEmain::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

Parameter:
string List of page uids, this is added to and outputted in the end
integer Page ID to select subpages from.
integer Perms integer to check each page record for.
boolean Recursion flag: If set, it will go out through the branch.
Rückgabe:
string List of integers in branch
t3lib_TCEmain::doesPageHaveUnallowedTables ( page_uid,
doktype 
)

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

Parameter:
integer Page ID
integer Page doktype
Rückgabe:
array Returns a list of the tables that are 'present' on the page but not allowed with the page_uid/doktype
t3lib_TCEmain::doesRecordExist ( table,
id,
perms 
)

Checks if record can be selected based on given permission criteria

Parameter:
string Record table name
integer Record UID
mixed Permission restrictions to observe: Either an integer that will be bitwise AND'ed or a string, which points to a key in the ->pMap array
Rückgabe:
boolean Returns true if the record given by $table, $id and $perms can be selected
t3lib_TCEmain::doesRecordExist_pageLookUp ( id,
perms 
)

Looks up a page based on permissions.

Parameter:
integer Page id
integer Permission integer
Rückgabe:
pointer MySQL result pointer (from exec_SELECTquery()) private
Siehe auch:
doesRecordExist()
t3lib_TCEmain::extFileFields ( table  ) 

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

Parameter:
string Table name
Rückgabe:
array Array of fieldnames that are either "group" or "file" types.
t3lib_TCEmain::extFileFunctions ( table,
field,
filelist,
func 
)

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

Parameter:
string Table name
string Field name
string List of files to work on from field
string Function, eg. "deleteAll" which will delete all files listed.
Rückgabe:
void
t3lib_TCEmain::fillInFieldArray ( table,
id,
fieldArray,
incomingFieldArray,
realPid,
status,
tscPID 
)

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

Parameter:
string Table name
integer Record ID
array Default values, Preset $fieldArray with 'pid' maybe (pid and uid will be not be overridden anyway)
array $incomingFieldArray is which fields/values you want to set. There are processed and put into $fieldArray if OK
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.
string $status = 'new' or 'update'
integer $tscPID: TSconfig PID
Rückgabe:
array Field Array
t3lib_TCEmain::findPageElementsForVersionStageChange ( pageIdList,
workspaceId,
&$  elementList 
)

Searches for all elements from all tables on the given pages in the same workspace.

Parameter:
array $pageIdList List of PIDs to search
int $workspaceId Workspace ID
array $elementList List of found elements. Key is table name, value is array of element UIDs
Rückgabe:
void
t3lib_TCEmain::findPageElementsForVersionSwap ( table,
id,
offlineId 
)

Finds all elements for swapping versions in workspace

Parameter:
string $table Table name of the original element to swap
int $id UID of the original element to swap (online)
int $offlineId As above but offline
Rückgabe:
array Element data. Key is table name, values are array with first element as online UID, second - offline UID
t3lib_TCEmain::findPageIdsForVersionStateChange ( table,
idList,
workspaceId,
&$  pageIdList,
&$  elementList 
)

Finds page UIDs for the element from table $table with UIDs from $idList

Parameter:
array $table Table to search
array $idList List of records' UIDs
int $workspaceId Workspace ID. We need this parameter because user can be in LIVE but he still can publisg DRAFT from ws module!
array $pageIdList List of found page UIDs
array $elementList List of found element UIDs. Key is table name, value is list of UIDs
Rückgabe:
void
t3lib_TCEmain::findRealPageIds ( &$  idList  ) 

Finds real page IDs for state change.

Parameter:
array $idList List of page UIDs, possibly versioned
Rückgabe:
void
t3lib_TCEmain::fixCopyAfterDuplFields ( table,
uid,
prevUid,
update,
newData = array() 
)

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)

Parameter:
string Table name
integer Record UID
integer UID of previous record
boolean If set, updates the record
array Input array. If fields are already specified AND $update is not set, values are not set in output array.
Rückgabe:
array Output array (For when the copying operation needs to get the information instead of updating the info)
t3lib_TCEmain::fixUniqueInPid ( table,
uid 
)

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

Parameter:
string Table name
integer Record UID
Rückgabe:
void
t3lib_TCEmain::getCopyHeader ( table,
pid,
field,
value,
count,
prevTitle = '' 
)

Get modified header for a copied record

Parameter:
string Table name
integer PID value in which other records to test might be
string Field name to get header value for.
string Current field value
integer Counter (number of recursions)
string Previous title we checked for (in previous recursion)
Rückgabe:
string The field value, possibly appended with a "copy label"
t3lib_TCEmain::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

Rückgabe:
array Array of [table]-[field] pairs to exclude from editing.
t3lib_TCEmain::getInlineFieldType ( conf  ) 

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

Parameter:
array config array for TCA/columns field
Rückgabe:
mixed string: inline subtype (field|mm|list), boolean: false
t3lib_TCEmain::getPID ( table,
uid 
)

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

Parameter:
string Table name
integer Record uid
Rückgabe:
integer PID value (unless the record did not exist in which case FALSE)
t3lib_TCEmain::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 loggin

Parameter:
string Table name
integer Uid of record
boolean If set, no workspace overlay is performed
Rückgabe:
array Properties of record
t3lib_TCEmain::getRecordPropertiesFromRow ( table,
row 
)

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

Parameter:
string Table name
array Input row
Rückgabe:
array Output array
t3lib_TCEmain::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.

Parameter:
string Table name
integer Uid of record to find sorting number for. May be zero in case of new.
integer Positioning PID, either >=0 (pointing to page in which case we find sorting number for first record in page) or <0 (pointing to record in which case to find next sorting number after this record)
Rückgabe:
mixed Returns integer if PID is >=0, otherwise an array with PID and sorting number. Possibly false in case of error.
t3lib_TCEmain::getTableEntries ( table,
TSconfig 
)

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

Parameter:
string Table name
array TSconfig for page
Rückgabe:
array TSconfig merged
Siehe auch:
getTCEMAIN_TSconfig()
t3lib_TCEmain::getTCEMAIN_TSconfig ( tscPID  ) 

Return TSconfig for a page id

Parameter:
integer Page id (PID) from which to get configuration.
Rückgabe:
array TSconfig array, if any
t3lib_TCEmain::getUnique ( table,
field,
value,
id,
newPid = 0 
)

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

Parameter:
string Table name
string Field name for which $value must be unique
string Value string.
integer UID to filter out in the lookup (the record itself...)
integer If set, the value will be unique for this PID
Rückgabe:
string Modified value (if not-unique). Will be the value appended with a number (until 100, then the function just breaks).
t3lib_TCEmain::getUniqueFields ( table  ) 

Returns all fieldnames from a table which have the unique evaluation type set.

Parameter:
string Table name
Rückgabe:
array Array of fieldnames
t3lib_TCEmain::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!

Parameter:
string $table: Table name of the parent record
integer $id: Uid of the parent record
array $incomingFieldArray: Reference to the incominfFieldArray of process_datamap
array 
registerDBList
Reference to the

registerDBList array that was created/updated by versionizing calls to TCEmain in process_datamap.

Rückgabe:
void
t3lib_TCEmain::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.

Parameter:
object $hookObjectsArr: (reference) Array with hook objects
string $status: (reference) Status of the current operation, 'new' or 'update
string $table: (refrence) 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
Rückgabe:
void
t3lib_TCEmain::inlineLocalizeSynchronize ( table,
id,
command 
) [protected]

Performs localization or synchronization of child records.

Parameter:
string $table: The table of the localized parent record
integer $id: The uid of the localized parent record
mixed $command: Defines the type 'localize' or 'synchronize' (string) or a single uid to be localized (integer)
Rückgabe:
void
t3lib_TCEmain::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

Parameter:
string Record table name
string "NEW...." uid string
array Array of field=>value pairs to insert. FIELDS MUST MATCH the database FIELDS. No check is done. "pid" must point to the destination of the record!
boolean Set to true if new version is created.
integer Suggested UID value for the inserted record. See the array $this->suggestedInsertUids; Admin-only feature
boolean If true, the ->substNEWwithIDs array is not updated. Only useful in very rare circumstances!
Rückgabe:
integer Returns ID on success.
t3lib_TCEmain::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...

Parameter:
string Table name
array Field array to insert as a record
integer The value of PID field. -1 is indication that we are creating a new version!
Rückgabe:
integer Returns the new ID of the record (if applicable)
t3lib_TCEmain::insertUpdateDB_preprocessBasedOnFieldType ( table,
fieldArray 
)

Proprocesses 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.

Parameter:
string $table Table name
array $fieldArray Field array to check
Rückgabe:
array Updated field array
t3lib_TCEmain::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!

Parameter:
array Accumulation of page uid=>pid pairs in branch of $pid
integer Page ID for which to find subpages
integer Number of levels to go down.
integer ID of root point for new copied branch: The idea seems to be that a copy is not made of the already new page!
Rückgabe:
array Return array.
t3lib_TCEmain::internal_clearPageCache (  ) 

Clears page cache. Takes into account file cache.

Rückgabe:
void
t3lib_TCEmain::isInWebMount ( pid  ) 

Checks if the input page ID is in the BE_USER webmounts

Parameter:
integer Page ID to check
Rückgabe:
boolean True if OK. Cached results.
t3lib_TCEmain::isRecordCopied ( table,
uid 
)

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

Parameter:
string $table: The tablename of the record
integer $uid: The uid of the record
Rückgabe:
boolean Returns true if the record is copied or is the result of a copy action
t3lib_TCEmain::isRecordInWebMount ( table,
id 
)

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

Parameter:
string Table name
integer UID of record
Rückgabe:
boolean Returns true if OK. Cached results.
t3lib_TCEmain::isReferenceField ( conf  ) 

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

Parameter:
array config array for TCA/columns field
Rückgabe:
boolean True if DB reference field (group/db or select with foreign-table)
t3lib_TCEmain::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.

Parameter:
integer Page id for which to check, including 0 (zero) if checking for page tree root.
string Table name to check
Rückgabe:
boolean True if OK
t3lib_TCEmain::localize ( table,
uid,
language 
)

Localizes a record to another system language In reality it only works if transOrigPointerTable is not set. For "pages" the implementation is hardcoded

Parameter:
string Table name
integer Record uid (to be localized)
integer Language ID (from sys_language table)
Rückgabe:
mixed The uid (integer) of the new translated record or false (boolean) if something went wrong
t3lib_TCEmain::log ( table,
recuid,
action,
recpid,
error,
details,
details_nr = -1,
data = array(),
event_pid = -1,
NEWid = '' 
)

Logging actions from TCEmain

Parameter:
string Table name the log entry is concerned with. Blank if NA
integer Record UID. Zero if NA
integer Action number: 0=No category, 1=new record, 2=update record, 3= delete record, 4= move record, 5= Check/evaluate
integer Normally 0 (zero). If set, it indicates that this log-entry is used to notify the backend of a record which is moved to another location
integer The severity: 0 = message, 1 = error, 2 = System Error, 3 = security notice (admin)
string Default error message in english
integer This number is unique for every combination of $type and $action. This is the error-message number, which can later be used to translate error messages. 0 if not categorized, -1 if temporary
array Array with special information that may go into $details by 's' marks / sprintf() when the log is shown
integer The page_uid (pid) where the event occurred. Used to select log-content for specific pages.
string NEW id for new records
Rückgabe:
integer Log entry UID
Siehe auch:
class.t3lib_userauthgroup.php
t3lib_TCEmain::moveRecord ( table,
uid,
destPid 
)

Moving single records

Parameter:
string Table name to move
integer Record uid to move
integer Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
Rückgabe:
void
t3lib_TCEmain::moveRecord_procBasedOnFieldType ( table,
uid,
destPid,
field,
value,
conf 
)

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

Parameter:
string $table: Record Table
string $uid: Record UID
string $destPid: Position to move to
string $field: Record field
string $value: Record field value
array $conf: TCA configuration of current field
Rückgabe:
void
t3lib_TCEmain::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.

Parameter:
string $table: Record Table
string $uid: Record UID
string $destPid: Position to move to
Rückgabe:
void
t3lib_TCEmain::moveRecord_raw ( table,
uid,
destPid 
)

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

Parameter:
string Table name to move
integer Record uid to move
integer Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
Rückgabe:
void
Siehe auch:
moveRecord()
t3lib_TCEmain::moveRecord_wsPlaceholders ( table,
uid,
destPid,
wsUid 
)

Creates a move placeholder for workspaces. USE ONLY INTERNALLY Moving placeholder: Can be done because the system sees it as a placeholder for NEW elements like t3ver_state=1 Moving original: Will either create the placeholder if it doesn't exist or move existing placeholder in workspace.

Parameter:
string Table name to move
integer Record uid to move (online record)
integer Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
integer UID of offline version of online record
Rückgabe:
void
Siehe auch:
moveRecord()
t3lib_TCEmain::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

Parameter:
string Table name for which to set default values.
Rückgabe:
array Array with default values.
t3lib_TCEmain::newlog ( message,
error = 0 
)

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

Parameter:
string Message string
integer Error code, see log()
Rückgabe:
integer Log entry UID
Siehe auch:
log()
t3lib_TCEmain::noRecordsFromUnallowedTables ( inList  ) 

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

Parameter:
string List of page integers
Rückgabe:
boolean Return true, if permission granted
t3lib_TCEmain::notifyStageChange ( stat,
stageId,
table,
id,
comment 
)

Send an email notification to users in workspace

Parameter:
array Workspace access array (from t3lib_userauthgroup::checkWorkspace())
integer New Stage number: 0 = editing, 1= just ready for review, 10 = ready for publication, -1 = rejected!
string Table name of element (or list of element names if $id is zero)
integer Record uid of element (if zero, then $table is used as reference to element(s) alone)
string User comment sent along with action
Rückgabe:
void
t3lib_TCEmain::notifyStageChange_getEmails ( listOfUsers,
noTablePrefix = FALSE 
)

Return emails addresses of be_users from input list.

Parameter:
string List of backend users, on the form "be_users_10,be_users_2" or "10,2" in case noTablePrefix is set.
boolean If set, the input list are integers and not strings.
Rückgabe:
array Array of emails
t3lib_TCEmain::overrideFieldArray ( table,
data 
)

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

Parameter:
string Table name
array Data array with fields from table. These will be overlaid with values in $this->overrideValues[$table]
Rückgabe:
array Data array, processed.
t3lib_TCEmain::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 performanceloss since it doesn't look up the same record twice!

Parameter:
integer Page uid
string Field name for which to return value
Rückgabe:
string Value of the field. Result is cached in $this->pageCache[$id][$field] and returned from there next time!
t3lib_TCEmain::placeholderShadowing ( table,
id 
)

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

Parameter:
string Table name
integer Record uid
Rückgabe:
void
t3lib_TCEmain::prependLabel ( table  ) 

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

Parameter:
string Table name
Rückgabe:
string Label to append, containing "%s" for the number
Siehe auch:
getCopyHeader()
t3lib_TCEmain::printLogErrorMessages ( redirect  ) 

Print log error messages from the operations of this script instance

Parameter:
string Redirect URL (for creating link in message)
Rückgabe:
void (Will exit on error)
t3lib_TCEmain::process_cmdmap (  ) 

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

Rückgabe:
void
t3lib_TCEmain::process_datamap (  ) 

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

Rückgabe:
void
t3lib_TCEmain::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.

Parameter:
array $_FILES array
Rückgabe:
void
t3lib_TCEmain::process_uploads_traverseArray ( &$  outputArr,
inputArr,
keyToSet 
)

Traverse the upload array if needed to rearrange values.

Parameter:
array $this->uploadedFileArray passed by reference
array Input array ($_FILES parts)
string The current $_FILES array key to set on the outermost level.
Rückgabe:
void private
Siehe auch:
process_uploads()
t3lib_TCEmain::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.

Rückgabe:
void
t3lib_TCEmain::rawCopyPageContent ( old_pid,
new_pid,
copyTablesArray 
)

Copies all records from tables in $copyTablesArray from page with $old_pid to page with $new_pid Uses raw-copy for the operation (meant for versioning!)

Parameter:
integer Current page id.
integer New page id
array Array of tables from which to copy
Rückgabe:
void
Siehe auch:
versionizePages()
t3lib_TCEmain::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!

Parameter:
string Table name
integer UID of the record from $table
string Field list for the SELECT query, eg. "*" or "uid,pid,..."
Rückgabe:
mixed Returns the selected record on success, otherwise false.
t3lib_TCEmain::remapListedDBRecords (  ) 

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

Rückgabe:
void
t3lib_TCEmain::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.

Parameter:
array Set of parameters in numeric array: table, uid, field
array TCA config for field (from Data Structure of course)
string Field value (from FlexForm XML)
string Not used
string Not used
Rückgabe:
array Array where the "value" key carries the value.
Siehe auch:
checkValue_flex_procInData_travDS(), remapListedDBRecords()
t3lib_TCEmain::remapListedDBRecords_procDBRefs ( conf,
value,
MM_localUid,
table 
)

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

Parameter:
array TCA field config
string Field value
integer UID of local record (for MM relations - might need to change if support for FlexForms should be done!)
string Table name
Rückgabe:
array Returns array of items ready to implode for field content.
Siehe auch:
remapListedDBRecords()
t3lib_TCEmain::remapListedDBRecords_procInline ( conf,
value,
uid,
table 
)

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

Parameter:
array $conf: TCA field config
string $value: Field value
integer $uid: The uid of the ORIGINAL record
string $table: Table name
Rückgabe:
void
t3lib_TCEmain::removeCacheFiles (  ) 

Unlink (delete) typo3conf/temp_CACHED_*.php cache files

Rückgabe:
integer The number of files deleted
t3lib_TCEmain::removeRegisteredFiles (  ) 

Removing files registered for removal before exit

Rückgabe:
void
t3lib_TCEmain::resolvePid ( table,
pid 
)

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

Parameter:
string Table name
integer "Destination pid" : If the value is >= 0 it's just returned directly (through intval() 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!
Rückgabe:
integer
t3lib_TCEmain::resorting ( table,
pid,
sortRow,
return_SortNumber_After_This_Uid 
)

Resorts a table. Used internally by getSortNumber()

Parameter:
string Table name
integer Pid in which to resort records.
string Sorting row
integer Uid 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
Rückgabe:
integer If $return_SortNumber_After_This_Uid is set, will contain usable sorting number after that record if found (otherwise 0) private
Siehe auch:
getSortNumber()
t3lib_TCEmain::rmComma ( input  ) 

Returns the $input string without a comma in the end

Parameter:
string Input string
Rückgabe:
string Output string with any comma in the end removed, if any.
t3lib_TCEmain::setDefaultsFromUserTS ( userTS  ) 

Initializes default values coming from User TSconfig

Parameter:
array User TSconfig array
Rückgabe:
void
t3lib_TCEmain::setHistory ( table,
id,
logId 
)

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

Parameter:
string Table name
integer Record ID
integer Log entry ID, important for linking between log and history views
Rückgabe:
void
t3lib_TCEmain::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]

Parameter:
array This array has the syntax $mirror[table_name][uid] = [list of uids to copy data-value TO!]
Rückgabe:
void
t3lib_TCEmain::setTSconfigPermissions ( fieldArray,
TSConfig_p 
)

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

Parameter:
array Field Array, returned with modifications
array TSconfig properties
Rückgabe:
array Modified Field Array
t3lib_TCEmain::start ( data,
cmd,
altUserObject = '' 
)

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

Parameter:
array Data to be modified or inserted in the database
array Commands to copy, move, delete, localize, versionize records.
object An alternative userobject you can set instead of the default, which is $GLOBALS['BE_USER']
Rückgabe:
void
t3lib_TCEmain::tableAdminOnly ( table  ) 

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

Parameter:
string Table name
Rückgabe:
boolean True, if readonly
t3lib_TCEmain::tableReadOnly ( table  ) 

Checks if the $table is readOnly

Parameter:
string Table name
Rückgabe:
boolean True, if readonly
t3lib_TCEmain::undeleteRecord ( table,
uid 
)

Undelete a single record

Parameter:
string Table name
integer Record UID
Rückgabe:
void
t3lib_TCEmain::updateDB ( table,
id,
fieldArray 
)

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

Parameter:
string Record table name
integer Record uid
array Array of field=>value pairs to insert. FIELDS MUST MATCH the database FIELDS. No check is done.
Rückgabe:
void
t3lib_TCEmain::updateRefIndex ( table,
id 
)

Update Reference Index (sys_refindex) for a record Should be called any almost any update to a record which could affect references inside the record.

Parameter:
string Table name
integer Record UID
Rückgabe:
void
t3lib_TCEmain::version_clearWSID ( table,
id,
flush = FALSE 
)

Release version from this workspace (and into "Live" workspace but as an offline version).

Parameter:
string Table name
integer Record UID
boolean If set, will completely delete element
Rückgabe:
void
t3lib_TCEmain::version_remapMMForVersionSwap ( table,
id,
swapWith 
)

Swaps MM-relations for current/swap record, see version_swap()

Parameter:
string Table for the two input records
integer Current record (about to go offline)
integer Swap record (about to go online)
Rückgabe:
void
Siehe auch:
version_swap()
t3lib_TCEmain::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.

Parameter:
string Table for the two input records
integer Current record (about to go offline)
integer Swap record (about to go online)
Rückgabe:
void
Siehe auch:
version_remapMMForVersionSwap()
t3lib_TCEmain::version_remapMMForVersionSwap_flexFormCallBack ( pParams,
dsConf,
dataValue,
dataValue_ext1,
dataValue_ext2,
path 
)

Callback function for traversing the FlexForm structure in relation to ...

Parameter:
array Array of parameters in num-indexes: table, uid, field
array TCA field configuration (from Data Structure XML)
string The value of the flexForm field
string Not used.
string Not used.
string Path in flexforms
Rückgabe:
array Result array with key "value" containing the value of the processing.
Siehe auch:
version_remapMMForVersionSwap(), checkValue_flex_procInData_travDS()
t3lib_TCEmain::version_setStage ( table,
id,
stageId,
comment = '',
accumulateForNotifEmail = FALSE 
)

Setting stage of record

Parameter:
string Table name
integer Record UID
integer Stage ID to set
string Comment that goes into log
boolean Accumulate state changes in memory for compiled notification email?
Rückgabe:
void
t3lib_TCEmain::version_swap ( table,
id,
swapWith,
swapIntoWS = 0 
)

Swapping versions of a record Version from archive (future/past, called "swap version") will get the uid of the "t3ver_oid", the official element with uid = "t3ver_oid" will get the new versions old uid. PIDs are swapped also

Parameter:
string Table name
integer UID of the online record to swap
integer UID of the archived version to swap with!
boolean If set, swaps online into workspace instead of publishing out of workspace.
Rückgabe:
void
t3lib_TCEmain::version_swap_procBasedOnFieldType ( table,
field,
conf,
&$  curVersion,
&$  swapVersion 
)

Update relations on version/workspace swapping.

Parameter:
string $table: Record Table
string $field: Record field
array $conf: TCA configuration of current field
string $curVersion: Reference to the current (original) record
string $swapVersion: Reference to the record (workspace/versionized) to publish in or swap with
Rückgabe:
void
t3lib_TCEmain::versionizePages ( uid,
label,
versionizeTree 
)

Creates a new version of a page including content and possible subpages.

Parameter:
integer Page uid to create new version of.
string Version label
integer Indicating "treeLevel" - "page" (0) or "branch" (>=1) ["element" type must call versionizeRecord() directly]
Rückgabe:
void
Siehe auch:
copyPages()
t3lib_TCEmain::versionizeRecord ( table,
id,
label,
delete = FALSE,
versionizeTree = -1 
)

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

Parameter:
string Table name
integer Record uid to versionize
string Version label
boolean If true, the version is created to delete the record.
integer Indicating "treeLevel" - or versioning type - "element" (-1), "page" (0) or "branch" (>=1)
Rückgabe:
integer Returns the id of the new version (if any)
Siehe auch:
copyRecord()

Dokumentation der Datenelemente

t3lib_TCEmain::$defaultPermissions
Initialisierung:
 array(         
                'user' => 'show,edit,delete,new,editcontent',
                'group' => 'show,edit,new,editcontent',
                'everybody' => ''
        )
t3lib_TCEmain::$pMap
Initialisierung:
 Array(         
                'show' => 1,                    
                'edit' => 2,                    
                'delete' => 4,                  
                'new' => 8,                             
                'editcontent' => 16             
        )

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
 Alle Klassen Namensbereiche Funktionen Variablen

Erzeugt am Wed Oct 28 16:40:24 2009 für Typo3 von  doxygen 1.6.1