"TYPO3 4.0.1: t3lib_TCEmain Class Reference", "datetime" => "Sat Dec 2 19:26:23 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?>

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 ()
 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_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)
 _DELETE_FLEX_FORMdata (&$valueArrayToRemoveFrom, $deleteCMDS)
 _MOVE_FLEX_FORMdata (&$valueArrayToMoveIn, $moveCMDS, $direction)
 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, $structurePath)
 process_cmdmap ()
 copyRecord ($table, $uid, $destPid, $first=0, $overrideValues=array(), $excludeFields='')
 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)
 copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 copyRecord_procFilesRefs ($conf, $uid, $value)
 moveRecord ($table, $uid, $destPid)
 localize ($table, $uid, $language)
 deleteAction ($table, $id)
 deleteEl ($table, $uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE)
 undeleteRecord ($table, $uid)
 deleteRecord ($table, $uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE, $undeleteRecord=FALSE)
 deletePages ($uid, $force=FALSE, $forceHardDelete=FALSE)
 deleteSpecificPage ($uid, $forceHardDelete=FALSE)
 canDeletePage ($uid)
 cannotDeleteRecord ($table, $id)
 versionizeRecord ($table, $id, $label, $delete=FALSE, $versionizeTree=-1)
 versionizePages ($uid, $label, $versionizeTree)
 version_swap ($table, $id, $swapWith, $swapIntoWS=0)
 version_clearWSID ($table, $id)
 version_setStage ($table, $id, $stageId, $comment='')
 remapListedDBRecords ()
 remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid)
 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)
 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)
 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)

Public Attributes

 $storeLogMessages = TRUE
 $enableLogging = TRUE
 $reverseOrder = FALSE
 $checkSimilar = TRUE
 $stripslashes_values = TRUE
 $checkStoredRecords = TRUE
 $checkStoredRecords_loose = TRUE
 $deleteTree = FALSE
 $neverHideAtCopy = FALSE
 $dontProcessTransformations = FALSE
 $bypassWorkspaceRestrictions = FALSE
 $copyWhichTables = '*'
 $generalComment = ''
 $copyTree = 0
 $defaultValues = array()
 $overrideValues = array()
 $alternativeFileName = array()
 $data_disableFields = array()
 $suggestedInsertUids = array()
 $callBackObj
 $autoVersionIdMap = Array()
 $substNEWwithIDs = Array()
 $substNEWwithIDs_table = Array()
 $copyMappingArray_merged = Array()
 $copiedFileMap = Array()
 $errorLog = 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()
 $copyMappingArray = Array()
 $fileFunc
 $checkValue_currentRecord = array()
 $autoVersioningUpdate = FALSE

Detailed Description

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


Member Function Documentation

t3lib_TCEmain::_DELETE_FLEX_FORMdata &$  valueArrayToRemoveFrom,
deleteCMDS
 

Deletes a flex form element

Parameters:
array &$valueArrayToRemoveFrom: by reference
[type] $deleteCMDS: ... *
Returns:
void

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

t3lib_TCEmain::_MOVE_FLEX_FORMdata &$  valueArrayToMoveIn,
moveCMDS,
direction
 

Deletes a flex form element

TODO: Like _DELETE_FLEX_FORMdata, this is only a temporary solution!

Parameters:
array &$valueArrayToMoveIn: by reference
[type] $moveCMDS: ... *
string $direction: 'up' or 'down'
Returns:
void

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

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.

Parameters:
string Table name
array Incoming array (passed by reference)
Returns:
void

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

References t3lib_BEfunc::deleteClause().

Referenced by process_datamap().

t3lib_TCEmain::assemblePermissions string  ) 
 

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

Parameters:
string List of pMap strings
Returns:
integer Integer mask
See also:
setTSconfigPermissions(), newFieldArray()

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

References t3lib_div::trimExplode().

t3lib_TCEmain::canDeletePage uid  ) 
 

Used to evaluate if a page can be deleted

Parameters:
integer Page id
Returns:
mixed If array: List of page uids to traverse and delete (means OK), if string: error code.

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

