Öffentliche Methoden | |
| start ($data, $cmd, $altUserObject='') | |
| setMirror ($mirror) | |
| setDefaultsFromUserTS ($userTS) | |
| process_uploads ($postFiles) | |
| process_uploads_traverseArray (&$outputArr, $inputArr, $keyToSet) | |
| hook_processDatamap_afterDatabaseOperations (&$hookObjectsArr, &$status, &$table, &$id, &$fieldArray) | |
| process_datamap () | |
| placeholderShadowing ($table, $id) | |
| fillInFieldArray ($table, $id, $fieldArray, $incomingFieldArray, $realPid, $status, $tscPID) | |
| checkValue ($table, $field, $value, $id, $status, $realPid, $tscPID) | |
| checkValue_SW ($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $uploadedFiles, $tscPID) | |
| checkValue_text ($res, $value, $tcaFieldConf, $PP, $field='') | |
| checkValue_input ($res, $value, $tcaFieldConf, $PP, $field='') | |
| checkValue_check ($res, $value, $tcaFieldConf, $PP) | |
| checkValue_radio ($res, $value, $tcaFieldConf, $PP) | |
| checkValue_group_select ($res, $value, $tcaFieldConf, $PP, $uploadedFiles, $field) | |
| checkValue_group_select_file ($valueArray, $tcaFieldConf, $curValue, $uploadedFileArray, $status, $table, $id, $recFID) | |
| checkValue_flex ($res, $value, $tcaFieldConf, $PP, $uploadedFiles, $field) | |
| checkValue_flexArray2Xml ($array, $addPrologue=FALSE) | |
| _ACTION_FLEX_FORMdata (&$valueArray, $actionCMDs) | |
| checkValue_inline ($res, $value, $tcaFieldConf, $PP, $field) | |
| checkValue_checkMax ($tcaFieldConf, $valueArray) | |
| getUnique ($table, $field, $value, $id, $newPid=0) | |
| checkValue_text_Eval ($value, $evalArray, $is_in) | |
| checkValue_input_Eval ($value, $evalArray, $is_in) | |
| checkValue_group_select_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $type, $currentTable) | |
| checkValue_group_select_explodeSelectGroupValue ($value) | |
| checkValue_flex_procInData ($dataPart, $dataPart_current, $uploadedFiles, $dataStructArray, $pParams, $callBackFunc='') | |
| checkValue_flex_procInData_travDS (&$dataValues, $dataValues_current, $uploadedFiles, $DSelements, $pParams, $callBackFunc, $structurePath) | |
| process_cmdmap () | |
| copyRecord ($table, $uid, $destPid, $first=0, $overrideValues=array(), $excludeFields='', $language=0) | |
| copyPages ($uid, $destPid) | |
| copySpecificPage ($uid, $destPid, $copyTablesArray, $first=0) | |
| copyRecord_raw ($table, $uid, $pid, $overrideArray=array()) | |
| rawCopyPageContent ($old_pid, $new_pid, $copyTablesArray) | |
| insertNewCopyVersion ($table, $fieldArray, $realPid) | |
| copyRecord_procBasedOnFieldType ($table, $uid, $field, $value, $row, $conf, $realDestPid, $language=0) | |
| copyRecord_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2) | |
| copyRecord_procFilesRefs ($conf, $uid, $value) | |
| copyRecord_fixRTEmagicImages ($table, $theNewSQLID) | |
| moveRecord ($table, $uid, $destPid) | |
| moveRecord_wsPlaceholders ($table, $uid, $destPid, $wsUid) | |
| moveRecord_raw ($table, $uid, $destPid) | |
| moveRecord_procFields ($table, $uid, $destPid) | |
| moveRecord_procBasedOnFieldType ($table, $uid, $destPid, $field, $value, $conf) | |
| localize ($table, $uid, $language) | |
| deleteAction ($table, $id) | |
| deleteEl ($table, $uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE) | |
| deleteVersionsForRecord ($table, $uid, $forceHardDelete) | |
| undeleteRecord ($table, $uid) | |
| deleteRecord ($table, $uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE, $undeleteRecord=FALSE) | |
| deleteRecord_flexFormCallBack ($dsArr, $dataValue, $PA, $structurePath, &$pObj) | |
| deletePages ($uid, $force=FALSE, $forceHardDelete=FALSE) | |
| deleteSpecificPage ($uid, $forceHardDelete=FALSE) | |
| canDeletePage ($uid) | |
| cannotDeleteRecord ($table, $id) | |
| deleteRecord_procFields ($table, $uid, $undeleteRecord=false) | |
| deleteRecord_procBasedOnFieldType ($table, $uid, $field, $value, $conf, $undeleteRecord=false) | |
| versionizeRecord ($table, $id, $label, $delete=FALSE, $versionizeTree=-1) | |
| versionizePages ($uid, $label, $versionizeTree) | |
| version_swap ($table, $id, $swapWith, $swapIntoWS=0) | |
| version_clearWSID ($table, $id, $flush=FALSE) | |
| version_setStage ($table, $id, $stageId, $comment='', $accumulateForNotifEmail=FALSE) | |
| version_swap_procBasedOnFieldType ($table, $field, $conf, &$curVersion, &$swapVersion) | |
| version_remapMMForVersionSwap ($table, $id, $swapWith) | |
| version_remapMMForVersionSwap_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2, $path) | |
| version_remapMMForVersionSwap_execSwap ($table, $id, $swapWith) | |
| remapListedDBRecords () | |
| remapListedDBRecords_flexFormCallBack ($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2) | |
| remapListedDBRecords_procDBRefs ($conf, $value, $MM_localUid, $table) | |
| remapListedDBRecords_procInline ($conf, $value, $uid, $table) | |
| processRemapStack () | |
| getVersionizedIncomingFieldArray ($table, $id, &$incomingFieldArray, &$registerDBList) | |
| checkModifyAccessList ($table) | |
| isRecordInWebMount ($table, $id) | |
| isInWebMount ($pid) | |
| checkRecordUpdateAccess ($table, $id) | |
| checkRecordInsertAccess ($insertTable, $pid, $action=1) | |
| isTableAllowedForThisPage ($page_uid, $checkTable) | |
| doesRecordExist ($table, $id, $perms) | |
| doesRecordExist_pageLookUp ($id, $perms) | |
| doesBranchExist ($inList, $pid, $perms, $recurse) | |
| tableReadOnly ($table) | |
| tableAdminOnly ($table) | |
| destNotInsideSelf ($dest, $id) | |
| getExcludeListArray () | |
| doesPageHaveUnallowedTables ($page_uid, $doktype) | |
| pageInfo ($id, $field) | |
| recordInfo ($table, $id, $fieldList) | |
| getRecordProperties ($table, $id, $noWSOL=FALSE) | |
| getRecordPropertiesFromRow ($table, $row) | |
| updateDB ($table, $id, $fieldArray) | |
| insertDB ($table, $id, $fieldArray, $newVersion=FALSE, $suggestedUid=0, $dontSetNewIdIndex=FALSE) | |
| checkStoredRecord ($table, $id, $fieldArray, $action) | |
| setHistory ($table, $id, $logId) | |
| clearHistory ($maxAgeSeconds=604800, $table) | |
| updateRefIndex ($table, $id) | |
| getSortNumber ($table, $uid, $pid) | |
| resorting ($table, $pid, $sortRow, $return_SortNumber_After_This_Uid) | |
| setTSconfigPermissions ($fieldArray, $TSConfig_p) | |
| newFieldArray ($table) | |
| addDefaultPermittedLanguageIfNotSet ($table, &$incomingFieldArray) | |
| overrideFieldArray ($table, $data) | |
| compareFieldArrayWithCurrentAndUnset ($table, $id, $fieldArray) | |
| assemblePermissions ($string) | |
| rmComma ($input) | |
| convNumEntityToByteValue ($input) | |
| destPathFromUploadFolder ($folder) | |
| deleteClause ($table) | |
| getTCEMAIN_TSconfig ($tscPID) | |
| getTableEntries ($table, $TSconfig) | |
| getPID ($table, $uid) | |
| dbAnalysisStoreExec () | |
| removeRegisteredFiles () | |
| removeCacheFiles () | |
| int_pageTreeInfo ($CPtable, $pid, $counter, $rootID) | |
| compileAdminTables () | |
| fixUniqueInPid ($table, $uid) | |
| fixCopyAfterDuplFields ($table, $uid, $prevUid, $update, $newData=array()) | |
| extFileFields ($table) | |
| getUniqueFields ($table) | |
| isReferenceField ($conf) | |
| getInlineFieldType ($conf) | |
| getCopyHeader ($table, $pid, $field, $value, $count, $prevTitle='') | |
| prependLabel ($table) | |
| resolvePid ($table, $pid) | |
| clearPrefixFromValue ($table, $value) | |
| extFileFunctions ($table, $field, $filelist, $func) | |
| noRecordsFromUnallowedTables ($inList) | |
| notifyStageChange ($stat, $stageId, $table, $id, $comment) | |
| notifyStageChange_getEmails ($listOfUsers, $noTablePrefix=FALSE) | |
| isRecordCopied ($table, $uid) | |
| clear_cache ($table, $uid) | |
| clear_cacheCmd ($cacheCmd) | |
| log ($table, $recuid, $action, $recpid, $error, $details, $details_nr=-1, $data=array(), $event_pid=-1, $NEWid='') | |
| newlog ($message, $error=0) | |
| printLogErrorMessages ($redirect) | |
| internal_clearPageCache () | |
| findPageIdsForVersionStateChange ($table, $idList, $workspaceId, &$pageIdList, &$elementList) | |
| findPageElementsForVersionStageChange ($pageIdList, $workspaceId, &$elementList) | |
| findRealPageIds (&$idList) | |
| findPageElementsForVersionSwap ($table, $id, $offlineId) | |
| insertUpdateDB_preprocessBasedOnFieldType ($table, $fieldArray) | |
Öffentliche Attribute | |
| $storeLogMessages = TRUE | |
| $enableLogging = TRUE | |
| $reverseOrder = FALSE | |
| $checkSimilar = TRUE | |
| $stripslashes_values = TRUE | |
| $checkStoredRecords = TRUE | |
| $checkStoredRecords_loose = TRUE | |
| $deleteTree = FALSE | |
| $neverHideAtCopy = FALSE | |
| $dontProcessTransformations = FALSE | |
| $clear_flexFormData_vDEFbase = FALSE | |
| $updateModeL10NdiffData = TRUE | |
| $bypassWorkspaceRestrictions = FALSE | |
| $bypassFileHandling = FALSE | |
| $bypassAccessCheckForRecords = FALSE | |
| $copyWhichTables = '*' | |
| $generalComment = '' | |
| $copyTree = 0 | |
| $defaultValues = array() | |
| $overrideValues = array() | |
| $alternativeFileName = array() | |
| $data_disableFields = array() | |
| $suggestedInsertUids = array() | |
| $callBackObj | |
| $autoVersionIdMap = Array() | |
| $substNEWwithIDs = Array() | |
| $substNEWwithIDs_table = Array() | |
| $newRelatedIDs = Array() | |
| $copyMappingArray_merged = Array() | |
| $copiedFileMap = Array() | |
| $RTEmagic_copyIndex = Array() | |
| $errorLog = Array() | |
| $accumulateForNotifEmail = Array() | |
| $BE_USER | |
| $userid | |
| $username | |
| $admin | |
| $defaultPermissions | |
| $exclude_array | |
| $datamap = Array() | |
| $cmdmap = Array() | |
| $pMap | |
| $sortIntervals = 256 | |
| $recUpdateAccessCache = Array() | |
| $recInsertAccessCache = Array() | |
| $isRecordInWebMount_Cache = array() | |
| $isInWebMount_Cache = array() | |
| $cachedTSconfig = array() | |
| $pageCache = Array() | |
| $checkWorkspaceCache = Array() | |
| $dbAnalysisStore = array() | |
| $removeFilesStore = array() | |
| $uploadedFileArray = array() | |
| $registerDBList = array() | |
| $registerDBPids = array() | |
| $copyMappingArray = Array() | |
| $remapStack = array() | |
| $remapStackRecords = array() | |
| $updateRefIndexStack = array() | |
| $callFromImpExp = false | |
| $newIndexMap = array() | |
| $fileFunc | |
| $checkValue_currentRecord = array() | |
| $autoVersioningUpdate = FALSE | |
Geschützte Methoden | |
| checkValue_inline_processDBdata ($valueArray, $tcaFieldConf, $id, $status, $table, $field) | |
| inlineLocalizeSynchronize ($table, $id, $command) | |
| t3lib_TCEmain::_ACTION_FLEX_FORMdata | ( | &$ | valueArray, | |
| $ | actionCMDs | |||
| ) |
Actions for flex form element (move, delete)
| array | &$valueArrayToRemoveFrom: by reference | |
| array | $deleteCMDS: ... * |
| 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.
| string | Table name | |
| array | Incoming array (passed by reference) |
| t3lib_TCEmain::assemblePermissions | ( | $ | string | ) |
Calculates the bitvalue of the permissions given in a string, comma-sep
| string | List of pMap strings |
| t3lib_TCEmain::canDeletePage | ( | $ | uid | ) |
Used to evaluate if a page can be deleted
| integer | Page id |
| 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.
| string | Record Table | |
| integer | Record UID |
| t3lib_TCEmain::checkModifyAccessList | ( | $ | table | ) |
Checking group modify_table access list
| string | Table name |
| 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.
| string | Tablename to check | |
| integer | Integer PID | |
| integer | For logging: Action number. |
| t3lib_TCEmain::checkRecordUpdateAccess | ( | $ | table, | |
| $ | id | |||
| ) |
Checks if user may update a record with uid=$id from $table
| string | Record table | |
| integer | Record UID |
| t3lib_TCEmain::checkStoredRecord | ( | $ | table, | |
| $ | id, | |||
| $ | fieldArray, | |||
| $ | action | |||
| ) |
Checking stored record to see if the written values are properly updated.
| string | Record table name | |
| integer | Record uid | |
| array | Array of field=>value pairs to insert/update | |
| string | Action, for logging only. |
| 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() )
| 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 |
| t3lib_TCEmain::checkValue_check | ( | $ | res, | |
| $ | value, | |||
| $ | tcaFieldConf, | |||
| $ | PP | |||
| ) |
Evaluates 'check' type values.
| 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 |
| 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.
| array | $tcaFieldConf: Field configuration from TCA | |
| array | $valueArray: Current value array of items |
| t3lib_TCEmain::checkValue_flex | ( | $ | res, | |
| $ | value, | |||
| $ | tcaFieldConf, | |||
| $ | PP, | |||
| $ | uploadedFiles, | |||
| $ | field | |||
| ) |
Evaluates 'flex' type values.
| 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 |
| 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
| 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! |
| 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.
| 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: ... |
| t3lib_TCEmain::checkValue_flexArray2Xml | ( | $ | array, | |
| $ | addPrologue = FALSE | |||
| ) |
Converts an array to FlexForm XML
| array | Array with FlexForm data | |
| boolean | If set, the XML prologue is returned as well. |
| t3lib_TCEmain::checkValue_group_select | ( | $ | res, | |
| $ | value, | |||
| $ | tcaFieldConf, | |||
| $ | PP, | |||
| $ | uploadedFiles, | |||
| $ | field | |||
| ) |
Evaluates 'group' or 'select' type values.
| 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 |
| t3lib_TCEmain::checkValue_group_select_explodeSelectGroupValue | ( | $ | value | ) |
Explodes the $value, which is a list of files/uids (group select)
| 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. |
| t3lib_TCEmain::checkValue_group_select_file | ( | $ | valueArray, | |
| $ | tcaFieldConf, | |||
| $ | curValue, | |||
| $ | uploadedFileArray, | |||
| $ | status, | |||
| $ | table, | |||
| $ | id, | |||
| $ | recFID | |||
| ) |
Handling files for group/select function
| 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?] |
| t3lib_TCEmain::checkValue_group_select_processDBdata | ( | $ | valueArray, | |
| $ | tcaFieldConf, | |||
| $ | id, | |||
| $ | status, | |||
| $ | type, | |||
| $ | currentTable | |||
| ) |
Returns data for group/db and select fields
| 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 |
| t3lib_TCEmain::checkValue_inline | ( | $ | res, | |
| $ | value, | |||
| $ | tcaFieldConf, | |||
| $ | PP, | |||
| $ | field | |||
| ) |
Evaluates 'inline' type values. (partly copied from the select_group function on this issue)
| 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 |
| t3lib_TCEmain::checkValue_inline_processDBdata | ( | $ | valueArray, | |
| $ | tcaFieldConf, | |||
| $ | id, | |||
| $ | status, | |||
| $ | table, | |||
| $ | field | |||
| ) | [protected] |
Returns data for inline fields.
| array | Current value array | |
| array | TCA field config | |
| integer | Record id | |
| string | Status string ('update' or 'new') | |
| string | Table name, needs to be passed to t3lib_loadDBGroup | |
| string | The current field the values are modified for |
| t3lib_TCEmain::checkValue_input | ( | $ | res, | |
| $ | value, | |||
| $ | tcaFieldConf, | |||
| $ | PP, | |||
| $ | field = '' | |||
| ) |
Evaluate "input" type values.
| 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 |
| t3lib_TCEmain::checkValue_input_Eval | ( | $ | value, | |
| $ | evalArray, | |||
| $ | is_in | |||
| ) |
Evaluation of 'input'-type values based on 'eval' list
| string | Value to evaluate | |
| array | Array of evaluations to traverse. | |
| string | Is-in string for 'is_in' evaluation |
| t3lib_TCEmain::checkValue_radio | ( | $ | res, | |
| $ | value, | |||
| $ | tcaFieldConf, | |||
| $ | PP | |||
| ) |
Evaluates 'radio' type values.
| 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 |
| 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.
| 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: ... |
| t3lib_TCEmain::checkValue_text | ( | $ | res, | |
| $ | value, | |||
| $ | tcaFieldConf, | |||
| $ | PP, | |||
| $ | field = '' | |||
| ) |
Evaluate "text" type values.
| 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 |
| 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.
| string | Table name of record that was just updated. | |
| integer | UID of updated / inserted record |
| t3lib_TCEmain::clear_cacheCmd | ( | $ | cacheCmd | ) |
Clears the cache based on the command $cacheCmd.
$cacheCmd='pages': Clears cache for all pages. Requires admin-flag to be set for BE_USER.
$cacheCmd='all': Clears all cache_tables. This is necessary if templates are updated. Requires admin-flag to be set for BE_USER.
$cacheCmd=[integer]: Clears cache for the page pointed to by $cacheCmd (an integer).
Can call a list of post processing functions as defined in $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] (numeric array with values being the function references, called by t3lib_div::callUserFunction()).
Note: The following cache_* are intentionally not cleared by $cacheCmd='all':
| string | the cache command, see above description |
| t3lib_TCEmain::clearHistory | ( | $ | maxAgeSeconds = 604800, |
|
| $ | table | |||
| ) |
Clearing sys_history table from older entries that are expired.
| 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 |
| t3lib_TCEmain::clearPrefixFromValue | ( | $ | table, | |
| $ | value | |||
| ) |
Removes the prependAtCopy prefix on values
| string | Table name | |
| string | The value to fix |
| 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
| 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! |
| t3lib_TCEmain::compileAdminTables | ( | ) |
List of all tables (those administrators has access to = array_keys of $TCA)
| t3lib_TCEmain::convNumEntityToByteValue | ( | $ | input | ) |
Converts a HTML entity (like {) to the character '123'
| string | Input string |
| t3lib_TCEmain::copyPages | ( | $ | uid, | |
| $ | destPid | |||
| ) |
Copying pages Main function for copying pages.
| 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 |
| t3lib_TCEmain::copyRecord | ( | $ | table, | |
| $ | uid, | |||
| $ | destPid, | |||
| $ | first = 0, |
|||
| $ | overrideValues = array(), |
|||
| $ | excludeFields = '', |
|||
| $ | language = 0 | |||
| ) |
Copying a single record
| string | Element table | |
| integer | Element UID | |
| integer | $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if | |
| boolean | $first is a flag set, if the record copied is NOT a 'slave' to another record copied. That is, if this record was asked to be copied in the cmd-array | |
| array | Associative array with field/value pairs to override directly. Notice; Fields must exist in the table record and NOT be among excluded fields! | |
| string | Commalist of fields to exclude from the copy process (might get default values) | |
| integer | Language ID (from sys_language table) |
| t3lib_TCEmain::copyRecord_fixRTEmagicImages | ( | $ | table, | |
| $ | theNewSQLID | |||
| ) |
Copies any "RTEmagic" image files found in record with table/id to new names. Usage: After copying a record this function should be called to search for "RTEmagic"-images inside the record. If such are found they should be duplicated to new names so all records have a 1-1 relation to them. Reason for copying RTEmagic files: a) if you remove an RTEmagic image from a record it will remove the file - any other record using it will have a lost reference! b) RTEmagic images keeps an original and a copy. The copy always is re-calculated to have the correct physical measures as the HTML tag inserting it defines. This is calculated from the original. Two records using the same image could have difference HTML-width/heights for the image and the copy could only comply with one of them. If you don't want a 1-1 relation you should NOT use RTEmagic files but just insert it as a normal file reference to a file inside fileadmin/ folder
| string | Table name | |
| integer | Record UID |
| 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.
| 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. |
| t3lib_TCEmain::copyRecord_procBasedOnFieldType | ( | $ | table, | |
| $ | uid, | |||
| $ | field, | |||
| $ | value, | |||
| $ | row, | |||
| $ | conf, | |||
| $ | realDestPid, | |||
| $ | language = 0 | |||
| ) |
Processing/Preparing content for copyRecord() function
| string | Table name | |
| integer | Record uid | |
| string | Field name being processed | |
| string | Input value to be processed. | |
| array | Record array | |
| array | TCA field configuration | |
| integer | Real page id (pid) the record is copied to | |
| integer | Language ID (from sys_language table) used in the duplicated record |
| 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.
| array | TCE field config | |
| integer | Record UID | |
| string | Field value (eg. list of files) |
| 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.
| 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! |
| t3lib_TCEmain::copySpecificPage | ( | $ | uid, | |
| $ | destPid, | |||
| $ | copyTablesArray, | |||
| $ | first = 0 | |||
| ) |
Copying a single page ($uid) to $destPid and all tables in the array copyTablesArray.
| 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 |
| 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
| t3lib_TCEmain::deleteAction | ( | $ | table, | |
| $ | id | |||
| ) |
Delete a single record
| string | Table name | |
| integer | Record UID |
| t3lib_TCEmain::deleteClause | ( | $ | table | ) |
Returns delete-clause for the $table
| string | Table name |
| t3lib_TCEmain::deleteEl | ( | $ | table, | |
| $ | uid, | |||
| $ | noRecordCheck = FALSE, |
|||
| $ | forceHardDelete = FALSE | |||
| ) |
Delete element from any table
| 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! |
| 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.
| 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! |
| 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!
| 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. |
| 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.
| [type] | $dsArr: ... | |
| [type] | $dataValue: ... | |
| [type] | $PA: ... | |
| [type] | $structurePath: ... | |
| [type] | $pObj: ... |
| 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.
| string | $table: Record Table | |
| string | $uid: Record UID | |
| string | $field: Record field | |
| string | $value: Record field value | |
| array | $conf: TCA configuration of current field | |
| boolean | $undeleteRecord: If a record should be undeleted (e.g. from history/undo) |
| 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.
| string | $table: Record Table | |
| string | $uid: Record UID | |
| boolean | $undeleteRecord: If a record should be undeleted (e.g. from history/undo) |
| t3lib_TCEmain::deleteSpecificPage | ( | $ | uid, | |
| $ | forceHardDelete = FALSE | |||
| ) |
Delete a page and all records on it.
| integer | Page id | |
| boolean | If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY! |
| t3lib_TCEmain::deleteVersionsForRecord | ( | $ | table, | |
| $ | uid, | |||
| $ | forceHardDelete | |||
| ) |
Delete versions for element from any table
| string | Table name | |
| integer | Record UID | |
| boolean | If TRUE, the "deleted" flag is ignored if applicable for record and the record is deleted COMPLETELY! |
| t3lib_TCEmain::destNotInsideSelf | ( | $ | dest, | |
| $ | id | |||
| ) |
Checks if piage $id is a uid in the rootline from page id, $dest Used when moving a page
| integer | Destination Page ID to test | |
| integer | Page ID to test for presence inside Destination |
| t3lib_TCEmain::destPathFromUploadFolder | ( | $ | folder | ) |
Returns absolute destination path for the uploadfolder, $folder
| string | Upload folder name, relative to PATH_site |
| t3lib_TCEmain::doesBranchExist | ( | $ | inList, | |
| $ | pid, | |||
| $ | perms, | |||
| $ | recurse | |||
| ) |
Checks if a whole branch of pages exists
Tests the branch under $pid (like doesRecordExist). It doesn't test the page with $pid as uid. Use doesRecordExist() for this purpose Returns an ID-list or "" if OK. Else -1 which means that somewhere there was no permission (eg. to delete). if $recurse is set, then the function will follow subpages. This MUST be set, if we need the idlist for deleting pages or else we get an incomplete list
| 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. |
| t3lib_TCEmain::doesPageHaveUnallowedTables | ( | $ | page_uid, | |
| $ | doktype | |||
| ) |
Checks if there are records on a page from tables that are not allowed
| integer | Page ID | |
| integer | Page doktype |
| t3lib_TCEmain::doesRecordExist | ( | $ | table, | |
| $ | id, | |||
| $ | perms | |||
| ) |
Checks if record can be selected based on given permission criteria
| 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 |
| t3lib_TCEmain::doesRecordExist_pageLookUp | ( | $ | id, | |
| $ | perms | |||
| ) |
Looks up a page based on permissions.
| integer | Page id | |
| integer | Permission integer |
| t3lib_TCEmain::extFileFields | ( | $ | table | ) |
Returns all fieldnames from a table which are a list of files
| string | Table name |
| t3lib_TCEmain::extFileFunctions | ( | $ | table, | |
| $ | field, | |||
| $ | filelist, | |||
| $ | func | |||
| ) |
File functions on external file references. eg. deleting files when deleting record
| 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. |
| 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.
| string | Table name | |
| integer | Record ID | |
| array | Default values, Preset $fieldArray with 'pid' maybe (pid and uid will be not be overridden anyway) | |
| array | $incomingFieldArray is which fields/values you want to set. There are processed and put into $fieldArray if OK | |
| integer | The real PID value of the record. For updates, this is just the pid of the record. For new records this is the PID of the page where it is inserted. | |
| string | $status = 'new' or 'update' | |
| integer | $tscPID: TSconfig PID |
| t3lib_TCEmain::findPageElementsForVersionStageChange | ( | $ | pageIdList, | |
| $ | workspaceId, | |||
| &$ | elementList | |||
| ) |
Searches for all elements from all tables on the given pages in the same workspace.
| array | $pageIdList List of PIDs to search | |
| int | $workspaceId Workspace ID | |
| array | $elementList List of found elements. Key is table name, value is array of element UIDs |
| t3lib_TCEmain::findPageElementsForVersionSwap | ( | $ | table, | |
| $ | id, | |||
| $ | offlineId | |||
| ) |
Finds all elements for swapping versions in workspace
| string | $table Table name of the original element to swap | |
| int | $id UID of the original element to swap (online) | |
| int | $offlineId As above but offline |
| t3lib_TCEmain::findPageIdsForVersionStateChange | ( | $ | table, | |
| $ | idList, | |||
| $ | workspaceId, | |||
| &$ | pageIdList, | |||
| &$ | elementList | |||
| ) |
Finds page UIDs for the element from table $table with UIDs from $idList
| array | $table Table to search | |
| array | $idList List of records' UIDs | |
| int | $workspaceId Workspace ID. We need this parameter because user can be in LIVE but he still can publisg DRAFT from ws module! | |
| array | $pageIdList List of found page UIDs | |
| array | $elementList List of found element UIDs. Key is table name, value is list of UIDs |
| t3lib_TCEmain::findRealPageIds | ( | &$ | idList | ) |
Finds real page IDs for state change.
| array | $idList List of page UIDs, possibly versioned |
| 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)
| 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. |
| 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.
| string | Table name | |
| integer | Record UID |
| t3lib_TCEmain::getCopyHeader | ( | $ | table, | |
| $ | pid, | |||
| $ | field, | |||
| $ | value, | |||
| $ | count, | |||
| $ | prevTitle = '' | |||
| ) |
Get modified header for a copied record
| 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) |
| 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
| 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.
| array | config array for TCA/columns field |
| t3lib_TCEmain::getPID | ( | $ | table, | |
| $ | uid | |||
| ) |
Returns the pid of a record from $table with $uid
| string | Table name | |
| integer | Record uid |
| 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
| string | Table name | |
| integer | Uid of record | |
| boolean | If set, no workspace overlay is performed |
| t3lib_TCEmain::getRecordPropertiesFromRow | ( | $ | table, | |
| $ | row | |||
| ) |
Returns an array with record properties, like header and pid, based on the row
| string | Table name | |
| array | Input row |
| 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.
| 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) |
| t3lib_TCEmain::getTableEntries | ( | $ | table, | |
| $ | TSconfig | |||
| ) |
Extract entries from TSconfig for a specific table. This will merge specific and default configuration together.
| string | Table name | |
| array | TSconfig for page |
| t3lib_TCEmain::getTCEMAIN_TSconfig | ( | $ | tscPID | ) |
Return TSconfig for a page id
| integer | Page id (PID) from which to get configuration. |
| t3lib_TCEmain::getUnique | ( | $ | table, | |
| $ | field, | |||
| $ | value, | |||
| $ | id, | |||
| $ | newPid = 0 | |||
| ) |
Gets a unique value for $table/$id/$field based on $value
| 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 |
| t3lib_TCEmain::getUniqueFields | ( | $ | table | ) |
Returns all fieldnames from a table which have the unique evaluation type set.
| string | Table name |
| t3lib_TCEmain::getVersionizedIncomingFieldArray | ( | $ | table, | |
| $ | id, | |||
| &$ | incomingFieldArray, | |||
| &$ | registerDBList | |||
| ) |
If a parent record was versionized on a workspace in $this->process_datamap, it might be possible, that child records (e.g. on using IRRE) were affected. This function finds these relations and updates their uids in the $incomingFieldArray. The $incomingFieldArray is updated by reference!
| string | $table: Table name of the parent record | |
| integer | $id: Uid of the parent record | |
| array | $incomingFieldArray: Reference to the incominfFieldArray of process_datamap | |
| array |
registerDBList array that was created/updated by versionizing calls to TCEmain in process_datamap.
| t3lib_TCEmain::hook_processDatamap_afterDatabaseOperations | ( | &$ | hookObjectsArr, | |
| &$ | status, | |||
| &$ | table, | |||
| &$ | id, | |||
| &$ | fieldArray | |||
| ) |
Hook: processDatamap_afterDatabaseOperations (calls $hookObj->processDatamap_afterDatabaseOperations($status, $table, $id, $fieldArray, $this);)
Note: When using the hook after INSERT operations, you will only get the temporary NEW... id passed to your hook as $id, but you can easily translate it to the real uid of the inserted record using the $this->substNEWwithIDs array.
| object | $hookObjectsArr: (reference) Array with hook objects | |
| string | $status: (reference) Status of the current operation, 'new' or 'update | |
| string | $table: (refrence) The table currently processing data for | |
| string | $id: (reference) The record uid currently processing data for, [integer] or [string] (like 'NEW...') | |
| array | $fieldArray: (reference) The field array of a record |
| t3lib_TCEmain::inlineLocalizeSynchronize | ( | $ | table, | |
| $ | id, | |||
| $ | command | |||
| ) | [protected] |
Performs localization or synchronization of child records.
| string | $table: The table of the localized parent record | |
| integer | $id: The uid of the localized parent record | |
| mixed | $command: Defines the type 'localize' or 'synchronize' (string) or a single uid to be localized (integer) |
| 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
| 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! |
| 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...
| 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! |
| t3lib_TCEmain::insertUpdateDB_preprocessBasedOnFieldType | ( | $ | table, | |
| $ | fieldArray | |||
| ) |
Proprocesses field array based on field type. Some fields must be adjusted before going to database. This is done on the copy of the field array because original values are used in remap action later.
| string | $table Table name | |
| array | $fieldArray Field array to check |
| 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!
| 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! |
| t3lib_TCEmain::internal_clearPageCache | ( | ) |
Clears page cache. Takes into account file cache.
| t3lib_TCEmain::isInWebMount | ( | $ | pid | ) |
Checks if the input page ID is in the BE_USER webmounts
| integer | Page ID to check |
| t3lib_TCEmain::isRecordCopied | ( | $ | table, | |
| $ | uid | |||
| ) |
Determine if a record was copied or if a record is the result of a copy action.
| string | $table: The tablename of the record | |
| integer | $uid: The uid of the record |
| 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.
| string | Table name | |
| integer | UID of record |
| t3lib_TCEmain::isReferenceField | ( | $ | conf | ) |
Returns true if the TCA/columns field type is a DB reference field
| array | config array for TCA/columns field |
| 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.
| integer | Page id for which to check, including 0 (zero) if checking for page tree root. | |
| string | Table name to check |
| 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
| string | Table name | |
| integer | Record uid (to be localized) | |
| integer | Language ID (from sys_language table) |
| t3lib_TCEmain::log | ( | $ | table, | |
| $ | recuid, | |||
| $ | action, | |||
| $ | recpid, | |||
| $ | error, | |||
| $ | details, | |||
| $ | details_nr = -1, |
|||
| $ | data = array(), |
|||
| $ | event_pid = -1, |
|||
| $ | NEWid = '' | |||
| ) |
Logging actions from TCEmain
| 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 |
| t3lib_TCEmain::moveRecord | ( | $ | table, | |
| $ | uid, | |||
| $ | destPid | |||
| ) |
Moving single records
| 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 |
| t3lib_TCEmain::moveRecord_procBasedOnFieldType | ( | $ | table, | |
| $ | uid, | |||
| $ | destPid, | |||
| $ | field, | |||
| $ | value, | |||
| $ | conf | |||
| ) |
Move child records depending on the field type of the parent record.
| string | $table: Record Table | |
| string | $uid: Record UID | |
| string | $destPid: Position to move to | |
| string | $field: Record field | |
| string | $value: Record field value | |
| array | $conf: TCA configuration of current field |
| 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.
| string | $table: Record Table | |
| string | $uid: Record UID | |
| string | $destPid: Position to move to |
| t3lib_TCEmain::moveRecord_raw | ( | $ | table, | |
| $ | uid, | |||
| $ | destPid | |||
| ) |
Moves a record without checking security of any sort. USE ONLY INTERNALLY
| 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 |
| t3lib_TCEmain::moveRecord_wsPlaceholders | ( | $ | table, | |
| $ | uid, | |||
| $ | destPid, | |||
| $ | wsUid | |||
| ) |
Creates a move placeholder for workspaces. USE ONLY INTERNALLY Moving placeholder: Can be done because the system sees it as a placeholder for NEW elements like t3ver_state=1 Moving original: Will either create the placeholder if it doesn't exist or move existing placeholder in workspace.
| string | Table name to move | |
| integer | Record uid to move (online record) | |
| integer | Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if | |
| integer | UID of offline version of online record |
| 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
| string | Table name for which to set default values. |
| t3lib_TCEmain::newlog | ( | $ | message, | |
| $ | error = 0 | |||
| ) |
| t3lib_TCEmain::noRecordsFromUnallowedTables | ( | $ | inList | ) |
Used by the deleteFunctions to check if there are records from disallowed tables under the pages to be deleted.
| string | List of page integers |
| t3lib_TCEmain::notifyStageChange | ( | $ | stat, | |
| $ | stageId, | |||
| $ | table, | |||
| $ | id, | |||
| $ | comment | |||
| ) |
Send an email notification to users in workspace
| array | Workspace access array (from t3lib_userauthgroup::checkWorkspace()) | |
| integer | New Stage number: 0 = editing, 1= just ready for review, 10 = ready for publication, -1 = rejected! | |
| string | Table name of element (or list of element names if $id is zero) | |
| integer | Record uid of element (if zero, then $table is used as reference to element(s) alone) | |
| string | User comment sent along with action |
| t3lib_TCEmain::notifyStageChange_getEmails | ( | $ | listOfUsers, | |
| $ | noTablePrefix = FALSE | |||
| ) |
Return emails addresses of be_users from input list.
| 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. |
| t3lib_TCEmain::overrideFieldArray | ( | $ | table, | |
| $ | data | |||
| ) |
Returns the $data array from $table overridden in the fields defined in ->overrideValues.
| string | Table name | |
| array | Data array with fields from table. These will be overlaid with values in $this->overrideValues[$table] |
| 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!
| integer | Page uid | |
| string | Field name for which to return value |
| t3lib_TCEmain::placeholderShadowing | ( | $ | table, | |
| $ | id | |||
| ) |
Fix shadowing of data in case we are editing a offline version of a live "New" placeholder record:
| string | Table name | |
| integer | Record uid |
| t3lib_TCEmain::prependLabel | ( | $ | table | ) |
Return "copy" label for a table. Although the name is "prepend" it actually APPENDs the label (after ...)
| string | Table name |
| t3lib_TCEmain::printLogErrorMessages | ( | $ | redirect | ) |
Print log error messages from the operations of this script instance
| string | Redirect URL (for creating link in message) |
| t3lib_TCEmain::process_cmdmap | ( | ) |
Processing the cmd-array See "TYPO3 Core API" for a description of the options.
| t3lib_TCEmain::process_datamap | ( | ) |
Processing the data-array Call this function to process the data-array set by start()
| 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.
| array | $_FILES array |
| t3lib_TCEmain::process_uploads_traverseArray | ( | &$ | outputArr, | |
| $ | inputArr, | |||
| $ | keyToSet | |||
| ) |
Traverse the upload array if needed to rearrange values.
| array | $this->uploadedFileArray passed by reference | |
| array | Input array ($_FILES parts) | |
| string | The current $_FILES array key to set on the outermost level. |
| t3lib_TCEmain::processRemapStack | ( | ) |
Processes the $this->remapStack at the end of copying, inserting, etc. actions. The remapStack takes care about the correct mapping of new and old uids in case of relational data.
| 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!)
| integer | Current page id. | |
| integer | New page id | |
| array | Array of tables from which to copy |
| 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!
| string | Table name | |
| integer | UID of the record from $table | |
| string | Field list for the SELECT query, eg. "*" or "uid,pid,..." |
| t3lib_TCEmain::remapListedDBRecords | ( | ) |
Processes the fields with references as registered during the copy process. This includes all FlexForm fields which had references.
| 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.
| 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 |
| t3lib_TCEmain::remapListedDBRecords_procDBRefs | ( | $ | conf, | |
| $ | value, | |||
| $ | MM_localUid, | |||
| $ | table | |||
| ) |
Performs remapping of old UID values to NEW uid values for a DB reference field.
| 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 |
| t3lib_TCEmain::remapListedDBRecords_procInline | ( | $ | conf, | |
| $ | value, | |||
| $ | uid, | |||
| $ | table | |||
| ) |
Performs remapping of old UID values to NEW uid values for a inline field.
| array | $conf: TCA field config | |
| string | $value: Field value | |
| integer | $uid: The uid of the ORIGINAL record | |
| string | $table: Table name |
| t3lib_TCEmain::removeCacheFiles | ( | ) |
Unlink (delete) typo3conf/temp_CACHED_*.php cache files
| t3lib_TCEmain::removeRegisteredFiles | ( | ) |
Removing files registered for removal before exit
| t3lib_TCEmain::resolvePid | ( | $ | table, | |
| $ | pid | |||
| ) |
Get the final pid based on $table and $pid ($destPid type... pos/neg)
| 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! |
| t3lib_TCEmain::resorting | ( | $ | table, | |
| $ | pid, | |||
| $ | sortRow, | |||
| $ | return_SortNumber_After_This_Uid | |||
| ) |
Resorts a table. Used internally by getSortNumber()
| 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 |
| t3lib_TCEmain::rmComma | ( | $ | input | ) |
Returns the $input string without a comma in the end
| string | Input string |
| t3lib_TCEmain::setDefaultsFromUserTS | ( | $ | userTS | ) |
Initializes default values coming from User TSconfig
| array | User TSconfig array |
| t3lib_TCEmain::setHistory | ( | $ | table, | |
| $ | id, | |||
| $ | logId | |||
| ) |
Setting sys_history record, based on content previously set in $this->historyRecords[$table.':'.$id] (by compareFieldArrayWithCurrentAndUnset())
| string | Table name | |
| integer | Record ID | |
| integer | Log entry ID, important for linking between log and history views |
| 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]
| array | This array has the syntax $mirror[table_name][uid] = [list of uids to copy data-value TO!] |
| t3lib_TCEmain::setTSconfigPermissions | ( | $ | fieldArray, | |
| $ | TSConfig_p | |||
| ) |
Setting up perms_* fields in $fieldArray based on TSconfig input Used for new pages
| array | Field Array, returned with modifications | |
| array | TSconfig properties |
| 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
| 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'] |
| t3lib_TCEmain::tableAdminOnly | ( | $ | table | ) |
Checks if the $table is only editable by admin-users
| string | Table name |
| t3lib_TCEmain::tableReadOnly | ( | $ | table | ) |
Checks if the $table is readOnly
| string | Table name |
| t3lib_TCEmain::undeleteRecord | ( | $ | table, | |
| $ | uid | |||
| ) |
Undelete a single record
| string | Table name | |
| integer | Record UID |
| t3lib_TCEmain::updateDB | ( | $ | table, | |
| $ | id, | |||
| $ | fieldArray | |||
| ) |
Update database record Does not check permissions but expects them to be verified on beforehand
| 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. |
| 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.
| string | Table name | |
| integer | Record UID |
| t3lib_TCEmain::version_clearWSID | ( | $ | table, | |
| $ | id, | |||
| $ | flush = FALSE | |||
| ) |
Release version from this workspace (and into "Live" workspace but as an offline version).
| string | Table name | |
| integer | Record UID | |
| boolean | If set, will completely delete element |
| t3lib_TCEmain::version_remapMMForVersionSwap | ( | $ | table, | |
| $ | id, | |||
| $ | swapWith | |||
| ) |
Swaps MM-relations for current/swap record, see version_swap()
| string | Table for the two input records | |
| integer | Current record (about to go offline) | |
| integer | Swap record (about to go online) |
| t3lib_TCEmain::version_remapMMForVersionSwap_execSwap | ( | $ | table, | |
| $ | id, | |||
| $ | swapWith | |||
| ) |
Performing the remapping operations found necessary in version_remapMMForVersionSwap() It must be done in three steps with an intermediate "fake" uid. The UID can be something else than -$id (fx. 9999999+$id if you dare... :-)- as long as it is unique.
| string | Table for the two input records | |
| integer | Current record (about to go offline) | |
| integer | Swap record (about to go online) |
| t3lib_TCEmain::version_remapMMForVersionSwap_flexFormCallBack | ( | $ | pParams, | |
| $ | dsConf, | |||
| $ | dataValue, | |||
| $ | dataValue_ext1, | |||
| $ | dataValue_ext2, | |||
| $ | path | |||
| ) |
Callback function for traversing the FlexForm structure in relation to ...
| array | Array of parameters in num-indexes: table, uid, field | |
| array | TCA field configuration (from Data Structure XML) | |
| string | The value of the flexForm field | |
| string | Not used. | |
| string | Not used. | |
| string | Path in flexforms |
| t3lib_TCEmain::version_setStage | ( | $ | table, | |
| $ | id, | |||
| $ | stageId, | |||
| $ | comment = '', |
|||
| $ | accumulateForNotifEmail = FALSE | |||
| ) |
Setting stage of record
| string | Table name | |
| integer | Record UID | |
| integer | Stage ID to set | |
| string | Comment that goes into log | |
| boolean | Accumulate state changes in memory for compiled notification email? |
| 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
| 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. |
| t3lib_TCEmain::version_swap_procBasedOnFieldType | ( | $ | table, | |
| $ | field, | |||
| $ | conf, | |||
| &$ | curVersion, | |||
| &$ | swapVersion | |||
| ) |
Update relations on version/workspace swapping.
| string | $table: Record Table | |
| string | $field: Record field | |
| array | $conf: TCA configuration of current field | |
| string | $curVersion: Reference to the current (original) record | |
| string | $swapVersion: Reference to the record (workspace/versionized) to publish in or swap with |
| t3lib_TCEmain::versionizePages | ( | $ | uid, | |
| $ | label, | |||
| $ | versionizeTree | |||
| ) |
Creates a new version of a page including content and possible subpages.
| 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] |
| t3lib_TCEmain::versionizeRecord | ( | $ | table, | |
| $ | id, | |||
| $ | label, | |||
| $ | delete = FALSE, |
|||
| $ | versionizeTree = -1 | |||
| ) |
Creates a new version of a record (Requires support in the table)
| 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) |
| t3lib_TCEmain::$defaultPermissions |
array(
'user' => 'show,edit,delete,new,editcontent',
'group' => 'show,edit,new,editcontent',
'everybody' => ''
)
| t3lib_TCEmain::$pMap |
Array(
'show' => 1,
'edit' => 2,
'delete' => 4,
'new' => 8,
'editcontent' => 16
)
1.6.1