Documentation TYPO3 par Ameos

t3lib_TCEmain Class Reference

List of all members.

Public Member Functions

 start ($data, $cmd, $altUserObject='')
 setMirror ($mirror)
 setDefaultsFromUserTS ($userTS)
 process_uploads ($postFiles)
 process_uploads_traverseArray (&$outputArr, $inputArr, $keyToSet)
 process_datamap ()
 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)
 checkValue_inline ($res, $value, $tcaFieldConf, $PP, $field)
 checkValue_checkMax ($tcaFieldConf, $valueArray)
 getUnique ($table, $field, $value, $id, $newPid=0)
 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='')
 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)
 copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 copyRecord_procFilesRefs ($conf, $uid, $value)
 moveRecord ($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)
 version_setStage ($table, $id, $stageId, $comment='')
 remapListedDBRecords ()
 remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)
 remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid, $table)
 remapListedDBRecords_procInline ($conf, $value, $uid, $table)
 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)
 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
 $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()
 $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()
 $remapStack = array()
 $updateRefIndexStack = array()
 $callFromImpExp = false
 $fileFunc
 $checkValue_currentRecord = array()
 $autoVersioningUpdate = FALSE

Detailed Description

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


Member Function Documentation

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

References $defaultPermissions, and getExcludeListArray().

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

References t3lib_div::trimExplode().

t3lib_TCEmain::setDefaultsFromUserTS ( userTS  ) 

Initializes default values coming from User TSconfig

Parameters:
array User TSconfig array
Returns:
void

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

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 449 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 487 of file class.t3lib_tcemain.php.

Referenced by process_uploads().

t3lib_TCEmain::process_datamap (  ) 

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

Returns:
void

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

References addDefaultPermittedLanguageIfNotSet(), checkModifyAccessList(), checkRecordInsertAccess(), checkRecordUpdateAccess(), checkValue_checkMax(), compareFieldArrayWithCurrentAndUnset(), dbAnalysisStoreExec(), 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(), removeRegisteredFiles(), setTSconfigPermissions(), tableReadOnly(), t3lib_div::testInt(), and updateDB().

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

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

Referenced by process_datamap().

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

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

Referenced by process_datamap().

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

References checkValue_SW(), doesPageHaveUnallowedTables(), getRecordProperties(), t3lib_div::inList(), t3lib_div::loadTCA(), log(), and recordInfo().

Referenced by fillInFieldArray(), and insertNewCopyVersion().

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

References checkValue_check(), checkValue_flex(), checkValue_group_select(), checkValue_inline(), checkValue_input(), and checkValue_radio().

Referenced by checkValue(), and checkValue_flex_procInData_travDS().

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

References checkValue_input_Eval(), getUnique(), and t3lib_div::trimExplode().

Referenced by checkValue_SW().

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

Referenced by checkValue_SW().

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

Referenced by checkValue_SW().

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

References checkValue_checkMax(), checkValue_group_select_explodeSelectGroupValue(), checkValue_group_select_file(), checkValue_group_select_processDBdata(), convNumEntityToByteValue(), and t3lib_div::trimExplode().

Referenced by checkValue_SW().

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

Handling files for group/select function

Parameters:
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?]
Returns:
array Modified value array
See also:
checkValue_group_select()

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

References $uploadedFileArray, destPathFromUploadFolder(), t3lib_div::fixWindowsFilePath(), t3lib_div::formatSize(), getRecordProperties(), log(), t3lib_div::makeInstance(), t3lib_div::removeArrayEntryByValue(), t3lib_div::split_fileref(), t3lib_div::trimExplode(), and t3lib_div::upload_copy_move().

Referenced by checkValue_group_select().

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

References _DELETE_FLEX_FORMdata(), t3lib_div::_GP(), _MOVE_FLEX_FORMdata(), t3lib_div::array_merge_recursive_overrule(), checkValue_flex_procInData(), checkValue_flexArray2Xml(), t3lib_BEfunc::getFlexFormDS(), and t3lib_div::xml2array().