References t3lib_div::trimExplode().

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.

Parameters:
string Record Table
integer Record UID
Returns:
string Returns a string IF there is an error (error string explaining). FALSE means record can be deleted

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

t3lib_TCEmain::checkModifyAccessList table  ) 
 

Checking group modify_table access list

Parameters:
string Table name
Returns:
boolean Returns true if the user has general access to modify the $table

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

References t3lib_div::inList().

Referenced by process_datamap().

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.

Parameters:
string Tablename to check
integer Integer PID
integer For logging: Action number.
Returns:
boolean Returns true if the user may insert a record from table $insertTable on page $pid

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

Referenced by process_datamap().

t3lib_TCEmain::checkRecordUpdateAccess table,
id
 

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

Parameters:
string Record table
integer Record UID
Returns:
boolean Returns true if the user may update the record given by $table and $id

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

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 4451 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 1072 of file class.t3lib_tcemain.php.

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

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 1216 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 1547 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. 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

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() DEPRICATED, use class.t3lib_flexformtools.php instead for traversal!
Returns:
array The modified 'data' part.
See also:
checkValue_flex_procInData_travDS()

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

References t3lib_div::resolveSheetDefInDS().

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.

Parameters:
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: ...
Returns:
void
See also:
checkValue_flex_procInData()

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

References t3lib_BEfunc::getPagesTSconfig(), t3lib_BEfunc::getSpecConfParts(), t3lib_BEfunc::getTCAtypeValue(), t3lib_BEfunc::RTEgetObj(), and t3lib_BEfunc::RTEsetup().

t3lib_TCEmain::checkValue_flexArray2Xml array,
addPrologue = FALSE
 

Converts an array to FlexForm XML

Parameters:
array Array with FlexForm data
boolean If set, the XML prologue is returned as well.
Returns:
string Input array converted to XML

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

References t3lib_div::makeInstance().

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

Evaluates 'group' or 'select' 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
[type] $uploadedFiles: ...
string Field name
Returns:
array Modified $res array

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

References t3lib_div::trimExplode().

t3lib_TCEmain::checkValue_group_select_explodeSelectGroupValue value  ) 
 

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

Parameters:
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.
Returns:
array The value array.

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

References t3lib_div::trimExplode().

t3lib_TCEmain::checkValue_group_select_file valueArray,
tcaFieldConf,
curValue,
uploadedFileArray,
status,
table,
id,
recFID
 

Handling files for group/select function

Parameters:
[type] $valueArray: ...
[type] $tcaFieldConf: ...
[type] $curValue: ...
[type] $uploadedFileArray: ...
[type] $status: ...
[type] $table: ...
[type] $id: ...
[type] $recFID: ...
Returns:
array Modified value array
See also:
checkValue_group_select()

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

References t3lib_div::fixWindowsFilePath(), t3lib_div::formatSize(), t3lib_div::makeInstance(), t3lib_div::removeArrayEntryByValue(), t3lib_div::split_fileref(), t3lib_div::trimExplode(), and t3lib_div::upload_copy_move().

t3lib_TCEmain::checkValue_group_select_processDBdata valueArray,
tcaFieldConf,
id,
status,
type
 

Returns data for group/db and select fields

Parameters:
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' or 'group'
Returns:
array Modified value array

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

References t3lib_div::makeInstance().

t3lib_TCEmain::checkValue_input res,
value,
tcaFieldConf,
PP,
field = ''
 

Evaluate "input" 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
string Field name
Returns:
array Modified $res array

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

References t3lib_div::trimExplode().

t3lib_TCEmain::checkValue_input_Eval value,
evalArray,
is_in
 

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

Parameters:
string Value to evaluate
array Array of evaluations to traverse.
string Is-in string
Returns:
string Modified $value

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

t3lib_TCEmain::checkValue_radio res,
value,
tcaFieldConf,
PP
 

Evaluates 'radio' 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 1239 of file class.t3lib_tcemain.php.

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.

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
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: ...
Returns:
array Returns the evaluated $value as key "value" in this array.

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

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.

Parameters:
string Table name of record that was just updated.
integer UID of updated / inserted record
Returns:
void

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

References t3lib_div::callUserFunction(), t3lib_BEfunc::getTSCpid(), t3lib_extMgm::isLoaded(), and t3lib_div::trimExplode().

t3lib_TCEmain::clear_cacheCmd cacheCmd  ) 
 

Clears the cache based on a 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'] (num array with values being the function references, called by t3lib_div::callUserFunction())

Parameters:
string The cache comment, see above description.
Returns:
void

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

References t3lib_extMgm::isLoaded().

t3lib_TCEmain::clearHistory maxAgeSeconds = 604800,
table
 

Clearing sys_history table from older entries that are expired.

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

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

t3lib_TCEmain::clearPrefixFromValue table,
value
 

Removes the prependAtCopy prefix on values

Parameters:
string Table name
string The value to fix
Returns:
string Clean name

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

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

Parameters:
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!
Returns:
array Returns $fieldArray. If the returned array is empty, then the record should not be updated!

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

Referenced by process_datamap().

t3lib_TCEmain::compileAdminTables  ) 
 

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

Returns:
array Array of all TCA table names

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

t3lib_TCEmain::convNumEntityToByteValue input  ) 
 

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

Parameters:
string Input string
Returns:
string Output string

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

t3lib_TCEmain::copyPages uid,
destPid
 

Copying pages Main function for copying pages.

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

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

References t3lib_div::inList().

t3lib_TCEmain::copyRecord table,
uid,
destPid,
first = 0,
overrideValues = array(),
excludeFields = ''
 

Copying a single record

Parameters:
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)
Returns:
integer ID of new record, if any

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

References t3lib_BEfunc::getRecordWSOL(), t3lib_BEfunc::getTSconfig_pidValue(), t3lib_div::inList(), t3lib_div::loadTCA(), t3lib_div::makeInstance(), and t3lib_div::trimExplode().

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.

Parameters:
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.
Returns:
array Result array with key "value" containing the value of the processing.
See also:
copyRecord(), checkValue_flex_procInData_travDS()

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

t3lib_TCEmain::copyRecord_procBasedOnFieldType table,
uid,
field,
value,
row,
conf
 

Processing/Preparing content for copyRecord() function

Parameters:
string Table name
integer Record uid
string Field name being processed
string Input value to be processed.
array Record array
array TCA field configuration
Returns:
mixed Processed value. Normally a string/integer, but can be an array for flexforms! private
See also:
copyRecord()

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

References t3lib_BEfunc::getFlexFormDS(), t3lib_div::makeInstance(), and t3lib_div::xml2array().

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.

Parameters:
array TCE field config
integer Record UID
string Field value (eg. list of files)
Returns:
string The (possibly modified) value
See also:
copyRecord(), copyRecord_flexFormCallBack()

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

References t3lib_div::makeInstance(), and t3lib_div::trimExplode().

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.

Parameters:
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!
Returns:
integer Returns the new ID of the record (if applicable)

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

References t3lib_div::loadTCA().

t3lib_TCEmain::copySpecificPage uid,
destPid,
copyTablesArray,
first = 0
 

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

Parameters:
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
Returns:
integer The id of the new page, if applicable.

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

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

Returns:
void

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

t3lib_TCEmain::deleteAction table,
id
 

Delete a single record

Parameters:
string Table name
integer Record UID
Returns:
void

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

References t3lib_BEfunc::getLiveVersionOfRecord(), t3lib_BEfunc::getRecord(), and t3lib_BEfunc::getWorkspaceVersionOfRecord().

t3lib_TCEmain::deleteClause table  ) 
 

Returns delete-clause for the $table

Parameters:
string Table name
Returns:
string Delete clause

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

t3lib_TCEmain::deleteEl table,
uid,
noRecordCheck = FALSE,
forceHardDelete = FALSE
 

Delete element from any table

Parameters:
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!
Returns:
void

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

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.

Parameters:
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!
Returns:
void

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

References t3lib_div::trimExplode().

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 of offline, doesn't matter, the uid decides) If both $noRecordCheck and $forceHardDelete are set it could even delete a "deleted"-flagged record!