Referenced by checkValue_SW().

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

References t3lib_div::makeInstance().

Referenced by checkValue_flex(), and remapListedDBRecords().

t3lib_TCEmain::_DELETE_FLEX_FORMdata ( &$  valueArrayToRemoveFrom,
deleteCMDS 
)

Deletes a flex form element

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

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

Referenced by checkValue_flex().

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
array $moveCMDS: ... *
string $direction: 'up' or 'down'
Returns:
void

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

Referenced by checkValue_flex().

t3lib_TCEmain::checkValue_inline ( res,
value,
tcaFieldConf,
PP,
field 
)

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

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

References checkValue_checkMax(), checkValue_group_select_processDBdata(), t3lib_div::testInt(), and t3lib_div::trimExplode().

Referenced by checkValue_SW().

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.

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

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

Referenced by checkValue_group_select(), checkValue_inline(), and 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 1873 of file class.t3lib_tcemain.php.

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

Referenced by checkValue_input(), and fixUniqueInPid().

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

References t3lib_div::getUserObj().

Referenced by checkValue_input().

t3lib_TCEmain::checkValue_group_select_processDBdata ( valueArray,
tcaFieldConf,
id,
status,
type,
currentTable 
)

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', 'group' or 'inline'
string Table name, needs to be passed to t3lib_loadDBGroup
Returns:
array Modified value array

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

References t3lib_div::makeInstance().

Referenced by checkValue_group_select(), and checkValue_inline().

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

References t3lib_div::trimExplode().

Referenced by checkValue_group_select().

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

References checkValue_flex_procInData_travDS(), and t3lib_div::resolveSheetDefInDS().

Referenced by checkValue_flex(), copyRecord_procBasedOnFieldType(), and remapListedDBRecords().

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

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

Referenced by checkValue_flex_procInData().

t3lib_TCEmain::process_cmdmap (  ) 

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

Returns:
void

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

References t3lib_div::array_merge_recursive_overrule(), checkModifyAccessList(), copyPages(), copyRecord(), deleteAction(), t3lib_div::getUserObj(), t3lib_div::intInRange(), localize(), log(), moveRecord(), newlog(), remapListedDBRecords(), tableReadOnly(), t3lib_div::trimExplode(), undeleteRecord(), version_clearWSID(), version_setStage(), version_swap(), versionizePages(), and versionizeRecord().

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

References $overrideValues, clearPrefixFromValue(), copyRecord_procBasedOnFieldType(), doesRecordExist(), fixCopyAfterDuplFields(), getCopyHeader(), t3lib_BEfunc::getRecordWSOL(), getTableEntries(), getTCEMAIN_TSconfig(), t3lib_BEfunc::getTSconfig_pidValue(), t3lib_div::inList(), t3lib_div::loadTCA(), log(), t3lib_div::makeInstance(), newFieldArray(), resolvePid(), and t3lib_div::trimExplode().

Referenced by copyRecord_procBasedOnFieldType(), copySpecificPage(), localize(), and process_cmdmap().

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

References compileAdminTables(), copySpecificPage(), t3lib_div::inList(), int_pageTreeInfo(), and log().

Referenced by process_cmdmap().

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

References copyRecord(), and deleteClause().

Referenced by copyPages().

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

References copyRecord_procBasedOnFieldType(), dbAnalysisStoreExec(), doesRecordExist(), insertNewCopyVersion(), t3lib_div::loadTCA(), log(), and recordInfo().

Referenced by rawCopyPageContent(), versionizePages(), and versionizeRecord().

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

References copyRecord_raw(), and deleteClause().

Referenced by versionizePages().

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

References checkValue(), and insertDB().

Referenced by copyRecord_raw().

t3lib_TCEmain::copyRecord_procBasedOnFieldType ( table,
uid,
field,
value,
row,
conf,
realDestPid 
)

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
integer Real page id (pid) the record is copied to
Returns:
mixed Processed value. Normally a string/integer, but can be an array for flexforms! private
See also:
copyRecord()

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