Parameters:
string Table 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.
Returns:
void

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

t3lib_TCEmain::deleteSpecificPage uid,
forceHardDelete = FALSE
 

Delete a page and all records on it.

Parameters:
integer Page id
boolean If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Returns:
void private
See also:
deletePages()

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

t3lib_TCEmain::destNotInsideSelf dest,
id
 

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

Parameters:
integer Destination Page ID to test
integer Page ID to test for presence inside Destination
Returns:
boolean Returns false if ID is inside destination (including equal to)

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

References t3lib_BEfunc::fixVersioningPid().

t3lib_TCEmain::destPathFromUploadFolder folder  ) 
 

Returns absolute destination path for the uploadfolder, $folder

Parameters:
string Upload folder name, relative to PATH_site
Returns:
string Input string prefixed with PATH_site

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

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

Parameters:
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.
Returns:
string List of integers in branch

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

t3lib_TCEmain::doesPageHaveUnallowedTables page_uid,
doktype
 

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

Parameters:
integer Page ID
integer Page doktype
Returns:
array Returns a list of the tables that are 'present' on the page but not allowed with the page_uid/doktype

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

References t3lib_div::trimExplode().

t3lib_TCEmain::doesRecordExist table,
id,
perms
 

Checks if record can be selected based on given permission criteria

Parameters:
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
Returns:
boolean Returns true if the record given by $table, $id and $perms can be selected

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

References t3lib_BEfunc::fixVersioningPid(), and t3lib_div::testInt().

t3lib_TCEmain::doesRecordExist_pageLookUp id,
perms
 

Looks up a page based on permissions.

Parameters:
integer Page id
integer Permission integer
Returns:
pointer MySQL result pointer (from exec_SELECTquery()) private
See also:
doesRecordExist()

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

t3lib_TCEmain::extFileFields table  ) 
 

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

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

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

References t3lib_div::loadTCA().

t3lib_TCEmain::extFileFunctions table,
field,
filelist,
func
 

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

Parameters:
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.
Returns:
void

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

References t3lib_div::loadTCA().

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.

Parameters:
string Table name
[type] $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'
[type] $tscPID: ...
Returns:
[type] ...

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

References t3lib_div::array_merge_recursive_overrule(), t3lib_parsehtml_proc::evalWriteFile(), t3lib_BEfunc::getPagesTSconfig(), t3lib_BEfunc::getTCAtypes(), t3lib_BEfunc::getTCAtypeValue(), t3lib_div::loadTCA(), t3lib_div::makeInstance(), t3lib_BEfunc::RTEgetObj(), t3lib_BEfunc::RTEsetup(), t3lib_div::stripSlashesOnArray(), t3lib_BEfunc::workspaceOL(), and t3lib_div::writeFile().

Referenced by process_datamap().

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)

Parameters:
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.
Returns:
array Output array (For when the copying operation needs to get the information instead of updating the info)

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

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

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.

Parameters:
string Table name
integer Record UID
Returns:
void

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

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

t3lib_TCEmain::getCopyHeader table,
pid,
field,
value,
count,
prevTitle = ''
 

Get modified header for a copied record

Parameters:
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)
Returns:
string The field value, possibly appended with a "copy label"

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

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

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

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

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

Referenced by start().

t3lib_TCEmain::getPID table,
uid
 

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

Parameters:
string Table name
integer Record uid
Returns:
integer PID value (unless the record did not exist in which case FALSE)

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

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

Parameters:
string Table name
integer Uid of record
boolean If set, no workspace overlay is performed
Returns:
array Properties of record

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

References t3lib_BEfunc::fixVersioningPid(), and t3lib_BEfunc::workspaceOL().

Referenced by process_datamap().

t3lib_TCEmain::getRecordPropertiesFromRow table,
row
 

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

Parameters:
string Table name
array Input row
Returns:
array Output array

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

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.

Parameters:
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)
Returns:
mixed Returns integer if PID is >=0, otherwise an array with PID and sorting number. Possibly false in case of error.

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

References t3lib_BEfunc::getLiveVersionOfRecord().

Referenced by process_datamap().

t3lib_TCEmain::getTableEntries table,
TSconfig
 

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

Parameters:
string Table name
array TSconfig for page
Returns:
array TSconfig merged
See also:
getTCEMAIN_TSconfig()

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

References t3lib_div::array_merge_recursive_overrule().

t3lib_TCEmain::getTCEMAIN_TSconfig tscPID  ) 
 

Return TSconfig for a page id

Parameters:
integer Page id (PID) from which to get configuration.
Returns:
array TSconfig array, if any

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

References t3lib_BEfunc::getPagesTSconfig().

Referenced by process_datamap().

t3lib_TCEmain::getUnique table,
field,
value,
id,
newPid = 0
 

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

Parameters:
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
Returns:
string Modified value (if not-unique). Will be the value appended with a number (until 100, then the function just breaks).

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

References t3lib_div::loadTCA().

t3lib_TCEmain::getUniqueFields table  ) 
 

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

Parameters:
string Table name
Returns:
array Array of fieldnames

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

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

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

Parameters:
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!
Returns:
integer Returns ID on success.

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

Referenced by process_datamap().

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

Parameters:
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!
Returns:
integer Returns the new ID of the record (if applicable)

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

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!

Parameters:
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!
Returns:
array Return array.

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

t3lib_TCEmain::isInWebMount pid  ) 
 

Checks if the input page ID is in the BE_USER webmounts

Parameters:
integer Page ID to check
Returns:
boolean True if OK. Cached results.

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

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.

Parameters:
string Table name
integer UID of record
Returns:
boolean Returns true if OK. Cached results.

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

t3lib_TCEmain::isReferenceField conf  ) 
 

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

Parameters:
array config array for TCA/columns field
Returns:
boolean True if DB reference field (group/db or select with foreign-table)

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

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.

Parameters:
integer Page id for which to check, including 0 (zero) if checking for page tree root.
string Table name to check
Returns:
boolean True if OK

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

References t3lib_div::trimExplode().

t3lib_TCEmain::localize table,
uid,
language
 

Localizes a record to another system language

Parameters:
string Table name
integer Record uid (to be localized)
integer Language ID (from sys_language table)
Returns:
void

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

References t3lib_BEfunc::getRecord(), t3lib_BEfunc::getRecordsByField(), t3lib_BEfunc::getRecordWSOL(), t3lib_BEfunc::getTSCpid(), t3lib_div::inList(), and t3lib_div::loadTCA().

t3lib_TCEmain::log table,
recuid,
action,
recpid,
error,
details,
details_nr = -1,
data = array(),
event_pid = -1,
NEWid = ''
 

Logging actions from TCEmain

Parameters:
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
Returns:
integer Log entry UID
See also:
class.t3lib_userauthgroup.php

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

Referenced by process_datamap().

t3lib_TCEmain::moveRecord table,
uid,
destPid
 

Moving single records

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

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

References t3lib_BEfunc::getLiveVersionOfRecord(), t3lib_div::getUserObj(), and t3lib_BEfunc::getWorkspaceVersionOfRecord().

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

Parameters:
string Table name for which to set default values.
Returns:
array Array with default values.

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

References t3lib_div::loadTCA().

Referenced by process_datamap().

t3lib_TCEmain::newlog message,
error = 0
 

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

Parameters:
string Message string
integer Error code, see log()
Returns:
integer Log entry UID
See also:
log()

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

Referenced by process_datamap(), and process_uploads().

t3lib_TCEmain::noRecordsFromUnallowedTables inList  ) 
 

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

Parameters:
string List of page integers
Returns:
boolean Return true, if permission granted

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

References t3lib_BEfunc::deleteClause().

t3lib_TCEmain::notifyStageChange stat,
stageId,
table,
id,
comment
 

Send an email notification to users in workspace

Parameters:
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
integer Record uid of element
string User comment sent along with action
Returns:
void

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

References t3lib_div::getIndpEnv(), t3lib_BEfunc::getRecord(), and t3lib_div::plainMailEncoded().