References checkValue_flex_procInData(), copyRecord(), copyRecord_flexFormCallBack(), copyRecord_procFilesRefs(), t3lib_BEfunc::getFlexFormDS(), getInlineFieldType(), isReferenceField(), t3lib_div::makeInstance(), t3lib_div::testInt(), and t3lib_div::xml2array().

Referenced by copyRecord(), and copyRecord_raw().

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

References copyRecord_procFilesRefs(), and isReferenceField().

Referenced by copyRecord_procBasedOnFieldType().

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

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

Referenced by copyRecord_flexFormCallBack(), and copyRecord_procBasedOnFieldType().

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

References checkRecordInsertAccess(), checkRecordUpdateAccess(), clear_cache(), destNotInsideSelf(), doesRecordExist(), fixCopyAfterDuplFields(), fixUniqueInPid(), t3lib_BEfunc::getLiveVersionOfRecord(), getRecordProperties(), getSortNumber(), t3lib_div::getUserObj(), t3lib_BEfunc::getWorkspaceVersionOfRecord(), log(), moveRecord_procFields(), newlog(), and resolvePid().

Referenced by moveRecord_procBasedOnFieldType(), and process_cmdmap().

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.

Parameters:
string $table: Record Table
string $uid: Record UID
string $destPid: Position to move to
Returns:
[type] ...

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

References t3lib_BEfunc::getRecordWSOL(), t3lib_div::loadTCA(), and moveRecord_procBasedOnFieldType().

Referenced by moveRecord().

t3lib_TCEmain::moveRecord_procBasedOnFieldType ( table,
uid,
destPid,
field,
value,
conf 
)

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

Parameters:
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 on current field
Returns:
[type] ...

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

References getInlineFieldType(), t3lib_div::makeInstance(), and moveRecord().

Referenced by moveRecord_procFields().

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

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

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