t3lib_TCEmain::notifyStageChange_getEmails listOfUsers,
noTablePrefix = FALSE
 

Return emails addresses of be_users from input list.

Parameters:
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.
Returns:
array Array of emails

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

References t3lib_BEfunc::getRecord(), t3lib_div::revExplode(), and t3lib_div::trimExplode().

t3lib_TCEmain::overrideFieldArray table,
data
 

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

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

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

Referenced by process_datamap().

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!

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

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

t3lib_TCEmain::placeholderShadowing table,
id
 

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

Parameters:
string Table name
integer Record uid
Returns:
void

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

References t3lib_BEfunc::getLiveVersionOfRecord(), t3lib_BEfunc::getRecord(), and t3lib_div::trimExplode().

Referenced by process_datamap().

t3lib_TCEmain::prependLabel table  ) 
 

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

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

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

t3lib_TCEmain::printLogErrorMessages redirect  ) 
 

Print log error messages from the operations of this script instance

Parameters:
string Redirect URL (for creating link in message)
Returns:
void (Will exit on error)

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

References t3lib_div::makeInstance().

t3lib_TCEmain::process_cmdmap  ) 
 

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

Returns:
void

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

References t3lib_div::array_merge_recursive_overrule(), t3lib_div::getUserObj(), t3lib_div::intInRange(), and t3lib_div::trimExplode().

t3lib_TCEmain::process_datamap  ) 
 

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

Returns:
void

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

References addDefaultPermittedLanguageIfNotSet(), checkModifyAccessList(), checkRecordInsertAccess(), checkRecordUpdateAccess(), compareFieldArrayWithCurrentAndUnset(), fillInFieldArray(), getRecordProperties(), getSortNumber(), getTCEMAIN_TSconfig(), t3lib_BEfunc::getTSCpid(), t3lib_div::getUserObj(), t3lib_BEfunc::getWorkspaceVersionOfRecord(), insertDB(), t3lib_div::intInRange(), log(), t3lib_div::makeInstance(), newFieldArray(), newlog(), overrideFieldArray(), placeholderShadowing(), recordInfo(), setTSconfigPermissions(), tableReadOnly(), t3lib_div::testInt(), and updateDB().

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.

Parameters:
array $_FILES array
Returns:
void

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

References newlog(), and process_uploads_traverseArray().

t3lib_TCEmain::process_uploads_traverseArray &$  outputArr,
inputArr,
keyToSet
 

Traverse the upload array if needed to rearrange values.

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

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

Referenced by process_uploads().

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!)

Parameters:
integer Current page id.
integer New page id
array Array of tables from which to copy
Returns:
void
See also:
versionizePages()

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

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!

Parameters:
string Table name
integer UID of the record from $table
string Field list for the SELECT query, eg. "*" or "uid,pid,..."
Returns:
mixed Returns the selected record on success, otherwise false.

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

Referenced by process_datamap().

t3lib_TCEmain::remapListedDBRecords  ) 
 

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

Returns:
void

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

References t3lib_BEfunc::getFlexFormDS(), t3lib_div::loadTCA(), t3lib_BEfunc::workspaceOL(), t3lib_BEfunc::wsMapId(), and t3lib_div::xml2array().

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.

Parameters:
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
Returns:
array Array where the "value" key carries the value.
See also:
checkValue_flex_procInData_travDS(), remapListedDBRecords()

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

t3lib_TCEmain::remapListedDBRecords_procDBRefs conf,
value,
MM_localUid
 

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

Parameters:
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!)
Returns:
array Returns array of items ready to implode for field content.
See also:
remapListedDBRecords()

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

References t3lib_div::makeInstance(), and t3lib_div::trimExplode().

t3lib_TCEmain::removeCacheFiles  ) 
 

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

Returns:
integer The number of files deleted

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

References t3lib_extMgm::removeCacheFiles().

t3lib_TCEmain::removeRegisteredFiles  ) 
 

Removing files registered for removal before exit

Returns:
void

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

t3lib_TCEmain::resolvePid table,
pid
 

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