References $overrideValues, copyRecord(), doesRecordExist(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getRecordsByField(), t3lib_BEfunc::getRecordWSOL(), getTCEMAIN_TSconfig(), t3lib_BEfunc::getTSCpid(), t3lib_div::inList(), t3lib_div::loadTCA(), t3lib_div::makeInstance(), and newlog().

Referenced by process_cmdmap().

t3lib_TCEmain::deleteAction ( table,
id 
)

Delete a single record

Parameters:
string Table name
integer Record UID
Returns:
void

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

References deleteEl(), t3lib_BEfunc::getLiveVersionOfRecord(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getWorkspaceVersionOfRecord(), newlog(), version_clearWSID(), and versionizeRecord().

Referenced by deleteRecord_procBasedOnFieldType(), and process_cmdmap().

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

References deletePages(), deleteRecord(), and deleteVersionsForRecord().

Referenced by deleteAction(), version_clearWSID(), and version_swap().

t3lib_TCEmain::deleteVersionsForRecord ( table,
uid,
forceHardDelete 
)

Delete versions for element from any table

Parameters:
string Table name
integer Record UID
boolean If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY!
Returns:
void

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

References deletePages(), deleteRecord(), and t3lib_BEfunc::selectVersionsOfRecord().

Referenced by deleteEl(), and deleteSpecificPage().

t3lib_TCEmain::undeleteRecord ( table,
uid 
)

Undelete a single record

Parameters:
string Table name
integer Record UID
Returns:
void

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

References deleteRecord().

Referenced by deleteRecord_procBasedOnFieldType(), and process_cmdmap().

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!

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

References clear_cache(), deleteRecord_flexFormCallBack(), deleteRecord_procFields(), doesRecordExist(), extFileFields(), extFileFunctions(), getRecordProperties(), t3lib_BEfunc::getRecordRaw(), t3lib_div::loadTCA(), log(), t3lib_div::makeInstance(), and updateRefIndex().

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

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.

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

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

Referenced by deleteRecord().

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

References canDeletePage(), deleteSpecificPage(), doesBranchExist(), newlog(), and t3lib_div::trimExplode().

Referenced by deleteEl(), and deleteVersionsForRecord().

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

References deleteClause(), deleteRecord(), and deleteVersionsForRecord().

Referenced by deletePages().

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

References doesBranchExist(), doesRecordExist(), noRecordsFromUnallowedTables(), and t3lib_div::trimExplode().

Referenced by cannotDeleteRecord(), and deletePages().

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

References canDeletePage(), and doesRecordExist().

Referenced by versionizeRecord().

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.

Parameters:
string $table: Record Table
string $uid: Record UID
boolean $undeleteRecord: If a record should be undeleted (e.g. from history/undo)
Returns:
void
See also:
deleteRecord()

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

References deleteRecord_procBasedOnFieldType(), t3lib_BEfunc::getRecord(), and t3lib_div::loadTCA().

Referenced by deleteRecord().

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.

Parameters:
string $table: Record Table
string $uid: Record UID
string $field: Record field
string $value: Record field value
array $conf: TCA configuration on current field
boolean $undeleteRecord: If a record should be undeleted (e.g. from history/undo)
Returns:
void
See also:
deleteRecord()

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

References deleteAction(), getInlineFieldType(), isReferenceField(), t3lib_div::makeInstance(), and undeleteRecord().

Referenced by deleteRecord_procFields().

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

References cannotDeleteRecord(), copyRecord_raw(), deleteClause(), doesRecordExist(), t3lib_BEfunc::getWorkspaceVersionOfRecord(), newlog(), and recordInfo().

Referenced by deleteAction(), process_cmdmap(), and versionizePages().

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

References compileAdminTables(), copyRecord_raw(), doesBranchExist(), int_pageTreeInfo(), newlog(), rawCopyPageContent(), and versionizeRecord().

Referenced by process_cmdmap().

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

References checkRecordUpdateAccess(), clear_cache(), deleteEl(), doesRecordExist(), t3lib_BEfunc::getRecord(), getUniqueFields(), newlog(), updateRefIndex(), and t3lib_div::writeFileToTypo3tempDir().

Referenced by process_cmdmap().

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

References checkRecordUpdateAccess(), deleteEl(), t3lib_BEfunc::getLiveVersionOfRecord(), t3lib_BEfunc::getRecord(), and newlog().

Referenced by deleteAction(), and process_cmdmap().

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

References checkRecordUpdateAccess(), t3lib_div::inList(), log(), newlog(), and notifyStageChange().

Referenced by process_cmdmap().

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

References checkValue_flex_procInData(), checkValue_flexArray2Xml(), t3lib_BEfunc::getFlexFormDS(), t3lib_div::loadTCA(), recordInfo(), remapListedDBRecords_flexFormCallBack(), remapListedDBRecords_procDBRefs(), remapListedDBRecords_procInline(), updateDB(), t3lib_BEfunc::workspaceOL(), t3lib_BEfunc::wsMapId(), and t3lib_div::xml2array().

Referenced by process_cmdmap().

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

References isReferenceField(), and remapListedDBRecords_procDBRefs().

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

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

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

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

Referenced by remapListedDBRecords(), remapListedDBRecords_flexFormCallBack(), and remapListedDBRecords_procInline().

t3lib_TCEmain::remapListedDBRecords_procInline ( conf,
value,
uid,
table 
)

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

Parameters:
array $conf: TCA field config
string $value: Field value
integer $uid: The uid of the ORIGINAL record
string $table: Table name
Returns:
string The value to be updated on the table field in the database

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

References getInlineFieldType(), t3lib_div::makeInstance(), and remapListedDBRecords_procDBRefs().

Referenced by remapListedDBRecords().

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

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

Referenced by noRecordsFromUnallowedTables(), process_cmdmap(), and process_datamap().

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

References getRecordProperties(), and isInWebMount().

Referenced by doesRecordExist().

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

Referenced by isRecordInWebMount().

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

References doesRecordExist().

Referenced by moveRecord(), process_datamap(), version_clearWSID(), version_setStage(), and version_swap().

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

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

Referenced by moveRecord(), and process_datamap().

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

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

Referenced by checkRecordInsertAccess().

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

References deleteClause(), doesRecordExist_pageLookUp(), t3lib_BEfunc::fixVersioningPid(), t3lib_BEfunc::getRecordRaw(), isRecordInWebMount(), and t3lib_div::testInt().

Referenced by canDeletePage(), cannotDeleteRecord(), checkRecordInsertAccess(), checkRecordUpdateAccess(), copyRecord(), copyRecord_raw(), deleteRecord(), localize(), moveRecord(), version_swap(), and versionizeRecord().

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

References deleteClause().

Referenced by doesRecordExist().

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

References deleteClause().

Referenced by canDeletePage(), deletePages(), and versionizePages().

t3lib_TCEmain::tableReadOnly ( table  ) 

Checks if the $table is readOnly

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

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

Referenced by noRecordsFromUnallowedTables(), process_cmdmap(), and process_datamap().

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

Referenced by checkModifyAccessList().

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

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

Referenced by moveRecord().

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

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

Referenced by start().

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

References t3lib_div::trimExplode().

Referenced by checkValue().

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

Referenced by fillInFieldArray(), and isTableAllowedForThisPage().

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

Referenced by checkValue(), copyRecord_raw(), fillInFieldArray(), fixCopyAfterDuplFields(), fixUniqueInPid(), getRecordProperties(), process_datamap(), remapListedDBRecords(), and versionizeRecord().

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

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

Referenced by checkRecordInsertAccess(), checkValue(), checkValue_group_select_file(), deleteRecord(), getSortNumber(), insertDB(), isRecordInWebMount(), moveRecord(), and 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 4740 of file class.t3lib_tcemain.php.

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

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

References checkStoredRecord(), clear_cache(), getRecordPropertiesFromRow(), log(), setHistory(), and updateRefIndex().

Referenced by fixCopyAfterDuplFields(), fixUniqueInPid(), placeholderShadowing(), process_datamap(), and remapListedDBRecords().

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

References checkStoredRecord(), clear_cache(), getRecordProperties(), getRecordPropertiesFromRow(), log(), and updateRefIndex().

Referenced by insertNewCopyVersion(), and 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 4908 of file class.t3lib_tcemain.php.

References log().

Referenced by insertDB(), and updateDB().

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

References clearHistory(), getTableEntries(), getTCEMAIN_TSconfig(), t3lib_BEfunc::getTSCpid(), and t3lib_div::intInRange().

Referenced by updateDB().

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

Referenced by setHistory().

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

References t3lib_div::makeInstance().

Referenced by deleteRecord(), insertDB(), updateDB(), and version_swap().

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

References deleteClause(), t3lib_BEfunc::getLiveVersionOfRecord(), getRecordProperties(), log(), and resorting().

Referenced by moveRecord(), and process_datamap().

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

References deleteClause().

Referenced by getSortNumber().

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

References assemblePermissions(), and t3lib_div::testInt().

Referenced by process_datamap().

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

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

Referenced by copyRecord(), and process_datamap().

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

References t3lib_BEfunc::deleteClause().

Referenced by process_datamap().

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

Referenced by process_datamap().

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

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

References t3lib_div::trimExplode().

Referenced by newFieldArray(), and setTSconfigPermissions().

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

Referenced by noRecordsFromUnallowedTables().

t3lib_TCEmain::convNumEntityToByteValue ( input  ) 

Converts a HTML entity (like &#123;) to the character '123'

Parameters:
string Input string
Returns:
string Output string

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

Referenced by checkValue_group_select().

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

Referenced by checkValue_group_select_file(), copyRecord_procFilesRefs(), and extFileFunctions().

t3lib_TCEmain::deleteClause ( table  ) 

Returns delete-clause for the $table

Parameters:
string Table name
Returns:
string Delete clause

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

Referenced by copySpecificPage(), deleteSpecificPage(), destNotInsideSelf(), doesBranchExist(), doesRecordExist(), doesRecordExist_pageLookUp(), getCopyHeader(), getSortNumber(), getUnique(), int_pageTreeInfo(), rawCopyPageContent(), resorting(), and versionizeRecord().

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

References t3lib_BEfunc::getPagesTSconfig().

Referenced by clear_cache(), copyRecord(), localize(), process_datamap(), and setHistory().

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

References t3lib_div::array_merge_recursive_overrule().

Referenced by copyRecord(), and setHistory().

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

Referenced by clear_cache().

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

Referenced by copyRecord_raw(), and process_datamap().

t3lib_TCEmain::removeRegisteredFiles (  ) 

Removing files registered for removal before exit

Returns:
void

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

Referenced by process_datamap().

t3lib_TCEmain::removeCacheFiles (  ) 

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

Returns:
integer The number of files deleted

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

References t3lib_extMgm::removeCacheFiles().

Referenced by clear_cacheCmd().

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

References deleteClause().

Referenced by copyPages(), and versionizePages().

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

Referenced by copyPages(), and versionizePages().

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

References getUnique(), t3lib_div::loadTCA(), recordInfo(), t3lib_div::trimExplode(), and updateDB().

Referenced by moveRecord().

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

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

Referenced by copyRecord(), and moveRecord().

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

References t3lib_div::loadTCA().

Referenced by deleteRecord().

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

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

Referenced by version_swap().

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

Referenced by copyRecord_flexFormCallBack(), copyRecord_procBasedOnFieldType(), deleteRecord_procBasedOnFieldType(), and remapListedDBRecords_flexFormCallBack().

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.

Parameters:
array config array for TCA/columns field
Returns:
mixed string: inline subtype (field|mm|list), boolean: false

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

Referenced by copyRecord_procBasedOnFieldType(), deleteRecord_procBasedOnFieldType(), moveRecord_procBasedOnFieldType(), and remapListedDBRecords_procInline().

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

References deleteClause(), and prependLabel().

Referenced by copyRecord().

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

Referenced by clearPrefixFromValue(), and getCopyHeader().

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

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

Referenced by copyRecord(), and moveRecord().

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

References prependLabel().

Referenced by copyRecord().

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

References destPathFromUploadFolder(), t3lib_div::loadTCA(), and log().

Referenced by deleteRecord().

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

References checkModifyAccessList(), t3lib_BEfunc::deleteClause(), rmComma(), and tableReadOnly().

Referenced by canDeletePage().

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

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

Referenced by version_setStage().

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

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

Referenced by notifyStageChange().

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

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

Referenced by deleteRecord(), insertDB(), moveRecord(), updateDB(), and version_swap().

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

References t3lib_div::callUserFunction(), t3lib_extMgm::isLoaded(), removeCacheFiles(), and t3lib_div::testInt().

Referenced by clear_cache().

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

Referenced by checkRecordInsertAccess(), checkStoredRecord(), checkValue(), checkValue_group_select_file(), copyPages(), copyRecord(), copyRecord_raw(), deleteRecord(), deleteRecord_flexFormCallBack(), extFileFunctions(), fillInFieldArray(), getSortNumber(), insertDB(), moveRecord(), process_cmdmap(), process_datamap(), updateDB(), and version_setStage().

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

Referenced by deleteAction(), deletePages(), localize(), moveRecord(), placeholderShadowing(), process_cmdmap(), process_datamap(), process_uploads(), version_clearWSID(), version_setStage(), version_swap(), versionizePages(), and versionizeRecord().

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

References t3lib_div::makeInstance().


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 297 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 308 of file class.t3lib_tcemain.php.


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


Généré par TYPO3 Ameos avec  doxygen 1.4.6