Parameters:
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!
Returns:
integer

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

References t3lib_BEfunc::getLiveVersionOfRecord(), and t3lib_BEfunc::getWorkspaceVersionOfRecord().

t3lib_TCEmain::resorting table,
pid,
sortRow,
return_SortNumber_After_This_Uid
 

Resorts a table. Used internally by getSortNumber()

Parameters:
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
Returns:
integer If $return_SortNumber_After_This_Uid is set, will contain usable sorting number after that record if found (otherwise 0) private
See also:
getSortNumber()

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

t3lib_TCEmain::rmComma input  ) 
 

Returns the $input string without a comma in the end

Parameters:
string Input string
Returns:
string Output string with any comma in the end removed, if any.

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

t3lib_TCEmain::setDefaultsFromUserTS userTS  ) 
 

Initializes default values coming from User TSconfig

Parameters:
array User TSconfig array
Returns:
void

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

t3lib_TCEmain::setHistory table,
id,
logId
 

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

Parameters:
string Table name
integer Record ID
integer Log entry ID, important for linking between log and history views
Returns:
void

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

References t3lib_BEfunc::getTSCpid(), and t3lib_div::intInRange().

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]

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

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

References t3lib_div::trimExplode().

t3lib_TCEmain::setTSconfigPermissions fieldArray,
TSConfig_p
 

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

Parameters:
array Field Array, returned with modifications
array TSconfig properties
Returns:
array Modified Field Array

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

References t3lib_div::testInt().

Referenced by process_datamap().

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

Parameters:
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']
Returns:
void

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

References $defaultPermissions, and getExcludeListArray().

t3lib_TCEmain::tableAdminOnly table  ) 
 

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

Parameters:
string Table name
Returns:
boolean True, if readonly

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

t3lib_TCEmain::tableReadOnly table  ) 
 

Checks if the $table is readOnly

Parameters:
string Table name
Returns:
boolean True, if readonly

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

Referenced by process_datamap().

t3lib_TCEmain::undeleteRecord table,
uid
 

Undelete a single record

Parameters:
string Table name
integer Record UID
Returns:
void

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

t3lib_TCEmain::updateDB table,
id,
fieldArray
 

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

Parameters:
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.
Returns:
void

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

Referenced by process_datamap().

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.

Parameters:
string Table name
integer Record UID
Returns:
void

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

References t3lib_div::makeInstance().

t3lib_TCEmain::version_clearWSID table,
id
 

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

Parameters:
string Table name
integer Record UID
Returns:
void

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

t3lib_TCEmain::version_setStage table,
id,
stageId,
comment = ''
 

Setting stage of record

Parameters:
string Table name
integer Record UID
integer Stage ID to set
string Comment that goes into log
Returns:
void

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

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

Parameters:
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.
Returns:
void

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

References t3lib_BEfunc::getRecord(), and t3lib_div::writeFileToTypo3tempDir().

t3lib_TCEmain::versionizePages uid,
label,
versionizeTree
 

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

Parameters:
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]
Returns:
void
See also:
copyPages()

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

t3lib_TCEmain::versionizeRecord table,
id,
label,
delete = FALSE,
versionizeTree = -1
 

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

Parameters:
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)
Returns:
integer Returns the id of the new version (if any)
See also:
copyRecord()

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

References t3lib_BEfunc::getWorkspaceVersionOfRecord().


Member Data Documentation

t3lib_TCEmain::$defaultPermissions
 

Initial value:

 array(         // Can be overridden from $TYPO3_CONF_VARS
                'user' => 'show,edit,delete,new,editcontent',
                'group' => 'show,edit,new,editcontent',
                'everybody' => ''
        )

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

Referenced by start().

t3lib_TCEmain::$pMap
 

Initial value:

 Array(         // Permission mapping
                'show' => 1,                    // 1st bit
                'edit' => 2,                    // 2nd bit
                'delete' => 4,                  // 3rd bit
                'new' => 8,                             // 4th bit
                'editcontent' => 16             // 5th bit
        )

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


The documentation for this class was generated from the following file: