T3LIB

 

Files: 60
Total filesizes: 2.3 Mbytes
Functions and classes: 1574

class.t3lib_admin.php

class.t3lib_ajax.php

class.t3lib_arraybrowser.php

class.t3lib_basicfilefunc.php

class.t3lib_bedisplaylog.php

class.t3lib_befunc.php

class.t3lib_beuserauth.php

class.t3lib_browsetree.php

class.t3lib_clipboard.php

class.t3lib_cs.php

class.t3lib_db.php

class.t3lib_diff.php

class.t3lib_div.php

class.t3lib_exec.php

class.t3lib_extfilefunc.php

class.t3lib_extmgm.php

class.t3lib_extobjbase.php

class.t3lib_flexformtools.php

class.t3lib_foldertree.php

class.t3lib_formmail.php

class.t3lib_fullsearch.php

class.t3lib_htmlmail.php

class.t3lib_iconworks.php

class.t3lib_install.php

class.t3lib_loaddbgroup.php

class.t3lib_loadmodules.php

class.t3lib_matchcondition.php

class.t3lib_modsettings.php

class.t3lib_page.php

class.t3lib_pagetree.php

class.t3lib_parsehtml.php

class.t3lib_parsehtml_proc.php

class.t3lib_positionmap.php

class.t3lib_querygenerator.php

class.t3lib_readmail.php

class.t3lib_recordlist.php

class.t3lib_refindex.php

class.t3lib_rteapi.php

class.t3lib_scbase.php

class.t3lib_softrefproc.php

class.t3lib_sqlengine.php

class.t3lib_sqlparser.php

class.t3lib_stdgraphic.php

class.t3lib_superadmin.php

class.t3lib_svbase.php

class.t3lib_syntaxhl.php

class.t3lib_tceforms.php

class.t3lib_tcemain.php

class.t3lib_timetrack.php

class.t3lib_transferdata.php

class.t3lib_treeview.php

class.t3lib_tsfebeuserauth.php

class.t3lib_tsparser.php

class.t3lib_tsparser_ext.php

class.t3lib_tsstyleconfig.php

class.t3lib_tstemplate.php

class.t3lib_userauth.php

class.t3lib_userauthgroup.php

class.t3lib_xml.php

thumbs.php

class.t3lib_admin.php

This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)

Depends on: Depends on loaddbgroup from t3lib/

class t3lib_admin

@todo: Need to really extend this class when the tcemain library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!

@package: TYPO3

@subpackage: t3lib

function genTree($theID, $depthData, $versions=FALSE)

function genTree_records($theID, $depthData, $table='', $versions=FALSE)

function genTreeStatus()

function lostRecords($pid_list)

function fixLostRecord($table,$uid)

function countRecords($pid_list)

function getGroupFields($mode)

function getFileFields($uploadfolder)

function getDBFields($theSearchTable)

function selectNonEmptyRecordsWithFkeys($fkey_arrays)

function testFileRefs ()

function testDBRefs($theArray)

function whereIsRecordReferenced($searchTable,$id)

function whereIsFileReferenced($uploadfolder,$filename)

class.t3lib_ajax.php

TYPO3 XMLHTTP class (new in TYPO3 4.0.0)
This class contains two main parts:
(1) generation of JavaScript code which creates an XMLHTTP object in a cross-browser manner
(2) generation of XML data as a reply

class t3lib_ajax

@package: TYPO3

@subpackage: t3lib

function getJScode($handlerFunction, $fallback='', $debug=0)

function ajax_initObject()

function ajax_doRequest(url)

function outputXMLreply($innerXML)

class.t3lib_arraybrowser.php

Class for displaying an array as a tree
See the extension 'lowlevel' /config (Backend module 'Tools > Configuration')

class t3lib_arrayBrowser

@package: TYPO3

@subpackage: t3lib

function tree($arr, $depth_in, $depthData)

function wrapValue($theValue,$depth)

function wrapArrayKey($label,$depth,$theValue)

function getSearchKeys($keyArr, $depth_in, $searchString, $keyArray)

function fixed_lgd($string,$chars)

function depthKeys($arr,$settings)

class.t3lib_basicfilefunc.php

Contains functions for management, validation etc of files in TYPO3, using the concepts of web- and ftp-space. Please see the comment for the init() function

class t3lib_basicFileFunctions

@package: TYPO3

@subpackage: t3lib

Checking functions

function init($mounts, $f_ext)

function getTotalFileInfo($wholePath)

function is_allowed($iconkey,$type)

function checkIfFullAccess($theDest)

function is_webpath($path)

function checkIfAllowed($ext, $theDest, $filename='')

function checkFileNameLen($fileName)

function is_directory($theDir)

function isPathValid($theFile)

function getUniqueName($theFile, $theDest, $dontCheckForUnique=0)

function checkPathAgainstMounts($thePath)

function findFirstWebFolder()

function blindPath($thePath)

function findTempFolder()

Cleaning functions

function cleanDirectoryName($theDir)

function rmDoubleSlash($string)

function slashPath($path)

function cleanFileName($fileName,$charset='')

function formatSize($sizeInBytes)

class.t3lib_bedisplaylog.php

This class holds some functions used to display the sys_log table-content.
Used in the status-scripts and the log-module.

class t3lib_BEDisplayLog

@package: TYPO3

@subpackage: t3lib

function initArray()

function getTimeLabel($code)

function getUserLabel($code,$workspace=0)

function getTypeLabel($code)

function getActionLabel($code)

function getDetails($code,$text,$data,$sys_log_uid=0)

function reset()

function getErrorFormatting($sign, $error=0)

function formatDetailsForList($row)

function stripPath($inArr)

class.t3lib_befunc.php

Standard functions available for the TYPO3 backend.
Don't instantiate - call functions with "t3lib_BEfunc::" prefixed the function name.

class t3lib_BEfunc

@package: TYPO3

@subpackage: t3lib

SQL-related, selecting records, searching

function deleteClause($table,$tableAlias='')

function getRecord($table,$uid,$fields='*',$where='')

function getRecordWSOL($table,$uid,$fields='*',$where='')

function getRecordRaw($table,$where='',$fields='*')

function getRecordsByField($theTable,$theField,$theValue,$whereClause='',$groupBy='',$orderBy='',$limit='')

function searchQuery($searchWords,$fields,$table='')

function listQuery($field,$value)

function splitTable_Uid($str)

function getSQLselectableList($in_list,$tablename,$default_tablename)

function BEenableFields($table,$inv=0)

SQL-related, DEPRECATED functions
(use t3lib_DB functions instead)

function mm_query($select,$local_table,$mm_table,$foreign_table,$whereClause='',$groupBy='',$orderBy='',$limit='')

function DBcompileInsert($table,$fields_values)

function DBcompileUpdate($table,$where,$fields_values)

Page tree, TCA related

function BEgetRootLine($uid,$clause='',$workspaceOL=FALSE)

function openPageTree($pid,$clearExpansion)

function getRecordPath($uid, $clause, $titleLimit, $fullTitleLimit=0)

function getExcludeFields()

function getExplicitAuthFieldValues()

function getSystemLanguages()

function readPageAccess($id,$perms_clause)

function getTCAtypes($table,$rec,$useFieldNameAsKey=0)

function getTCAtypeValue($table,$rec)

function getSpecConfParts($str, $defaultExtras)

function getSpecConfParametersFromArray($pArr)

function getFlexFormDS($conf,$row,$table,$fieldName='',$WSOL=TRUE)

Caching related

function storeHash($hash,$data,$ident)

function getHash($hash,$expTime=0)

TypoScript related

function getPagesTSconfig($id,$rootLine='',$returnPartArray=0)

function updatePagesTSconfig($id,$pageTS,$TSconfPrefix,$impParams='')

function implodeTSParams($p,$k='')

Users / Groups related

function getUserNames($fields='username,usergroup,usergroup_cached_list,uid',$where='')

function getGroupNames($fields='title,uid', $where='')

function getListGroupNames($fields='title,uid')

function blindUserNames($usernames,$groupArray,$excludeBlindedFlag=0)

function blindGroupNames($groups,$groupArray,$excludeBlindedFlag=0)

Output related

function daysUntil($tstamp)

function date($tstamp)

function datetime($value)

function time($value)

function calcAge($seconds,$labels = 'min|hrs|days|yrs')

function dateTimeAge($tstamp,$prefix=1,$date='')

function titleAttrib($content='',$hsc=0)

function titleAltAttrib($content)

function thumbCode($row,$table,$field,$backPath,$thumbScript='',$uploaddir=NULL,$abs=0,$tparams='',$size='')

function getThumbNail($thumbScript,$theFile,$tparams='',$size='')

function titleAttribForPages($row,$perms_clause='',$includeAttrib=1)

function getRecordIconAltText($row,$table='pages')

function getLabelFromItemlist($table,$col,$key)

function getItemLabel($table,$col,$printAllWrap='')

function getRecordTitle($table,$row,$prep=0)

function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0,$noRecordLookup=FALSE,$uid=0)

function getProcessedValueExtra($table,$fN,$fV,$fixed_lgd_chars=0,$uid=0)

function getFileIcon($ext)

function getCommonSelectFields($table,$prefix='')

function makeConfigForm($configArray,$defaults,$dataPrefix)

Backend Modules API functions

function helpTextIcon($table,$field,$BACK_PATH,$force=0)

function helpText($table,$field,$BACK_PATH,$styleAttrib='')

function cshItem($table,$field,$BACK_PATH,$wrap='',$onlyIconMode=FALSE, $styleAttrib='')

function editOnClick($params,$backPath='',$requestUri='')

function viewOnClick($id,$backPath='',$rootLine='',$anchor='',$altUrl='',$addGetVars='',$switchFocus=TRUE)

function getModTSconfig($id,$TSref)

function getFuncMenu($mainParams,$elementName,$currentValue,$menuItems,$script='',$addparams='')

function getFuncCheck($mainParams,$elementName,$currentValue,$script='',$addparams='',$tagParams='')

function getFuncInput($mainParams,$elementName,$currentValue,$size=10,$script="",$addparams="")

function unsetMenuItems($modTSconfig,$itemArray,$TSref)

function getSetUpdateSignal($set='')

function getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')

Core

function compilePreviewKeyword($getVarsStr, $beUserUid, $ttl=172800)

function lockRecords($table='',$uid=0,$pid=0)

function isRecordLocked($table,$uid)

function exec_foreign_table_where_query($fieldValue,$field='',$TSconfig=array(),$prefix='')

function getTCEFORM_TSconfig($table,$row)

function getTSconfig_pidValue($table,$uid,$pid)

function getPidForModTSconfig($table,$uid,$pid)

function getTSCpid($table,$uid,$pid)

function firstDomainRecord($rootLine)

function getDomainStartPage($domain, $path='')

function RTEsetup($RTEprop,$table,$field,$type='')

function &RTEgetObj()

function &softRefParserObj($spKey)

function explodeSoftRefParserList($parserList)

function isModuleSetInTBE_MODULES($modName)

function referenceCount($table,$ref,$msg='')

Workspaces / Versioning

function selectVersionsOfRecord($table, $uid, $fields='*', $workspace=0)

function fixVersioningPid($table,&$rr,$ignoreWorkspaceMatch=FALSE)

function workspaceOL($table,&$row,$wsid=-99)

function getWorkspaceVersionOfRecord($workspace, $table, $uid, $fields='*')

function getLiveVersionOfRecord($table,$uid,$fields='*')

function isPidInVersionizedBranch($pid, $table='',$returnStage=FALSE)

function versioningPlaceholderClause($table)

function countVersionsOfRecordsOnPage($workspace,$pageId, $allTables=FALSE)

function wsMapId($table,$uid)

Miscellaneous

function typo3PrintError($header,$text,$js='',$head=1)

function TYPO3_copyRightNotice()

function displayWarningMessages()

function getPathType_web_nonweb($path)

function ADMCMD_previewCmds($pageinfo)

function processParams($params)

function getListOfBackendModules($name,$perms_clause,$backPath='',$script='index.php')

class.t3lib_beuserauth.php

TYPO3 user authentication, backend
Could technically have been the same class as t3lib_userauthgroup since these two are always used together and only together.
t3lib_userauthgroup contains most of the functions used for checking permissions, authenticating users, setting up the user etc. This class is most interesting in terms of an API for user from outside.
This class contains the configuration of the database fields used plus some functions for the authentication process of backend users.

class t3lib_beUserAuth extends t3lib_userAuthGroup

@package: TYPO3

@subpackage: t3lib

function trackBeUser($flag)

function checkLockToIP()

function backendCheckLogin()

function checkCLIuser()

function backendSetUC()

function overrideUC()

function resetUC()

function emailAtLogin()

function veriCode()

class.t3lib_browsetree.php

Extension class for the t3lib_treeView class, specially made for browsing pages

class t3lib_browseTree extends t3lib_treeView

@package: TYPO3

@subpackage: t3lib

function init($clause='')

function getTitleAttrib($row)

function wrapIcon($icon,$row)

class.t3lib_clipboard.php

TYPO3 clipboard for records and files

class t3lib_clipboard

@package: TYPO3

@subpackage: t3lib

Initialize

function initializeClipboard()

function lockToNormal()

function setCmd($cmd)

function setCurrentPad($padIdent)

function endClipboard()

function cleanUpCBC($CBarr,$table,$removeDeselected=0)

Clipboard HTML renderings

function printClipboard()

function printContentFromTab($pad)

function padTitleWrap($str,$pad)

function linkItemText($str,$rec,$table='')

function selUrlDB($table,$uid,$copy=0,$deselect=0,$baseArray=array())

function selUrlFile($path,$copy=0,$deselect=0,$baseArray=array())

function pasteUrl($table,$uid,$setRedirect=1)

function deleteUrl($setRedirect=1,$file=0)

function editUrl()

function removeUrl($table,$uid)

function confirmMsg($table,$rec,$type,$clElements)

function clLabel($key,$Akey='labels')

function exportClipElementParameters()

Helper functions

function removeElement($el)

function saveClipboard()

function currentMode()

function cleanCurrent()

function elFromTable($matchTable='',$pad='')

function isSelected($table,$uid)

function getSelectedRecord($table='',$uid='')

function isElements()

FOR USE IN tce_db.php:

function makePasteCmdArray($ref,$CMD)

function makeDeleteCmdArray($CMD)

FOR USE IN tce_file.php:

function makePasteCmdArray_file($ref,$FILE)

function makeDeleteCmdArray_file($FILE)

class.t3lib_cs.php

Class for conversion between charsets

class t3lib_cs

@package: TYPO3

@subpackage: t3lib

function parse_charset($charset)

function get_locale_charset($locale)

Charset Conversion functions

function conv($str,$fromCS,$toCS,$useEntityForNoChar=0)

function convArray(&$array,$fromCS,$toCS,$useEntityForNoChar=0)

function utf8_encode($str,$charset)

function utf8_decode($str,$charset,$useEntityForNoChar=0)

function utf8_to_entities($str)

function entities_to_utf8($str,$alsoStdHtmlEnt=0)

function utf8_to_numberarray($str,$convEntities=0,$retChar=0)

function UnumberToChar($cbyte)

function utf8CharToUnumber($str,$hex=0)

Init functions

function initCharset($charset)

function initUnicodeData($mode=null)

function initCaseFolding($charset)

function initToASCII($charset)

String operation functions

function substr($charset,$string,$start,$len=null)

function strlen($charset,$string)

function crop($charset,$string,$len,$crop='')

function strtrunc($charset,$string,$len)

function conv_case($charset,$string,$case)

function specCharsToASCII($charset,$string)

Internal string operation functions

function sb_char_mapping($str,$charset,$mode,$opt='')

Internal UTF-8 string operation functions

function utf8_substr($str,$start,$len=null)

function utf8_strlen($str)

function utf8_strtrunc($str,$len)

function utf8_strpos($haystack,$needle,$offset=0)

function utf8_strrpos($haystack,$needle)

function utf8_char2byte_pos($str,$pos)

function utf8_byte2char_pos($str,$pos)

function utf8_char_mapping($str,$mode,$opt='')

Internal EUC string operation functions
Extended Unix Code:
ASCII compatible 7bit single bytes chars
8bit two byte chars
Shift-JIS is treated as a special case.

function euc_strtrunc($str,$len,$charset)

function euc_substr($str,$start,$charset,$len=null)

function euc_strlen($str,$charset)

function euc_char2byte_pos($str,$pos,$charset)

function euc_char_mapping($str,$charset,$mode,$opt='')

class.t3lib_db.php

TYPO3 "database wrapper" class (new in 3.6.0)
This class contains
- abstraction functions for executing INSERT/UPDATE/DELETE/SELECT queries ("Query execution"; These are REQUIRED for all future connectivity to the database, thus ensuring DBAL compliance!)
- functions for building SQL queries (INSERT/UPDATE/DELETE/SELECT) ("Query building"); These are transitional functions for building SQL queries in a more automated way. Use these to build queries instead of doing it manually in your code!
- mysql() wrapper functions; These are transitional functions. By a simple search/replace you should be able to substitute all mysql*() calls with $GLOBALS['TYPO3_DB']->sql*() and your application will work out of the box. YOU CANNOT (legally) use any mysql functions not found as wrapper functions in this class!
See the Project Coding Guidelines (doc_core_cgl) for more instructions on best-practise

This class is not in itself a complete database abstraction layer but can be extended to be a DBAL (by extensions, see "dbal" for example)
ALL connectivity to the database in TYPO3 must be done through this class!
The points of this class are:
- To direct all database calls through this class so it becomes possible to implement DBAL with extensions.
- To keep it very easy to use for developers used to MySQL in PHP - and preserve as much performance as possible when TYPO3 is used with MySQL directly...
- To create an interface for DBAL implemented by extensions; (Eg. making possible escaping characters, clob/blob handling, reserved words handling)
- Benchmarking the DB bottleneck queries will become much easier; Will make it easier to find optimization possibilities.

USE:
In all TYPO3 scripts the global variable $TYPO3_DB is an instance of this class. Use that.
Eg. $GLOBALS['TYPO3_DB']->sql_fetch_assoc()

class t3lib_DB

@package: TYPO3

@subpackage: t3lib

Query execution
These functions are the RECOMMENDED DBAL functions for use in your applications
Using these functions will allow the DBAL to use alternative ways of accessing data (contrary to if a query is returned!)
They compile a query AND execute it immediately and then return the result
This principle heightens our ability to create various forms of DBAL of the functions.
Generally: We want to return a result pointer/object, never queries.
Also, having the table name together with the actual query execution allows us to direct the request to other databases.

function exec_INSERTquery($table,$fields_values,$no_quote_fields=FALSE)

function exec_UPDATEquery($table,$where,$fields_values,$no_quote_fields=FALSE)

function exec_DELETEquery($table,$where)

function exec_SELECTquery($select_fields,$from_table,$where_clause,$groupBy='',$orderBy='',$limit='')

function exec_SELECT_mm_query($select,$local_table,$mm_table,$foreign_table,$whereClause='',$groupBy='',$orderBy='',$limit='')

function exec_SELECT_queryArray($queryParts)

function exec_SELECTgetRows($select_fields,$from_table,$where_clause,$groupBy='',$orderBy='',$limit='',$uidIndexField='')

Query building

function INSERTquery($table,$fields_values,$no_quote_fields=FALSE)

function UPDATEquery($table,$where,$fields_values,$no_quote_fields=FALSE)

function DELETEquery($table,$where)

function SELECTquery($select_fields,$from_table,$where_clause,$groupBy='',$orderBy='',$limit='')

function listQuery($field, $value, $table)

function searchQuery($searchWords,$fields,$table)

Various helper functions
Functions recommended to be used for
- escaping values,
- cleaning lists of values,
- stripping of excess ORDER BY/GROUP BY keywords

function fullQuoteStr($str, $table)

function fullQuoteArray($arr, $table, $noQuote=FALSE)

function quoteStr($str, $table)

function escapeStrForLike($str, $table)

function cleanIntArray($arr)

function cleanIntList($list)

function stripOrderBy($str)

function stripGroupBy($str)

function splitGroupOrderLimit($str)

MySQL wrapper functions
(For use in your applications)

function sql($db,$query)

function sql_query($query)

function sql_error()

function sql_num_rows($res)

function sql_fetch_assoc($res)

function sql_fetch_row($res)

function sql_free_result($res)

function sql_insert_id()

function sql_affected_rows()

function sql_data_seek($res,$seek)

function sql_field_type($res,$pointer)

function sql_pconnect($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password)

function sql_select_db($TYPO3_db)

SQL admin functions
(For use in the Install Tool and Extension Manager)

function admin_get_dbs()

function admin_get_tables()

function admin_get_fields($tableName)

function admin_get_keys($tableName)

function admin_query($query)

Connecting service

function connectDB()

Debugging

function debug($func)

class.t3lib_diff.php

This class has functions which generates a difference output of a content string

class t3lib_diff

@package: TYPO3

@subpackage: t3lib

function makeDiffDisplay($str1,$str2,$wrapTag='span')

function getDiff($str1,$str2)

function addClearBuffer($clearBuffer,$last=0)

function explodeStringIntoWords($str)

function tagSpace($str,$rev=0)

class.t3lib_div.php

The legendary "t3lib_div" class - Miscellaneous functions for general purpose.
Most of the functions does not relate specifically to TYPO3
However a section of functions requires certain TYPO3 features available
See comments in the source.
You are encouraged to use this library in your own scripts!

USE:
The class is intended to be used without creating an instance of it.
So: Don't instantiate - call functions with "t3lib_div::" prefixed the function name.
So use t3lib_div::[method-name] to refer to the functions, eg. 't3lib_div::milliseconds()'

class t3lib_div

@package: TYPO3

@subpackage: t3lib

GET/POST Variables
Background:
Input GET/POST variables in PHP may have their quotes escaped with "\" or not depending on configuration.
TYPO3 has always converted quotes to BE escaped if the configuration told that they would not be so.
But the clean solution is that quotes are never escaped and that is what the functions below offers.
Eventually TYPO3 should provide this in the global space as well.
In the transitional phase (or forever..?) we need to encourage EVERY to read and write GET/POST vars through the API functions below.

function _GP($var)

function _GET($var=NULL)

function _POST($var=NULL)

function _GETset($inputGet,$key='')

function GPvar($var,$strip=0)

function GParrayMerged($var)

IMAGE FUNCTIONS

function gif_compress($theFile, $type)

function png_to_gif_by_imagemagick($theFile)

function read_png_gif($theFile,$output_png=0)

STRING FUNCTIONS

function fixed_lgd($string,$origChars,$preStr='...')

function fixed_lgd_pre($string,$chars)

function fixed_lgd_cs($string,$chars)

function breakTextForEmail($str,$implChar="\n",$charWidth=76)

function breakLinesForEmail($str,$implChar="\n",$charWidth=76)

function cmpIP($baseIP, $list)

function cmpIPv4($baseIP, $list)

function cmpIPv6($baseIP, $list)

function IPv6Hex2Bin ($hex)

function normalizeIPv6($address)

function validIPv6($ip)

function cmpFQDN($baseIP, $list)

function inList($list,$item)

function rmFromList($element,$list)

function expandList($list)

function intInRange($theInt,$min,$max=2000000000,$zeroValue=0)

function intval_positive($theInt)

function int_from_ver($verNumberStr)

function compat_version($verNumberStr)

function md5int($str)

function shortMD5($input, $len=10)

function uniqueList($in_list, $secondParameter=NULL)

function split_fileref($fileref)

function dirname($path)

function modifyHTMLColor($color,$R,$G,$B)

function modifyHTMLColorAll($color,$all)

function rm_endcomma($string)

function danish_strtoupper($string)

function convUmlauts($str)

function testInt($var)

function isFirstPartOfStr($str,$partStr)

function formatSize($sizeInBytes,$labels='')

function convertMicrotime($microtime)

function splitCalc($string,$operators)

function calcPriority($string)

function calcParenthesis($string)

function htmlspecialchars_decode($value)

function deHSCentities($str)

function slashJS($string,$extended=0,$char="'")

function rawUrlEncodeJS($str)

function rawUrlEncodeFP($str)

function validEmail($email)

function formatForTextarea($content)

ARRAY FUNCTIONS

function inArray($in_array,$item)

function intExplode($delim, $string)

function revExplode($delim, $string, $count=0)

function trimExplode($delim, $string, $onlyNonEmptyValues=0)

function uniqueArray($valueArray)

function removeArrayEntryByValue($array,$cmpValue)

function implodeArrayForUrl($name,$theArray,$str='',$skipBlank=0,$rawurlencodeParamName=0)

function explodeUrl2Array($string,$multidim=FALSE)

function compileSelectedGetVarsFromArray($varList,$getArray,$GPvarAlt=1)

function addSlashesOnArray(&$theArray)

function stripSlashesOnArray(&$theArray)

function slashArray($arr,$cmd)

function array_merge_recursive_overrule($arr0,$arr1,$notAddKeys=0,$includeEmtpyValues=true)

function array_merge($arr1,$arr2)

function csvValues($row,$delim=',',$quote='"')

HTML/XML PROCESSING

function get_tag_attributes($tag)

function split_tag_attributes($tag)

function implodeAttributes($arr,$xhtmlSafe=FALSE,$dontOmitBlankAttribs=FALSE)

function implodeParams($arr,$xhtmlSafe=FALSE,$dontOmitBlankAttribs=FALSE)

function wrapJS($string, $linebreak=TRUE)

function xml2tree($string,$depth=999)

function array2xml($array,$NSprefix='',$level=0,$docTag='phparray',$spaceInd=0, $options=array(),$stackData=array())

function xml2array($string,$NSprefix='',$reportDocTag=FALSE)

function xmlRecompileFromStructValArray($vals)

function xmlGetHeaderAttribs($xmlData)

FILES FUNCTIONS

function getURL($url, $includeHeader=0)

function writeFile($file,$content)

function fixPermissions($file)

function writeFileToTypo3tempDir($filepath,$content)

function mkdir($theNewFolder)

function mkdir_deep($destination,$deepDir)

function get_dirs($path)

function getFilesInDir($path,$extensionList='',$prependPath=0,$order='')

function getAllFilesAndFoldersInPath($fileArr,$path,$extList='',$regDirs=0,$recursivityLevels=99)

function removePrefixPathFromList($fileArr,$prefixToRemove)

function fixWindowsFilePath($theFile)

function resolveBackPath($pathStr)

function locationHeaderUrl($path)

DEBUG helper FUNCTIONS

function debug_ordvalue($string,$characters=100)

function view_array($array_in)

function print_array($array_in)

function debug($var="",$brOrHeader=0)

function debug_trail()

function debugRows($rows,$header='')

SYSTEM INFORMATION

function getThisUrl()

function linkThisScript($getParams=array())

function linkThisUrl($url,$getParams=array())

function getIndpEnv($getEnvName)

function milliseconds()

function clientInfo($useragent='')

TYPO3 SPECIFIC FUNCTIONS

function getFileAbsFileName($filename,$onlyRelative=1,$relToTYPO3_mainDir=0)

function validPathStr($theFile)

@todo: Possible improvement: Should it rawurldecode the string first to check if any of these characters is encoded ?

function isAbsPath($path)

function isAllowedAbsPath($path)

function verifyFilenameAgainstDenyPattern($filename)

function upload_copy_move($source,$destination)

function upload_to_tempfile($uploadedFileName)

function unlink_tempfile($uploadedTempFileName)

function tempnam($filePrefix)

function stdAuthCode($uid_or_record,$fields='',$codeLength=8)

function cHashParams($addQueryParams)

function hideIfNotTranslated($l18n_cfg_fieldValue)

function readLLfile($fileRef,$langKey)

function readLLXMLfile($fileRef,$langKey)

function llXmlAutoFileName($fileRef,$language)

function loadTCA($table)

function resolveSheetDefInDS($dataStructArray,$sheet='sDEF')

function resolveAllSheetsInDS($dataStructArray)

function callUserFunction($funcName,&$params,&$ref,$checkPrefix='user_',$silent=0)

function &getUserObj($classRef,$checkPrefix='user_',$silent=0)

function &makeInstance($className)

function makeInstanceClassName($className)

function &makeInstanceService($serviceType, $serviceSubType='', $excludeServiceKeys=array())

function plainMailEncoded($email,$subject,$message,$headers='',$enc='',$charset='',$dontEncodeHeader=false)

function quoted_printable($string,$maxlen=76)

function encodeHeader($line,$enc='',$charset='ISO-8859-1')

function substUrlsInPlainText($message,$urlmode='76',$index_script_url='')

function makeRedirectUrl($inUrl,$l=0,$index_script_url='')

function freetypeDpiComp($font_size)

function initSysLog()

function sysLog($msg, $extKey, $severity=0)

function devLog($msg, $extKey, $severity=0, $dataVar=FALSE)

function arrayToLogString($arr, $valueList=array(), $valueLength=20)

function imageMagickCommand($command, $parameters, $path='')

function unQuoteFilenames($parameters,$unQuote=FALSE)

function quoteJSvalue($value, $inScriptTags = false)

class.t3lib_exec.php

returns exec command for a program
or false

This class is meant to be used without instance:
$cmd = t3lib_exec::getCommand ('awstats','perl');

The data of this class is hold in a global variable. Doing it this way the setup is cached.
That means if a program is found once it don't have to be searched again.

user functions:

addPaths() could be used to extend the search paths
getCommand() get a command string
checkCommand() returns true if a command is available

Search paths that are included:
$TYPO3_CONF_VARS['GFX']['im_path_lzw'] or $TYPO3_CONF_VARS['GFX']['im_path']
$TYPO3_CONF_VARS['SYS']['binPath']
$GLOBALS['_SERVER']['PATH']
'/usr/bin/,/usr/local/bin/' on Unix

binaries can be preconfigured with
$TYPO3_CONF_VARS['SYS']['binSetup']

class t3lib_exec

@package: TYPO3

@subpackage: t3lib

function checkCommand($cmd, $handler='')

function getCommand($cmd, $handler='', $handlerOpt='')

function addPaths($paths)

function getPaths($addInvalid=false)

function _init()

function _initPaths($paths='')

function _getConfiguredApps()

function _getPaths()

function _fixPath($path)

class.t3lib_extfilefunc.php

Contains functions for performing file operations like copying, pasting, uploading, moving, deleting etc. through the TCE
Extending class to class t3lib_basicFileFunctions.

see basicFileFunctions
see document "TYPO3 Core API" for syntax

This class contains functions primarily used by tce_file.php (TYPO3 Core Engine for file manipulation)
Functions include copying, moving, deleting, uploading and so on...

Important internal variables:

$filemounts (see basicFileFunctions)
$f_ext (see basicFileFunctions)
... All fileoperations must be within the filemount-paths. Further the fileextension MUST validate true with the f_ext array

The unzip-function allows unzip only if the destination path has it's f_ext[]['allow'] set to '*'!!
You are allowed to copy/move folders within the same 'space' (web/ftp).
You are allowed to copy/move folders between spaces (web/ftp) IF the destination has it's f_ext[]['allow'] set to '*'!

Advice:
You should always exclude php-files from the webspace. This will keep people from uploading, copy/moving and renaming files to the php3/php-extension.
You should never mount a ftp_space 'below' the webspace so that it reaches into the webspace. This is because if somebody unzips a zip-file in the ftp-space so that it reaches out into the webspace this will be a violation of the safety
For example this is a bad idea: you have an ftp-space that is '/www/' and a web-space that is '/www/htdocs/'

class t3lib_extFileFunctions extends t3lib_basicFileFunctions

@package: TYPO3

@subpackage: t3lib

function start($fileCmds)

function init_actionPerms($setup)

function processData()

function printLogErrorMessages($redirect='')

function findRecycler($theFile)

function writeLog($action,$error,$details_nr,$details,$data)

File operation functions

function func_delete($cmds)

function func_copy($cmds)

function func_move($cmds)

function func_rename($cmds)

function func_newfolder($cmds)

function func_newfile($cmds)

function func_edit($cmds)

function func_upload($cmds)

function func_unzip($cmds)

class.t3lib_extmgm.php

Extension Management functions

This class is never instantiated, rather the methods inside is called as functions like
t3lib_extMgm::isLoaded('my_extension');

class t3lib_extMgm

@package: TYPO3

@subpackage: t3lib

PATHS and other evaluation

function isLoaded($key,$exitOnError=0)

function extPath($key,$script='')

function extRelPath($key)

function siteRelPath($key)

function getCN($key)

Adding BACKEND features
(related to core features)

function addTCAcolumns($table,$columnArray,$addTofeInterface=0)

function addToAllTCAtypes($table,$str,$specificTypesList='',$position='')

function allowTableOnStandardPages($table)

function addModule($main,$sub='',$position='',$path='')

function insertModuleFunction($modname,$className,$classPath,$title,$MM_key='function',$WS='')

function addPageTSConfig($content)

function addUserTSConfig($content)

function addLLrefForTCAdescr($tca_descr_key,$file_ref)

Adding SERVICES features

function addService($extKey, $serviceType, $serviceKey, $info)

function findService($serviceType, $serviceSubType='', $excludeServiceKeys=array())

function deactivateService($serviceType, $serviceKey)

Adding FRONTEND features
(related specifically to "cms" extension)

function addPlugin($itemArray,$type='list_type')

function addPiFlexFormValue($piKeyToMatch,$value)

function addToInsertRecords($table,$content_table='tt_content',$content_field='records')

function addPItoST43($key,$classFile='',$prefix='',$type='list_type',$cached=0)

function addStaticFile($extKey,$path,$title)

function addTypoScriptSetup($content)

function addTypoScriptConstants($content)

function addTypoScript($key,$type,$content,$afterStaticUid=0)

INTERNAL EXTENSION MANAGEMENT:

function typo3_loadExtensions()

function _makeIncludeHeader($key,$file)

function isCacheFilesAvailable($cacheFilePrefix)

function isLocalconfWritable()

function cannotCacheFilesWritable($cacheFilePrefix)

function currentCacheFiles()

function writeCacheFiles($extensions,$cacheFilePrefix)

function removeCacheFiles()

class.t3lib_extobjbase.php

Parent class for 'Extension Objects' in backend modules.
Used for 'submodules' to other modules. Also called 'Function menu modules' in t3lib_extMgm. And now its even called 'Extension Objects'. Or 'Module functions'. Wish we had just one name. Or a name at all...(?) Thank God its not so advanced when it works...
In other words this class is used for backend modules which is not true backend modules appearing in the menu but rather adds themselves as a new entry in the function menu which typically exists for a backend module (like Web>Functions, Web>Info or Tools etc...)
The magic that binds this together is stored in the global variable $TBE_MODULES_EXT where extensions wanting to connect a module based on this class to an existing backend module store configuration which consists of the classname, script-path and a label (title/name)
For more information about this, please see the large example comment for the class t3lib_SCbase. This will show the principle of a 'level-1' connection.
The more advanced example - having two layers as it is done by the 'func_wizards' extension with the 'web_info' module - can be seen in the comment above.

class t3lib_extobjbase

@package: TYPO3

@subpackage: t3lib

function init(&$pObj,$conf)

function handleExternalFunctionValue()

function incLocalLang()

function checkExtObj()

function extObjContent()

function modMenu()

class.t3lib_flexformtools.php

Contains functions for manipulating flex form data

class t3lib_flexformtools

@package: TYPO3

@subpackage: t3lib

function traverseFlexFormXMLData($table,$field,$row,&$callBackObj,$callBackMethod_value)

function traverseFlexFormXMLData_recurse($dataStruct,$editData,&$PA,$path='')

function getAvailableLanguages()

Processing functions

function cleanFlexFormXML($table,$field,$row)

function cleanFlexFormXML_callBackFunction($dsArr, $data, $PA, $path, &$pObj)

Multi purpose functions

function &getArrayValueByPath($pathArray,&$array)

function setArrayValueByPath($pathArray,&$array,$value)

function flexArray2Xml($array, $addPrologue=FALSE)

class.t3lib_foldertree.php

Extension class for the t3lib_treeView class, specially made for browsing folders in the File module

class t3lib_folderTree extends t3lib_treeView

@package: TYPO3

@subpackage: t3lib

function t3lib_folderTree()

function wrapIcon($icon,$row)

function wrapTitle($title,$row,$bank=0)

function getId($v)

function getJumpToParam($v)

function getTitleStr($row,$titleLen=30)

function getBrowsableTree()

function getFolderTree($files_path, $depth=999, $depthData='')

function getCount($files_path)

function initializePositionSaving()

class.t3lib_formmail.php

Formmail class, used by the TYPO3 "cms" extension (default frontend) to send email forms.

class t3lib_formmail extends t3lib_htmlmail

@package: TYPO3

@subpackage: t3lib

function start($V,$base64=false)

function addAttachment($file, $filename)

class.t3lib_fullsearch.php

Class used in module tools/dbint (advanced search) and which may hold code specific for that module
However the class has a general principle in it which may be used in the web/export module.

class t3lib_fullsearch

@package: TYPO3

@subpackage: t3lib

function form()

function makeStoreControl()

function initStoreArray()

function cleanStoreQueryConfigs($storeQueryConfigs,$storeArray)

function addToStoreQueryConfigs($storeQueryConfigs,$index)

function saveQueryInAction($uid)

function loadStoreQueryConfigs($storeQueryConfigs,$storeIndex,$writeArray)

function procesStoreControl()

function queryMaker()

function getQueryResultCode($mQ,$res,$table)

function csvValues($row, $delim=',', $quote='"', $conf=array(), $table='')

function tableWrap($str)

function search()

function resultRowDisplay($row,$conf,$table)

function getProcessedValueExtra($table, $fN, $fV, $conf, $splitString)

function getTreeList($id, $depth, $begin = 0, $perms_clause)

function makeValueList($fN, $fV, $conf, $table, $splitString)

function resultRowTitles($row,$conf,$table)

function csvRowTitles($row, $conf, $table)

class.t3lib_htmlmail.php

HTML mail class

class t3lib_htmlmail

@package: TYPO3

@subpackage: t3lib

function t3lib_htmlmail ()

function start ()

function useQuotedPrintable()

function useBase64()

function use8Bit()

function encodeMsg($content)

function addPlain ($content)

function addAttachment($file)

function addHTML ($file)

function extractHtmlInit($html,$url)

function send($recipient)

Main functions

function setHeaders()

function setRecipient ($recip)

function getHTMLContentType()

function setContent()

function constructMixed ($boundary)

function constructHTML ($boundary)

function constructAlternative($boundary)

function constructHTML_media ($boundary)

function sendTheMail ()

function getBoundary()

function setPlain ($content)

function setHtml ($content)

function add_header($header)

function add_message($string)

function getContent($type)

function preview()

Functions for acquiring attachments, HTML, analyzing and so on **

function fetchHTML($file)

function fetchHTMLMedia()

function extractMediaLinks()

function extractHyperLinks()

function extractFramesInfo()

function substMediaNamesInHTML($absolute)

function substHREFsInHTML()

function substHTTPurlsInPlainText($content)

function fixRollOvers()

File and URL-functions

function makeBase64($inputstr)

function getExtendedURL($url)

function addUserPass($url)

function getURL($url)

function getStrippedURL($url)

function getMimeType($url)

function absRef($ref)

function split_fileref($fileref)

function extParseUrl($path)

function tag_regex($tagArray)

function get_tag_attributes($tag)

function quoted_printable($string)

function convertName($name)

class.t3lib_iconworks.php

Icon generation, backend
This library has functions that returns - and if necessary creates - the icon for an element in TYPO3

Expects global vars:
- $BACK_PATH
- PATH_typo3
- $TCA, $PAGES_TYPES


Notes:
These functions are strongly related to the interface of TYPO3.
The class is included in eg. init.php
ALL functions called without making a class instance, eg. "t3lib_iconWorks::getIconImage()"

class t3lib_iconWorks

@package: TYPO3

@subpackage: t3lib

function getIconImage($table,$row=array(),$backPath,$params='',$shaded=FALSE)

function getIcon($table,$row=array(),$shaded=FALSE)

function skinImg($backPath,$src,$wHattribs='',$outputMode=0)

Other functions

function makeIcon($iconfile,$mode, $user, $protectSection,$absFile,$iconFileName_stateTagged)

function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h)

function imagecreatefrom($file)

function imagemake($im, $path)

class.t3lib_install.php

Class to setup values in localconf.php and verify the TYPO3 DB tables/fields

class t3lib_install

@package: TYPO3

@subpackage: t3lib

function t3lib_install()

Writing to localconf.php

function setValueInLocalconfFile(&$line_array, $variable, $value)

function writeToLocalconf_control($inlines='',$absFullPath='')

function checkForBadString($string)

function slashValueForSingleDashes($value)

SQL

function getFieldDefinitions_sqlContent($sqlContent)

function getFieldDefinitions_sqlContent_parseTypes(&$total)

function getFieldDefinitions_database()

function getDatabaseExtra($FDsrc, $FDcomp, $onlyTableList='')

function getUpdateSuggestions($diffArr,$keyList='extra,diff')

function assembleFieldDefinition($row)

function getStatementArray($sqlcode,$removeNonSQL=0,$query_regex='')

function getCreateTables($statements, $insertCountFlag=0)

function getTableInsertStatements($statements, $table)

function performUpdateQueries($arr,$keyArr)

function getListOfTables()

function generateUpdateDatabaseForm_checkboxes($arr,$label,$checked=1,$iconDis=0,$currentValue=array(),$cVfullMsg=0)

class.t3lib_loaddbgroup.php

Load database groups (relations)
Used to process the relations created by the TCA element types "group" and "select" for database records. Manages MM-relations as well.

class t3lib_loadDBGroup

@package: TYPO3

@subpackage: t3lib

function start($itemlist,$tablelist, $MMtable='',$MMuid=0)

function readList($itemlist)

function readMM($tableName,$uid)

function writeMM($tableName,$uid,$prependTableName=0)

function getValueArray($prependTableName='')

function convertPosNeg($valueArray,$fTable,$nfTable)

function getFromDB()

function readyForInterface()

class.t3lib_loadmodules.php

Load Backend Interface modules

Typically instantiated like this:
$this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
$this->loadModules->load($TBE_MODULES);

class t3lib_loadModules

@package: TYPO3

@subpackage: t3lib

function load($modulesArray,$BE_USER='')

function checkExtensionModule($name)

function checkMod($name, $fullpath)

function checkModAccess($name,$MCONF)

function checkModWorkspace($name,$MCONF)

function parseModulesArray($arr)

function cleanName ($str)

function getRelativePath($baseDir,$destDir)

class.t3lib_matchcondition.php

Matching TypoScript conditions

Used with the TypoScript parser.
Matches browserinfo, IPnumbers for use with templates

class t3lib_matchCondition

@package: TYPO3

@subpackage: t3lib

function __construct()

function t3lib_matchCondition()

function match($condition_line)

function evalConditionStr($string)

function testNumber($test,$value)

function matchWild($haystack,$needle)

function whichDevice($useragent)

function browserInfo($useragent)

function browserInfo_version($tmp)

function getGlobal($var, $source=NULL)

function getGP_ENV_TSFE($var)

class.t3lib_modsettings.php

Manage storing and restoring of $GLOBALS['SOBE']->MOD_SETTINGS settings.
Provides a presets box for BE modules.

class t3lib_modSettings

@package: TYPO3

@subpackage: t3lib

Init / setup

function init($prefix='', $storeList='')

function setSessionType($type='ses')

Store list - which values should be stored

function setStoreList($storeList)

function addToStoreList($storeList)

function addToStoreListFromPrefix($prefix='')

Process storage array

function initStorage()

function cleanupStorageArray($storedSettings)

function compileEntry($data)

function getStoredData($storeIndex, $writeArray=array())

function processStoreControl($mconfName='')

function writeStoredSetting($writeArray=array(), $mconfName='')

GUI

function getStoreControl($showElements='load,remove,save', $useOwnForm=TRUE)

Misc

function processEntry($storageArr)

class.t3lib_page.php

Page functions, a lot of sql/pages-related functions
Mainly used in the frontend but also in some cases in the backend.
It's important to set the right $where_hid_del in the object so that the functions operate properly

class t3lib_pageSelect

@package: TYPO3

@subpackage: t3lib

function init($show_hidden)

Selecting page records

function getPage($uid, $disableGroupAccessCheck=FALSE)

function getPage_noCheck($uid)

function getFirstWebPage($uid)

function getPageIdFromAlias($alias)

function getPageOverlay($pageInput,$lUid=-1)

function getRecordOverlay($table,$row,$sys_language_content,$OLmode='')

Page related: Menu, Domain record, Root line

function getMenu($uid,$fields='*',$sortField='sorting',$addWhere='',$checkShortcuts=1)

function getDomainStartPage($domain, $path='',$request_uri='')

function getRootLine($uid, $MP='', $ignoreMPerrors=FALSE)

function getPathFromRootline($rl,$len=20)

function getExtURL($pagerow,$disable=0)

function getMountPointInfo($pageId, $pageRec=FALSE, $prevMountPids=array(), $firstPageUid=0)

Selecting records in general

function checkRecord($table,$uid,$checkPage=0)

function getRawRecord($table,$uid,$fields='*',$noWSOL=FALSE)

function getRecordsByField($theTable,$theField,$theValue,$whereClause='',$groupBy='',$orderBy='',$limit='')

Caching and standard clauses

function getHash($hash,$expTime=0)

function storeHash($hash,$data,$ident)

function deleteClause($table)

function enableFields($table,$show_hidden=-1,$ignore_array=array(),$noVersionPreview=FALSE)

function getMultipleGroupsWhereClause($field, $table)

Versioning Preview

function fixVersioningPid($table,&$rr)

function versionOL($table,&$row)

function getWorkspaceVersionOfRecord($workspace, $table, $uid, $fields='*')

class.t3lib_pagetree.php

Class for generating a page tree.

class t3lib_pageTree extends t3lib_treeView

@package: TYPO3

@subpackage: t3lib

function init($clause='')

function expandNext($id)

function PMicon($row,$a,$c,$nextCount,$exp)

function initializePositionSaving()

class.t3lib_parsehtml.php

Functions for parsing HTML.
You are encouraged to use this class in your own applications

class t3lib_parsehtml

@package: TYPO3

@subpackage: t3lib

function getSubpart($content, $marker)

function substituteSubpart($content,$marker,$subpartContent,$recursive=1,$keepMarker=0)

Parsing HTML code

function splitIntoBlock($tag,$content,$eliminateExtraEndTags=0)

function splitIntoBlockRecursiveProc($tag,$content,&$procObj,$callBackContent,$callBackTags,$level=0)

function splitTags($tag,$content)

function getAllParts($parts,$tag_parts=1,$include_tag=1)

function removeFirstAndLastTag($str)

function getFirstTag($str)

function getFirstTagName($str,$preserveCase=FALSE)

function get_tag_attributes($tag,$deHSC=0)

function split_tag_attributes($tag)

function checkTagTypeCounts($content,$blockTags='a,b,blockquote,body,div,em,font,form,h1,h2,h3,h4,h5,h6,i,li,map,ol,option,p,pre,select,span,strong,table,td,textarea,tr,u,ul', $soloTags='br,hr,img,input,area')

Clean HTML code

function HTMLcleaner($content, $tags=array(),$keepAll=0,$hSC=0,$addConfig=array())

function bidir_htmlspecialchars($value,$dir)

function prefixResourcePath($main_prefix,$content,$alternatives=array(),$suffix='')

function prefixRelPath($prefix,$srcVal,$suffix='')

function cleanFontTags($value,$keepFace=0,$keepSize=0,$keepColor=0)

function mapTags($value,$tags=array(),$ltChar='<',$ltChar2='<')

function unprotectTags($content,$tagList='')

function stripTagsExcept($value,$tagList)

function caseShift($str,$flag,$cacheKey='')

function compileTagAttribs($tagAttrib,$meta=array(), $xhtmlClean=0)

function get_tag_attributes_classic($tag,$deHSC=0)

function indentLines($content, $number=1, $indentChar="\t")

function HTMLparserConfig($TSconfig,$keepTags=array())

function XHTML_clean($content)

function processTag($value,$conf,$endTag,$protected=0)

function processContent($value,$dir,$conf)

class.t3lib_parsehtml_proc.php

Class for parsing HTML for the Rich Text Editor. (also called transformations)

class t3lib_parsehtml_proc extends t3lib_parsehtml

@package: TYPO3

@subpackage: t3lib

function init($elRef='',$recPid=0)

function setRelPath($path)

function evalWriteFile($pArr,$currentRecord)

Main function

function RTE_transform($value,$specConf,$direction='rte',$thisConfig=array())

Specific RTE TRANSFORMATION functions

function TS_images_db($value)

function TS_images_rte($value)

function TS_reglinks($value,$direction)

function TS_links_db($value)

function TS_links_rte($value)

function TS_preserve_db($value)

function TS_preserve_rte($value)

function TS_transform_db($value,$css=FALSE)

function transformStyledATags($value)

function TS_transform_rte($value,$css=0)

function TS_strip_db($value)

Generic RTE transformation, analysis and helper functions

function getURL($url)

function HTMLcleaner_db($content,$tagList='')

function getKeepTags($direction='rte',$tagList='')

function divideIntoLines($value,$count=5,$returnArray=FALSE)

function setDivTags($value,$dT='p')

function internalizeFontTags($value)

function siteUrl()

function rteImageStorageDir()

function removeTables($value,$breakChar='<br />')

function defaultTStagMapping($code,$direction='rte')

function getWHFromAttribs($attribArray)

function urlInfoForLinkTags($url)

function TS_AtagToAbs($value,$dontSetRTEKEEP=FALSE)

class.t3lib_positionmap.php

Position map class - generating a page tree / content element list which links for inserting (copy/move) of records.
Used for pages / tt_content element wizards of various kinds.

class t3lib_positionMap

@package: TYPO3

@subpackage: t3lib

Page position map:

function positionTree($id,$pageinfo,$perms_clause,$R_URI)

function JSimgFunc($prefix='')

function boldTitle($t_code,$dat,$id)

function onClickEvent($pid,$newPagePID)

function insertlabel()

function linkPageTitle($str,$rec)

function checkNewPageInPid($pid)

function getModConfig($pid)

function insertQuadLines($codes,$allBlank=0)

Content element positioning:

function printContentElementColumns($pid,$moveUid,$colPosList,$showHidden,$R_URI)

function printRecordMap($lines,$colPosArray)

function wrapColumnHeader($str,$vv)

function insertPositionIcon($row,$vv,$kk,$moveUid,$pid)

function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0)

function wrapRecordHeader($str,$row)

function getRecordHeader($row)

function wrapRecordTitle($str,$row)

class.t3lib_querygenerator.php

Class for generating front end for building queries

class t3lib_queryGenerator

@package: TYPO3

@subpackage: t3lib

function makeFieldList()

function init($name,$table,$fieldList='')

function setAndCleanUpExternalLists($name,$list,$force='')

function procesData($qC='')

function cleanUpQueryConfig($queryConfig)

function getFormElements($subLevel=0,$queryConfig='',$parent='')

function makeOptionList($fN, $conf, $table)

function printCodeArray($codeArr,$l=0)

function formatQ($str)

function mkOperatorSelect($name,$op,$draw,$submit)

function mkTypeSelect($name,$fieldName,$prepend='FIELD_')

function verifyType($fieldName)

function verifyComparison($comparison,$neg)

function mkFieldToInputSelect($name,$fieldName)

function mkTableSelect($name,$cur)

function mkCompSelect($name,$comparison,$neg)

function getSubscript($arr)

function initUserDef()

function userDef()

function userDefCleanUp($queryConfig)

function getQuery ($queryConfig,$pad='')

function getQuerySingle($conf,$first)

function cleanInputVal($conf,$suffix='')

function getUserDefQuery ($qcArr)

function updateIcon()

function getLabelCol()

function makeSelectorTable($modSettings,$enableList='table,fields,query,group,order,limit')

function getTreeList($id, $depth, $begin=0, $perms_clause)

function getSelectQuery($qString = '', $fN = '')

function JSbottom($formname='forms[0]')

function typo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue)

function typo3FormFieldGet(theField, evallist, is_in, checkbox, checkboxValue, checkbox_off)

class.t3lib_readmail.php

Functions used to read email content
The class is still just a bunch of miscellaneous functions used to read content out of emails

class t3lib_readmail

@package: TYPO3

@subpackage: t3lib

General

function getMessage($mailParts)

function getTextContent($content)

function getMailBoundaryParts($boundary,$content)

function getCType($str)

function analyseReturnError($c)

function decodeHeaderString($str)

function extractNameEmail($str)

function getContentTypeData($contentTypeStr)

function makeUnixDate($dateStr)

function getGMToffset($GMT)

function extractMailHeader($content,$limit=0)

function fullParse($content)

class.t3lib_recordlist.php

This class is the base for listing of database records and files in the modules Web>List and File>Filelist

class t3lib_recordList

@package: TYPO3

@subpackage: t3lib

function addElement($h,$icon,$data,$tdParams='',$lMargin='',$altLine='')

function writeTop()

function writeBottom()

function fwd_rwd_nav($table='')

function fwd_rwd_HTML($type,$pointer,$table='')

function listURL($altId='')

function CBfunctions()

function initializeLanguages()

function languageFlag($sys_language_uid)

class.t3lib_refindex.php

Reference index processing and relation extraction

class t3lib_refindex

@package: TYPO3

@subpackage: t3lib

function updateRefIndexTable($table,$uid,$testOnly=FALSE)

function generateRefIndexData($table,$uid)

function createEntryData($table,$uid,$field,$flexpointer,$deleted,$ref_table,$ref_uid,$ref_string='',$sort=-1,$softref_key='',$softref_id='')

function createEntryData_dbRels($table,$uid,$fieldname,$flexpointer,$deleted,$items)

function createEntryData_fileRels($table,$uid,$fieldname,$flexpointer,$deleted,$items)

function createEntryData_softreferences($table,$uid,$fieldname,$flexpointer,$deleted,$keys)

Get relations from table row

function getRelations($table,$row)

function getRelations_flexFormCallBack($dsArr, $dataValue, $PA, $structurePath, &$pObj)

function getRelations_procFiles($value, $conf, $uid)

function getRelations_procDB($value, $conf, $uid)

Helper functions

function isReferenceField($conf)

function destPathFromUploadFolder($folder)

function error($msg)

function updateIndex($testOnly,$cli_echo=FALSE)

class.t3lib_rteapi.php

RTE base class: Delivers browser-detection, TCEforms binding and transformation routines for the "rte" extension, registering it with the RTE API in TYPO3 3.6.0
See "rte" extension for usage.

class t3lib_rteapi

@package: TYPO3

@subpackage: t3lib

Main API functions;
When you create alternative RTEs, simply override these functions in your parent class.
See the "rte" or "rtehtmlarea" extension as an example!

function isAvailable()

function drawRTE(&$pObj,$table,$field,$row,$PA,$specConf,$thisConfig,$RTEtypeVal,$RTErelPath,$thePidValue)

function transformContent($dirRTE,$value,$table,$field,$row,$specConf,$thisConfig,$RTErelPath,$pid)

Helper functions

function triggerField($fieldName)

class.t3lib_scbase.php

Parent class for 'ScriptClasses' in backend modules.
See example comment above.

class t3lib_SCbase

@package: TYPO3

@subpackage: t3lib

function init()

function menuConfig()

function mergeExternalItems($modName,$menuKey,$menuArr)

function handleExternalFunctionValue($MM_key='function', $MS_value=NULL)

function getExternalItemConfig($modName,$menuKey,$value='')

function checkExtObj()

function checkSubExtObj()

function extObjHeader()

function extObjContent()

class.t3lib_softrefproc.php

Class for processing of the default soft reference types for CMS:

- 'substitute' : A full field value targeted for manual substitution (for import /export features)
- 'notify' : Just report if a value is found, nothing more.
- 'images' : HTML <img> tags for RTE images / images from fileadmin/
- 'typolink' : references to page id or file, possibly with anchor/target, possibly commaseparated list.
- 'typolink_tag' : As typolink, but searching for <link> tag to encapsulate it.
- 'TSconfig' processing (filerefs? Domains? what do we know...)
- 'TStemplate' : freetext references to "fileadmin/" files.
- 'email' : Email highlight
- 'url' : URL highlights (with a scheme)

class t3lib_softrefproc

@package: TYPO3

@subpackage: t3lib

function findRef($table, $field, $uid, $content, $spKey, $spParams, $structurePath='')

function findRef_images($content, $spParams)

function findRef_typolink($content, $spParams)

function findRef_typolink_tag($content, $spParams)

function findRef_TStemplate($content, $spParams)

function findRef_TSconfig($content, $spParams)

function findRef_email($content, $spParams)

function findRef_url($content, $spParams)

function findRef_extension_fileref($content, $spParams)

Helper functions

function fileadminReferences($content, &$elements)

function getTypoLinkParts($typolinkValue)

function setTypoLinkPartsElement($tLP, &$elements, $content, $idx)

function getPageIdFromAlias($link_param)

function makeTokenID($index='')

class.t3lib_sqlengine.php

PHP SQL engine / server
Basically this is trying to emulation SQL record selection by PHP, thus allowing SQL queries into alternative data storages managed by PHP.
EXPERIMENTAL!

class t3lib_sqlengine extends t3lib_sqlparser

@package: TYPO3

@subpackage: t3lib

function init($config, &$pObj)

function resetStatusVars()

function processAccordingToConfig(&$value,$fInfo)

SQL queries
This is the SQL access functions used when this class is instantiated as a SQL handler with DBAL. Override these in derived classes.

function exec_INSERTquery($table,$fields_values)

function exec_UPDATEquery($table,$where,$fields_values)

function exec_DELETEquery($table,$where)

function exec_SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit)

function sql_query($query)

function sql_error()

function sql_insert_id()

function sql_affected_rows()

function quoteStr($str)

SQL admin functions
(For use in the Install Tool and Extension Manager)

function admin_get_tables()

function admin_get_fields($tableName)

function admin_get_keys($tableName)

function admin_query($query)

Data Source I/O

function readDataSource($table)

@todo: Table locking tools?

function saveDataSource($table)

@todo: Table locking tools?

SQL engine functions (PHP simulation of SQL) - still experimental

function selectFromData($table,$where)

function select_evalSingle($table,$config,&$itemKeys)

function getResultSet($keys, $table, $fieldList)

Debugging

function debug_printResultSet($array)

class t3lib_sqlengine_resultobj

@package: TYPO3

@subpackage: t3lib

function sql_num_rows()

function sql_fetch_assoc()

function sql_fetch_row()

function sql_data_seek($pointer)

function sql_field_type()

class.t3lib_sqlparser.php

TYPO3 SQL parser class.

class t3lib_sqlparser

@package: TYPO3

@subpackage: t3lib

SQL Parsing, full queries

function parseSQL($parseString)

function parseSELECT($parseString)

function parseUPDATE($parseString)

function parseINSERT($parseString)

function parseDELETE($parseString)

function parseEXPLAIN($parseString)

function parseCREATETABLE($parseString)

function parseALTERTABLE($parseString)

function parseDROPTABLE($parseString)

function parseCREATEDATABASE($parseString)

SQL Parsing, helper functions for parts of queries

function parseFieldList(&$parseString, $stopRegex='')

function parseFromTables(&$parseString, $stopRegex='')

function parseWhereClause(&$parseString, $stopRegex='')

function parseFieldDef(&$parseString, $stopRegex='')

Parsing: Helper functions

function nextPart(&$parseString,$regex,$trimAll=FALSE)

function getValue(&$parseString,$comparator='')

function getValueInQuotes(&$parseString,$quote)

function parseStripslashes($str)

function compileAddslashes($str)

function parseError($msg,$restQuery)

function trimSQL($str)

Compiling queries

function compileSQL($components)

function compileSELECT($components)

function compileUPDATE($components)

function compileINSERT($components)

function compileDELETE($components)

function compileCREATETABLE($components)

function compileALTERTABLE($components)

Compiling queries, helper functions for parts of queries

function compileFieldList($selectFields)

function compileFromTables($tablesArray)

function compileWhereClause($clauseArray)

function compileFieldCfg($fieldCfg)

Debugging

function debug_parseSQLpart($part,$str)

function debug_parseSQLpartCompare($str,$newStr,$caseInsensitive=FALSE)

function debug_testSQL($SQLquery)

class.t3lib_stdgraphic.php

Class contains a bunch of cool functions for manipulating graphics with GDlib/Freetype and ImageMagick
VERY OFTEN used with gifbuilder that extends this class and provides a TypoScript API to using these functions

class t3lib_stdGraphic

@package: TYPO3

@subpackage: t3lib

function init()

Layering images / "IMAGE" GIFBUILDER object

function maskImageOntoImage(&$im,$conf,$workArea)

function copyImageOntoImage(&$im,$conf,$workArea)

function copyGifOntoGif(&$im,$cpImg,$conf,$workArea)

function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h)

Text / "TEXT" GIFBUILDER object

function makeText(&$im,$conf,$workArea)

function txtPosition($conf,$workArea,$BB)

function calcBBox($conf)

function addToMap($cords,$conf)

function calcTextCordsForMap($cords,$offset, $conf)

function SpacedImageTTFText(&$im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $text, $spacing, $wordSpacing, $splitRenderingConf, $sF=1)

function fontResize($conf)

function ImageTTFBBoxWrapper($fontSize, $angle, $fontFile, $string, $splitRendering, $sF=1)

function ImageTTFTextWrapper($im, $fontSize, $angle, $x, $y, $color, $fontFile, $string, $splitRendering,$sF=1)

function splitString($string,$splitRendering,$fontSize,$fontFile)

function calcWordSpacing($conf, $scaleFactor=1)

function getTextScalFactor($conf)

Other GIFBUILDER objects related to TEXT

function makeOutline(&$im,$conf,$workArea,$txtConf)

function circleOffset($distance, $iterations)

function makeEmboss(&$im,$conf,$workArea,$txtConf)

function makeShadow(&$im,$conf,$workArea,$txtConf)

Other GIFBUILDER objects

function makeBox(&$im,$conf,$workArea)

function makeEffect(&$im, $conf)

function IMparams($setup)

function adjust(&$im, $conf)

function crop(&$im,$conf)

function scale(&$im,$conf)

function setWorkArea($workArea)

Adjustment functions

function autolevels(&$im)

function outputLevels(&$im,$low,$high,$swap='')

function inputLevels(&$im,$low,$high,$swap='')

function reduceColors(&$im,$limit, $cols)

function IMreduceColors($file, $cols)

GIFBUILDER Helper functions

function prependAbsolutePath($fontFile)

function v5_sharpen($factor)

function v5_blur($factor)

function randomName()

function applyOffset($cords,$OFFSET)

function convertColor($string)

function recodeString($string)

function singleChars($theText,$returnUnicodeNumber=FALSE)

function objPosition($conf,$workArea,$BB)

Scaling, Dimensions of images

function imageMagickConvert($imagefile,$newExt='',$w='',$h='',$params='',$frame='',$options='',$mustCreate=0)

function getImageDimensions($imageFile)

function cacheImageDimensions($identifyResult)

function getCachedImageDimensions($imageFile)

function getImageScale($info,$w,$h,$options)

function file_exists_typo3temp_file($output,$orig='')

ImageMagick API functions

function imageMagickIdentify($imagefile)

function imageMagickExec($input,$output,$params)

function combineExec($input,$overlay,$mask,$output, $handleNegation = false)

function wrapFileName($inputName)

Various IO functions

function checkFile($file)

function createTempSubDir($dirName)

function applyImageMagickToPHPGif(&$im, $command)

function gif_or_jpg($type,$w,$h)

function output($file)

function destroy()

function imgTag ($imgInfo)

function ImageWrite($destImg, $theImage)

function imageGif($destImg, $theImage)

function imageCreateFromGif($sourceImg)

function imageCreateFromFile($sourceImg)

function imagecreate($w, $h)

function hexColor($col)

function unifyColors(&$img, $colArr, $closest = false)

class.t3lib_superadmin.php

Super Admin class has functions for the administration of multiple TYPO3 sites in folders
See 'misc/superadmin.php' for details on how to use!

$Id: class.t3lib_superadmin.php,v 1.13.6.2 2006/03/18 20:57:38 masi Exp $
Revised for TYPO3 3.6 February/2004 by Kasper Skaarhoj
XHTML Compliant

function debug($p1,$p2='')

class t3lib_superadmin

@package: TYPO3

@subpackage: t3lib

Initialize stuff

function t3lib_superadmin()

function init($parentDirs)

Main functions

function defaultSet()

function make()

Output preparation

function setMenuItem($code,$label)

function error($str)

function headerParentDir($str)

function headerSiteDir($str)

Collection information

function initProcess()

function processSiteDir($path,$dir)

function includeLocalconf($localconf)

function connectToDatabase($siteInfo)

function getDBInfo($key)

Content: Installation Overview

function makeTable()

Content: Local extensions

function localExtensions()

function getExtensionInfo($path,$extKey,$k)

function getAllFilesAndFoldersInPath($fileArr,$extPath,$extList='',$regDirs=0)

function findMostRecent($fileArr,$extPath)

function removePrefixPathFromList($fileArr,$extPath)

Content: Other

function singleSite($exp)

function loginLog($DB)

function log_getDetails($text,$data)

function rmCachedFiles($exp)

function menuContent($exp)

function makeAdminLogin()

function changeAdminPasswordsForm()

function setNewPasswords()

class.t3lib_svbase.php

Parent class for "Services" classes

class t3lib_svbase

@package: TYPO3

@subpackage: t3lib

Get service meta information

function getServiceInfo()

function getServiceKey()

function getServiceTitle()

function getServiceOption($optionName, $defaultValue='', $includeDefaultConfig=TRUE)

Error handling

function devLog($msg, $severity=0, $dataVar=FALSE)

function errorPush($errNum=T3_ERR_SV_GENERAL, $errMsg='Unspecified error occured')

function errorPull()

function getLastError()

function getLastErrorMsg()

function getErrorMsgArray()

function getLastErrorArray()

function resetErrors()

General service functions

function checkExec($progList)

function deactivateService()

IO tools

function checkInputFile ($absFile)

function readFile ($absFile, $length=0)

function writeFile ($content, $absFile='')

function tempFile ($filePrefix)

function registerTempFile ($absFile)

function unlinkTempFiles ()

IO input

function setInput ($content, $type='')

function setInputFile ($absFile, $type='')

function getInput ()

function getInputFile ($createFile='')

IO output

function setOutputFile ($absFile)

function getOutput ()

function getOutputFile ($absFile='')

Service implementation

function init()

function reset()

function __destruct()

class.t3lib_syntaxhl.php

Syntax Highlighting class.

class t3lib_syntaxhl

@package: TYPO3

@subpackage: t3lib

Markup of Data Structure, <T3DataStructure>

function highLight_DS($str)

function highLight_DS_markUpRecursively($struct,$parent='',$app='')

Markup of Data Structure, <T3FlexForms>

function highLight_FF($str)

function highLight_FF_markUpRecursively($struct,$parent='',$app='')

Various

function getAllTags($str)

function splitXMLbyTags($tagList,$str)

class.t3lib_tceforms.php

'TCEforms' - Class for creating the backend editing forms.

class t3lib_TCEforms

@package: TYPO3

@subpackage: t3lib

function t3lib_TCEforms()

function initDefaultBEmode()

Rendering the forms, fields etc

function getSoloField($table,$row,$theFieldToReturn)

function getMainFields($table,$row,$depth=0)

function getListedFields($table,$row,$list)

function getPaletteFields($table,$row,$palette,$header='',$itemList='',$collapsedHeader='')

function getSingleField($table,$field,$row,$altName='',$palette=0,$extra='',$pal=0)

function getSingleField_SW($table,$field,$row,&$PA)

Rendering of each TCEform field type

function getSingleField_typeInput($table,$field,$row,&$PA)

function getSingleField_typeText($table,$field,$row,&$PA)

function getSingleField_typeCheck($table,$field,$row,&$PA)

function getSingleField_typeRadio($table,$field,$row,&$PA)

function getSingleField_typeSelect($table,$field,$row,&$PA)

function getSingleField_typeSelect_single($table,$field,$row,&$PA,$config,$selItems,$nMV_label)

function getSingleField_typeSelect_checkbox($table,$field,$row,&$PA,$config,$selItems,$nMV_label)

function getSingleField_typeSelect_singlebox($table,$field,$row,&$PA,$config,$selItems,$nMV_label)

function getSingleField_typeSelect_multiple($table,$field,$row,&$PA,$config,$selItems,$nMV_label)

function getSingleField_typeGroup($table,$field,$row,&$PA)

function getSingleField_typeNone($table,$field,$row,&$PA)

function getSingleField_typeNone_render($config,$itemValue)

function getSingleField_typeFlex($table,$field,$row,&$PA)

function getSingleField_typeFlex_langMenu($languages,$elName,$selectedLanguage,$multi=1)

function getSingleField_typeFlex_sheetMenu($sArr,$elName,$sheetKey)

function getSingleField_typeFlex_draw($dataStruct,$editData,$cmdData,$table,$field,$row,&$PA,$formPrefix='',$level=0,$tRows=array())

function getSingleField_typeUnknown($table,$field,$row,&$PA)

function getSingleField_typeUser($table,$field,$row,&$PA)

Field content processing

function formatValue ($config, $itemValue)

"Configuration" fetching/processing functions

function getRTypeNum($table,$row)

function rearrange($fields)

function getExcludeElements($table,$row,$typeNum)

function getFieldsToAdd($table,$row,$typeNum)

function mergeFieldsWithAddedFields($fields,$fieldsToAdd)

function setTSconfig($table,$row,$field='')

function getSpecConfForField($table,$row,$field)

function getSpecConfFromString($extraString, $defaultExtras)

Display of localized content etc.

function registerDefaultLanguageData($table,$rec)

function getLanguageOverlayRawValue($table, $row, $field, $fieldConf)

function renderDefaultLanguageContent($table,$field,$row,$item)

function renderDefaultLanguageDiff($table,$field,$row,$item)

Form element helper functions

function dbFileIcons($fName,$mode,$allowed,$itemArray,$selector='',$params=array(),$onFocus='')

function getClipboardElements($allowed,$mode)

function getClickMenu($str,$table,$uid='')

function renderWizards($itemKinds,$wizConf,$table,$row,$field,&$PA,$itemName,$specConf,$RTE=0)

function getIcon($icon)

function optionTagStyle($iconString)

function extractValuesOnlyFromValueLabelList($itemFormElValue)

function wrapOpenPalette($header,$table,$row,$palette,$retFunc=0)

function checkBoxParams($itemName,$thisValue,$c,$iCount,$addFunc='')

function elName($itemName)

function noTitle($str,$wrapParts=array())

function blur()

function thisReturnUrl()

function getSingleHiddenField($table,$field,$row)

function formWidth($size=48,$textarea=0)

function formWidthText($size=48,$wrap='')

function formElStyle($type)

function formElClass($type)

function formElStyleClassValue($type, $class=FALSE)

function insertDefStyle($type)

function getDynTabMenu($parts, $idString)

Item-array manipulation functions (check/select/radio)

function initItemArray($fieldValue)

function addItems($items,$iArray)

function procItems($items,$iArray,$config,$table,$row,$field)

function addSelectOptionsToItemArray($items,$fieldValue,$TSconfig,$field)

function addSelectOptionsToItemArray_makeModuleData($value)

function foreignTable($items,$fieldValue,$TSconfig,$field,$pFFlag=0)

Template functions

function setNewBEDesign()

function intoTemplate($inArr,$altTemplate='')

function addUserTemplateMarkers($marker,$table,$field,$row,&$PA)

function wrapLabels($str)

function wrapTotal($c,$rec,$table)

function replaceTableWrap($arr,$rec,$table)

function wrapBorder(&$out_array,&$out_pointer)

function rplColorScheme($inTemplate)

function getDivider()

function printPalette($palArr)

function helpTextIcon($table,$field,$force=0)

function helpText($table,$field)

function setColorScheme($scheme)

function resetSchemes()

function storeSchemes()

function restoreSchemes()

JavaScript related functions

function JStop()

function JSbottom($formname='forms[0]')

function dbFileCon($formObj='document.forms[0]')

function printNeededJSFunctions()

function printNeededJSFunctions_top()

Various helper functions

function getDefaultRecord($table,$pid=0)

function getRecordPath($table,$rec)

function readPerms()

function sL($str)

function getLL($str)

function isPalettesCollapsed($table,$palette)

function isDisplayCondition($displayCond,$row,$ffValueKey='')

function getTSCpid($table,$uid,$pid)

function doLoadTableDescr($table)

function getAvailableLanguages($onlyIsoCoded=1,$setDefault=1)

class t3lib_TCEforms_FE extends t3lib_TCEforms

function wrapLabels($str)

function printPalette($palArr)

function setFancyDesign()

class.t3lib_tcemain.php

This is the TYPO3 Core Engine class for manipulation of the database
This class is used by eg. the tce_db.php script which provides an the interface for POST forms to this class.

Dependencies:
- $GLOBALS['TCA'] must exist
- $GLOBALS['LANG'] (languageobject) may be preferred, but not fatal.

tce_db.php for further comments and SYNTAX! Also see document 'TYPO3 Core API' for details.

class t3lib_TCEmain

@package: TYPO3

@subpackage: t3lib

function start($data,$cmd,$altUserObject='')

function setMirror($mirror)

function setDefaultsFromUserTS($userTS)

function process_uploads($postFiles)

function process_uploads_traverseArray(&$outputArr,$inputArr,$keyToSet)

PROCESSING DATA

function process_datamap()

function placeholderShadowing($table,$id)

function fillInFieldArray($table,$id,$fieldArray,$incomingFieldArray,$realPid,$status,$tscPID)

Evaluation of input values

function checkValue($table,$field,$value,$id,$status,$realPid,$tscPID)

function checkValue_SW($res,$value,$tcaFieldConf,$table,$id,$curValue,$status,$realPid,$recFID,$field,$uploadedFiles,$tscPID)

function checkValue_input($res,$value,$tcaFieldConf,$PP,$field='')

function checkValue_check($res,$value,$tcaFieldConf,$PP)

function checkValue_radio($res,$value,$tcaFieldConf,$PP)

function checkValue_group_select($res,$value,$tcaFieldConf,$PP,$uploadedFiles,$field)

function checkValue_group_select_file($valueArray,$tcaFieldConf,$curValue,$uploadedFileArray,$status,$table,$id,$recFID)

function checkValue_flex($res,$value,$tcaFieldConf,$PP,$uploadedFiles,$field)

function checkValue_flexArray2Xml($array)

function _DELETE_FLEX_FORMdata(&$valueArrayToRemoveFrom,$deleteCMDS)

function _MOVE_FLEX_FORMdata(&$valueArrayToMoveIn, $moveCMDS, $direction)

Helper functions for evaluation functions.

function getUnique($table,$field,$value,$id,$newPid=0)

function checkValue_input_Eval($value,$evalArray,$is_in)

function checkValue_group_select_processDBdata($valueArray,$tcaFieldConf,$id,$status,$type)

function checkValue_group_select_explodeSelectGroupValue($value)

function checkValue_flex_procInData($dataPart,$dataPart_current,$uploadedFiles,$dataStructArray,$pParams,$callBackFunc='')

function checkValue_flex_procInData_travDS(&$dataValues,$dataValues_current,$uploadedFiles,$DSelements,$pParams,$callBackFunc,$structurePath)

PROCESSING COMMANDS

function process_cmdmap()

Cmd: Copying

function copyRecord($table,$uid,$destPid,$first=0,$overrideValues=array(),$excludeFields='')

function copyPages($uid,$destPid)

function copySpecificPage($uid,$destPid,$copyTablesArray,$first=0)

function copyRecord_raw($table,$uid,$pid,$overrideArray=array())

function rawCopyPageContent($old_pid,$new_pid,$copyTablesArray)

function insertNewCopyVersion($table,$fieldArray,$realPid)

function copyRecord_procBasedOnFieldType($table,$uid,$field,$value,$row,$conf)

function copyRecord_flexFormCallBack($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)

function copyRecord_procFilesRefs($conf, $uid, $value)

Cmd: Moving, Localizing

function moveRecord($table,$uid,$destPid)

function localize($table,$uid,$language)

Cmd: Deleting

function deleteAction($table, $id)

function deleteEl($table, $uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE)

function undeleteRecord($table,$uid)

function deleteRecord($table,$uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE,$undeleteRecord=FALSE)

function deletePages($uid,$force=FALSE,$forceHardDelete=FALSE)

function deleteSpecificPage($uid,$forceHardDelete=FALSE)

function canDeletePage($uid)

function cannotDeleteRecord($table,$id)

Cmd: Versioning

function versionizeRecord($table,$id,$label,$delete=FALSE,$versionizeTree=-1)

function versionizePages($uid,$label,$versionizeTree)

function version_swap($table,$id,$swapWith,$swapIntoWS=0)

function version_clearWSID($table,$id)

function version_setStage($table,$id,$stageId,$comment='')

Cmd: Helper functions

function remapListedDBRecords()

function remapListedDBRecords_flexFormCallBack($pParams, $dsConf, $dataValue, $dataValue_ext1, $dataValue_ext2)

function remapListedDBRecords_procDBRefs($conf, $value, $MM_localUid)

Access control / Checking functions

function checkModifyAccessList($table)

function isRecordInWebMount($table,$id)

function isInWebMount($pid)

function checkRecordUpdateAccess($table,$id)

function checkRecordInsertAccess($insertTable,$pid,$action=1)

function isTableAllowedForThisPage($page_uid, $checkTable)

function doesRecordExist($table,$id,$perms)

function doesRecordExist_pageLookUp($id, $perms)

function doesBranchExist($inList,$pid,$perms,$recurse)

function tableReadOnly($table)

function tableAdminOnly($table)

function destNotInsideSelf($dest,$id)

function getExcludeListArray()

function doesPageHaveUnallowedTables($page_uid,$doktype)

Information lookup

function pageInfo($id,$field)

function recordInfo($table,$id,$fieldList)

function getRecordProperties($table,$id,$noWSOL=FALSE)

function getRecordPropertiesFromRow($table,$row)

Storing data to Database Layer

function updateDB($table,$id,$fieldArray)

function insertDB($table,$id,$fieldArray,$newVersion=FALSE,$suggestedUid=0,$dontSetNewIdIndex=FALSE)

function checkStoredRecord($table,$id,$fieldArray,$action)

function setHistory($table,$id,$logId)

function clearHistory($maxAgeSeconds=604800,$table)

function updateRefIndex($table,$id)

Misc functions

function getSortNumber($table,$uid,$pid)

function resorting($table,$pid,$sortRow, $return_SortNumber_After_This_Uid)

function setTSconfigPermissions($fieldArray,$TSConfig_p)

function newFieldArray($table)

function addDefaultPermittedLanguageIfNotSet($table,&$incomingFieldArray)

function overrideFieldArray($table,$data)

function compareFieldArrayWithCurrentAndUnset($table,$id,$fieldArray)

function assemblePermissions($string)

function rmComma($input)

function convNumEntityToByteValue($input)

function destPathFromUploadFolder($folder)

function deleteClause($table)

function getTCEMAIN_TSconfig($tscPID)

function getTableEntries($table,$TSconfig)

function getPID($table,$uid)

function dbAnalysisStoreExec()

function removeRegisteredFiles()

function removeCacheFiles()

function int_pageTreeInfo($CPtable,$pid,$counter, $rootID)

function compileAdminTables()

function fixUniqueInPid($table,$uid)

function fixCopyAfterDuplFields($table,$uid,$prevUid,$update, $newData=array())

function extFileFields($table)

function getUniqueFields($table)

function isReferenceField($conf)

function getCopyHeader($table,$pid,$field,$value,$count,$prevTitle='')

function prependLabel($table)

function resolvePid($table,$pid)

function clearPrefixFromValue($table,$value)

function extFileFunctions($table,$field,$filelist,$func)

function noRecordsFromUnallowedTables($inList)

function notifyStageChange($stat,$stageId,$table,$id,$comment)

function notifyStageChange_getEmails($listOfUsers,$noTablePrefix=FALSE)

Clearing cache

function clear_cache($table,$uid)

function clear_cacheCmd($cacheCmd)

Logging

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

function newlog($message, $error=0)

function printLogErrorMessages($redirect)

class.t3lib_timetrack.php

Frontend Timetracking functions

Is used to register how much time is used with operations in TypoScript
Used by index_ts

class t3lib_timeTrack

@package: TYPO3

@subpackage: t3lib

Logging parsing times in the scripts

function start()

function push($tslabel, $value='')

function pull($content='')

function setTSlogMessage($content,$num=0)

function setTSselectQuery($query,$msg)

function incStackPointer()

function decStackPointer()

function mtime()

function convertMicrotime($microtime)

Printing the parsing time information (for Admin Panel)

function printTSlog()

function fixContent(&$arr, $content, $depthData='', $first=0, $vKey='')

function fixCLen($c,$v)

function fw($str)

function createHierarchyArray(&$arr,$pointer,$uniqueId)

function debug_typo3PrintError($header,$text,$js,$baseUrl='')

class.t3lib_transferdata.php

Class for getting and transforming data for display in backend forms (TCEforms)

class t3lib_transferData

@package: TYPO3

@subpackage: t3lib

Getting record content, ready for display in TCEforms

function fetchRecord($table,$idList,$operation)

function renderRecord($table, $id, $pid, $row)

function renderRecordRaw($table, $id, $pid, $row, $TSconfig='', $tscPID=0)

function renderRecord_SW($data,$fieldConfig,$TSconfig,$table,$row,$field)

function renderRecord_groupProc($data,$fieldConfig,$TSconfig,$table,$row,$field)

function renderRecord_selectProc($data,$fieldConfig,$TSconfig,$table,$row,$field)

function renderRecord_flexProc($data,$fieldConfig,$TSconfig,$table,$row,$field)

function renderRecord_typesProc($totalRecordContent,$types_fieldConfig,$tscPID,$table,$pid)

FlexForm processing functions

function renderRecord_flexProc_procInData($dataPart,$dataStructArray,$pParams)

function renderRecord_flexProc_procInData_travDS(&$dataValues,$DSelements,$pParams)

Selector box processing functions

function selectAddSpecial($dataAcc, $elements, $specialKey)

function selectAddForeign($dataAcc, $elements, $fieldConfig, $field, $TSconfig, $row)

function getDataIdList($elements, $fieldConfig, $row)

function procesItemArray($selItems,$config,$fieldTSConfig,$table,$row,$field)

function addItems($items,$iArray)

function procItems($items,$itemsProcFuncTSconfig,$config,$table,$row,$field)

Helper functions

function lockRecord($table, $id, $pid=0)

function regItem($table, $id, $field, $content)

function sL($in)

class.t3lib_treeview.php

Base class for creating a browsable array/page/folder tree in HTML

class t3lib_treeView

@package: TYPO3

@subpackage: t3lib

function init($clause='', $orderByFields='')

function setTreeName($treeName='')

function addField($field,$noCheck=0)

function reset()

output

function getBrowsableTree()

function printTree($treeArr='')

rendering parts

function PMicon($row,$a,$c,$nextCount,$exp)

function PM_ATagWrap($icon,$cmd,$bMark='')

function wrapTitle($title,$row,$bank=0)

function wrapIcon($icon,$row)

function addTagAttributes($icon,$attr)

function wrapStop($str,$row)

tree handling

function expandNext($id)

function initializePositionSaving()

function savePosition()

Functions that might be overwritten by extended classes

function getRootIcon($rec)

function getIcon($row)

function getTitleStr($row,$titleLen=30)

function getTitleAttrib($row)

function getId($row)

function getJumpToParam($row)

tree data buidling

function getTree($uid, $depth=999, $depthData='',$blankLineCode='',$subCSSclass='')

Data handling
Works with records and arrays

function getCount($uid)

function getRootRecord($uid)

function getRecord($uid)

function getDataInit($parentId,$subCSSclass='')

function getDataCount(&$res)

function getDataNext(&$res,$subCSSclass='')

function getDataFree(&$res)

function setDataFromArray(&$dataArr,$traverse=FALSE,$pid=0)

function setDataFromTreeArray(&$treeArr, &$treeLookupArr)

class.t3lib_tsfebeuserauth.php

TYPO3 backend user authentication in the TSFE frontend.
This includes mainly functions related to the Admin Panel

class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth

@package: TYPO3

@subpackage: t3lib

function extInitFeAdmin()

function extPrintFeAdminDialog()

Creating sections of the Admin Panel

function extGetCategory_preview($out='')

function extGetCategory_cache($out='')

function extGetCategory_publish($out='')

function extGetCategory_edit($out='')

function extGetCategory_tsdebug($out='')

function extGetCategory_info($out='')

Admin Panel Layout Helper functions

function extGetHead($pre)

function extItemLink($pre,$str)

function extGetItem($pre,$element)

function extFw($str)

function ext_makeToolBar()

TSFE BE user Access Functions

function checkBackendAccessSettingsFromInitPhp()

function extPageReadAccess($pageRec)

function extAdmModuleEnabled($key)

function extSaveFeAdminConfig()

function extGetFeAdminValue($pre,$val='')

function extIsAdmMenuOpen($pre)

TSFE BE user Access Functions

function extGetTreeList($id,$depth,$begin=0,$perms_clause)

function extGetNumberOfCachedPages($page_id)

Localization handling

function extGetLL($key)

Frontend Editing

function extIsEditAction()

function extIsFormShown()

function extEditAction()

class.t3lib_tsparser.php

The TypoScript parser

class t3lib_TSparser

@package: TYPO3

@subpackage: t3lib

function parse($string,$matchObj='')

function nextDivider()

function parseSub(&$setup)

function rollParseSub($string,&$setup)

function getVal($string,$setup)

function setVal($string,&$setup,$value,$wipeOut=0)

function error($err,$num=2)

function checkIncludeLines($string)

function checkIncludeLines_array($array)

Syntax highlighting

function doSyntaxHighlight($string,$lineNum='',$highlightBlockMode=0)

function regHighLight($code,$pointer,$strlen=-1)

function syntaxHighlight_print($lineNumDat,$highlightBlockMode)

class.t3lib_tsparser_ext.php

TSParser extension class to t3lib_TStemplate

class t3lib_tsparser_ext extends t3lib_TStemplate

@package: TYPO3

@subpackage: t3lib

function flattenSetup($setupArray, $prefix, $resourceFlag)

function substituteConstants($all)

function substituteConstantsCallBack($matches)

function substituteCMarkers($all)

function generateConfig_constants()

function ext_getSetup($theSetup,$theKey)

function ext_getObjTree($arr, $depth_in, $depthData, $parentType="",$parentValue="")

function lineNumberToScript($lnArr)

function makeHtmlspecialchars($theValue)

function ext_getSearchKeys($arr, $depth_in, $searchString, $keyArray)

function ext_getRootlineNumber($pid)

function ext_getTemplateHierarchyArr($arr,$depthData, $keyArray,$first=0)

function ext_process_hierarchyInfo($depthDataArr,&$pointer)

function ext_outputTS($config, $lineNumbers=0, $comments=0, $crop=0, $syntaxHL=0, $syntaxHLBlockmode=0)

function ext_fixed_lgd($string,$chars)

function ext_lnBreakPointWrap($ln,$str)

function ext_formatTS($input, $ln, $comments=1, $crop=0)

function ext_getFirstTemplate($id,$template_uid=0)

function ext_getAllTemplates($id)

function ext_compareFlatSetups($default)

function ext_categorizeEditableConstants($editConstArray)

function ext_getCategoryLabelArray()

function ext_getTypeData($type)

function ext_getTSCE_config($category)

function ext_getKeyImage($key)

function ext_getTSCE_config_image($imgConf)

function ext_resourceDims()

function ext_readDirResources($path)

function readDirectory($path,$type="file")

function ext_fNandV($params)

function ext_printFields($theConstants,$category)

Processing input values

function ext_regObjectPositions($constants)

function ext_regObjects($pre)

function ext_putValueInConf($key, $var)

function ext_removeValueInConf($key)

function ext_depthKeys($arr,$settings)

function ext_procesInput($http_post_vars,$http_post_files,$theConstants,$tplRow)

function upload_copy_file($typeDat,&$tplRow,$theRealFileName,$tmp_name)

function ext_prevPageWithTemplate($id,$perms_clause)

function ext_setStar($val)

function ext_detectAndFixExtensionPrefix($value)

class.t3lib_tsstyleconfig.php

Provides a simplified layer for making Constant Editor style configuration forms

class t3lib_tsStyleConfig extends t3lib_tsparser_ext

@package: TYPO3

@subpackage: t3lib

function ext_initTSstyleConfig($configTemplate,$pathRel,$pathAbs,$backPath)

function ext_setValueArray($theConstants,$valueArray)

function ext_getCategoriesForModMenu()

function ext_makeHelpInformationForCategory($cat)

function ext_getForm($cat,$theConstants,$script="",$addFields="")

function uFormUrl(aname)

function ext_displayExample()

function ext_mergeIncomingWithExisting($arr)

function ext_getKeyImage($key)

function ext_getTSCE_config_image($imgConf)

function ext_fNandV($params)

function ext_loadResources($absPath)

function ext_putValueInConf($key, $var)

function ext_removeValueInConf($key)

class.t3lib_tstemplate.php

Template object that is responsible for generating the TypoScript template based on template records.

class t3lib_TStemplate

@package: TYPO3

@subpackage: t3lib

function init()

function getCurrentPageData()

function matching($cc)

function start($theRootLine)

Fetching TypoScript code text for the Template Hierarchy

function runThroughTemplates($theRootLine,$start_template_uid=0)

function processTemplate($row, $idList,$pid,$templateID='',$templateParent='')

function includeStaticTypoScriptSources($idList,$templateID,$pid,$row)

function addExtensionStatics($idList,$templateID,$pid,$row)

function prependStaticExtra($subrow)

function versionOL(&$row)

Parsing TypoScript code text from Template Records into PHP array

function generateConfig()

function procesIncludes()

function mergeConstantsFromPageTSconfig($constArray)

@todo: Apply caching to the parsed Page TSconfig. This is done in the other similar functions for both frontend and backend. However, since this functions works for BOTH frontend and backend we will have to either write our own local caching function or (more likely) detect if we are in FE or BE and use caching functions accordingly. Not having caching affects mostly the backend modules inside the "Template" module since the overhead in the frontend is only seen when TypoScript templates are parsed anyways (after which point they are cached anyways...)

function flattenSetup($setupArray, $prefix, $resourceFlag)

function substituteConstants($all)

function substituteConstantsCallBack($matches)

Various API functions, used from elsewhere in the frontend classes

function splitConfArray($conf,$splitCount)

function getFileName($fileFromSetup)

function extractFromResources($res,$file)

function checkFile($name,$menuArr)

function printTitle($title,$no_title=0,$titleFirst=0)

function fileContent($fName)

function wrap($content,$wrap)

function removeQueryString($url)

function sortedKeyList($setupArr, $acceptOnlyProperties=FALSE)

Functions for creating links

function linkData($page,$oTarget,$no_cache,$script,$overrideArray='',$addParams='',$typeOverride='')

function getFromMPmap($pageId=0)

@todo: Implement some caching of the result between hits. (more than just the memory caching used here)

function initMPmap_create($id,$MP_array=array(),$level=0)

class.t3lib_userauth.php

Authentication of users in TYPO3

This class is used to authenticate a login user.
The class is used by both the frontend and backend. In both cases this class is a parent class to beuserauth and feuserauth

See Inside TYPO3 for more information about the API of the class and internal variables.

class t3lib_userAuth

@package: TYPO3

@subpackage: t3lib

function start()

function checkAuthentication()

User Sessions

function createUserSession ($tempuser)

function fetchUserSession()

function logoff()

SQL Functions

function user_where_clause()

function ipLockClause()

function ipLockClause_remoteIPNumber($parts)

function hashLockClause()

function hashLockClause_getHashInt()

Session and Configuration Handling

function writeUC($variable='')

function unpack_uc($theUC='')

function pushModuleData($module,$data,$noSave=0)

function getModuleData($module,$type='')

function getSessionData($key)

function setAndSaveSessionData($key,$data)

Misc

function getLoginFormData()

function processLoginData($loginData, $security_level='')

function getAuthInfoArray()

function compareUident($user, $loginData, $security_level='')

function gc()

function redirect()

function writelog($type,$action,$error,$details_nr,$details,$data,$tablename,$recuid,$recpid)

function checkLogFailures()

function setBeUserByUid($uid)

function setBeUserByName($name)

function getRawUserByUid($uid)

function getRawUserByName($name)

Create/update user - EXPERIMENTAL

function fetchUserRecord($dbUser, $username, $extraWhere='' )

class.t3lib_userauthgroup.php

Extension to class.t3lib_userauth.php; Authentication of users in TYPO3 Backend

Actually this class is extended again by t3lib_beuserauth which is the actual backend user class that will be instantiated.
In fact the two classes t3lib_beuserauth and this class could just as well be one, single class since t3lib_userauthgroup is not - to my knowledge - used separately elsewhere. But for historical reasons they are two separate classes.

class t3lib_userAuthGroup extends t3lib_userAuth

@package: TYPO3

@subpackage: t3lib

Permission checking functions:

function isAdmin()

function isMemberOfGroup($groupId)

function doesUserHaveAccess($row,$perms)

function isInWebMount($id,$readPerms='',$exitOnError=0)

function modAccess($conf,$exitOnError)

function getPagePermsClause($perms)

function calcPerms($row)

function isRTE()

function check($type,$value)

function checkAuthMode($table,$field,$value,$authMode)

function checkLanguageAccess($langValue)

function recordEditAccessInternals($table,$idOrRow,$newRecord=FALSE)

function isPSet($lCP,$table,$type='')

function mayMakeShortcut()

function workspaceCannotEditRecord($table,$recData)

function workspaceCannotEditOfflineVersion($table,$recData)

function workspaceAllowLiveRecordsInPID($pid, $table)

function workspaceCreateNewRecord($pid, $table)

function workspaceAllowAutoCreation($table,$id,$recpid)

function workspaceCheckStageForCurrent($stage)

function workspacePublishAccess($wsid)

function workspaceSwapAccess()

function workspaceVersioningTypeAccess($type)

function workspaceVersioningTypeGetClosest($type)

Miscellaneous functions

function getTSConfig($objectString,$config='')

function getTSConfigVal($objectString)

function getTSConfigProp($objectString)

function inList($in_list,$item)

function returnWebmounts()

function returnFilemounts()

function jsConfirmation($bitmask)

Authentication methods

function fetchGroupData()

function fetchGroups($grList,$idList='')

function setCachedList($cList)

function addFileMount($title, $altTitle, $path, $webspace, $type)

function addTScomment($str)

Workspaces

function workspaceInit()

function checkWorkspace($wsRec,$fields='uid,title,adminusers,members,reviewers,publish_access,stagechg_notification')

function checkWorkspaceCurrent()

function setWorkspace($workspaceId)

function setWorkspacePreview($previewState)

function getDefaultWorkspace()

Logging

function writelog($type,$action,$error,$details_nr,$details,$data,$tablename='',$recuid='',$recpid='',$event_pid=-1,$NEWid='',$userId=0)

function simplelog($message, $extKey='', $error=0)

function checkLogFailures($email, $secondsBack=3600, $max=3)

class.t3lib_xml.php

XML class, Used to create XML output from input rows.
Doesn't contain a lot of advanced features - pretty straight forward, practical stuff
You are encouraged to use this class in your own applications.

class t3lib_xml

@package: TYPO3

@subpackage: t3lib

function t3lib_xml($topLevelName)

function setRecFields($table,$list)

function getResult()

function WAPHeader()

function renderHeader()

function renderFooter()

function newLevel($name,$beginEndFlag=0,$params=array())

function output($content)

function indent($b)

function renderRecords($table,$res)

function addRecord($table,$row)

function getRowInXML($table,$row)

function utf8($content)

function substNewline($string)

function fieldWrap($field,$value)

function WAPback()

function addLine($str)

thumbs.php

Class for generating a thumbnail from the input parameters given to the script

Input GET var, &file: relative or absolute reference to an imagefile. WILL be validated against PATH_site / lockRootPath
Input GET var, &size: integer-values defining size of thumbnail, format '[int]' or '[int]x[int]'

Relative paths MUST BE the first two characters ONLY: eg: '../dir/file.gif', otherwise it is expect to be absolute

class SC_t3lib_thumbs

@package: TYPO3

@subpackage: t3lib

function init()

function main()

OTHER FUNCTIONS:

function errorGif($l1,$l2,$l3)

function fontGif($font)

function wrapFileName($inputName)

Detailed descriptions:

class.t3lib_admin.php

This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)

Depends on: Depends on loaddbgroup from t3lib/

Filesize: 25 K
Func/Classes: 15
Tags: @todo Need to really extend this class when the tcemain library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!
@see SC_mod_tools_dbint_index::func_relations(), SC_mod_tools_dbint_index::func_records()
@author Kasper Skaarhoj <kasperYYYY@typo3.com>
@package TYPO3
@subpackage t3lib

class t3lib_admin

This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)

Depends on: Depends on loaddbgroup from t3lib/

Returns: [type] ...
  @todo Need to really extend this class when the tcemain library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!
  @see SC_mod_tools_dbint_index::func_relations(), SC_mod_tools_dbint_index::func_records()
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @package TYPO3
  @subpackage t3lib

function genTree($theID, $depthData, $versions=FALSE)

Generates a list of Page-uid's that corresponds to the tables in the tree. This list should ideally include all records in the pages-table.

$theID integer a pid (page-record id) from which to start making the tree
$depthData string HTML-code (image-tags) used when this function calls itself recursively.
$versions=FALSE boolean Internal variable, don't set from outside!
Returns: void

function genTree_records($theID, $depthData, $table='', $versions=FALSE)

$theID [type] $theID: ...
$depthData [type] $depthData: ...
$table='' [type] $table: ...
$versions=FALSE [type] $versions: ...
Returns: [type] ...

function genTreeStatus()

[Describe function...]

Returns: [type] ...

function lostRecords($pid_list)

Fills $this->lRecords with the records from all tc-tables that are not attached to a PID in the pid-list.

$pid_list string list of pid's (page-record uid's). This list is probably made by genTree()
Returns: void

function fixLostRecord($table,$uid)

Fixes lost record from $table with uid $uid by setting the PID to zero. If there is a disabled column for the record that will be set as well.

$table string Database tablename
$uid integer The uid of the record which will have the PID value set to 0 (zero)
Returns: boolean True if done.

function countRecords($pid_list)

Counts records from $TCA-tables that ARE attached to an existing page.

$pid_list string list of pid's (page-record uid's). This list is probably made by genTree()
Returns: array an array with the number of records from all $TCA-tables that are attached to a PID in the pid-list.

function getGroupFields($mode)

Finding relations in database based on type 'group' (files or database-uid's in a list)

$mode string $mode = file, $mode = db, $mode = '' (all...)
Returns: array An array with all fields listed that somehow are references to other records (foreign-keys) or files

function getFileFields($uploadfolder)

Finds all fields that hold filenames from uploadfolder

$uploadfolder string Path to uploadfolder
Returns: array An array with all fields listed that have references to files in the $uploadfolder

function getDBFields($theSearchTable)

Returns an array with arrays of table/field pairs which are allowed to hold references to the input table name - according to $TCA

$theSearchTable string Table name
Returns: array

function selectNonEmptyRecordsWithFkeys($fkey_arrays)

This selects non-empty-records from the tables/fields in the fkey_array generated by getGroupFields()

$fkey_arrays array Array with tables/fields generated by getGroupFields()
Returns: void
  @see getGroupFields()

function testFileRefs ()

Depends on selectNonEmpty.... to be executed first!!

Returns: array Report over files; keys are "moreReferences", "noReferences", "noFile", "error"

function testDBRefs($theArray)

Depends on selectNonEmpty.... to be executed first!!

$theArray array Table with key/value pairs being table names and arrays with uid numbers
Returns: string HTML Error message

function whereIsRecordReferenced($searchTable,$id)

Finding all references to record based on table/uid

$searchTable string Table name
$id integer Uid of database record
Returns: array Array with other arrays containing information about where references was found

function whereIsFileReferenced($uploadfolder,$filename)

Finding all references to file based on uploadfolder / filename

$uploadfolder string Upload folder where file is found
$filename string Filename to search for
Returns: array Array with other arrays containing information about where references was found

class.t3lib_ajax.php

TYPO3 XMLHTTP class (new in TYPO3 4.0.0)
This class contains two main parts:
(1) generation of JavaScript code which creates an XMLHTTP object in a cross-browser manner
(2) generation of XML data as a reply

Filesize: 4.2 K
Func/Classes: 5
Tags: @author Sebastian Kurfuerst <sebastian@garbage-group.de>
@package TYPO3
@subpackage t3lib

class t3lib_ajax

TYPO3 XMLHTTP class (new in TYPO3 4.0.0)
This class contains two main parts:
(1) generation of JavaScript code which creates an XMLHTTP object in a cross-browser manner
(2) generation of XML data as a reply

Returns: [type] ...
  @author Sebastian Kurfuerst <sebastian@garbage-group.de>
  @package TYPO3
  @subpackage t3lib

function getJScode($handlerFunction, $fallback='', $debug=0)

Gets the JavaScript code needed to handle an XMLHTTP request in the frontend.
All JS functions have to call ajax_doRequest(url) to make a request to the server.
USE:
See examples of using this function in template.php -> getContextMenuCode and alt_clickmenu.php -> printContent

$handlerFunction string JS function handling the XML data from the server. That function gets the returned XML data as parameter.
$fallback='' string JS fallback function which is called with the URL of the request in case ajax is not available.
$debug=0 boolean If set to 1, the returned XML data is outputted as text in an alert window - useful for debugging, PHP errors are shown there, ...
Returns: string JavaScript code needed to make and handle an XMLHTTP request

function outputXMLreply($innerXML)

Function outputting XML data for TYPO3 ajax. The function directly outputs headers and content to the browser.

$innerXML string $innerXML XML data which will be sent to the browser
Returns: void

class.t3lib_arraybrowser.php

Class for displaying an array as a tree
See the extension 'lowlevel' /config (Backend module 'Tools > Configuration')

Filesize: 8.6 K
Func/Classes: 7
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@package TYPO3
@subpackage t3lib
@see SC_mod_tools_config_index::main()

class t3lib_arrayBrowser

Class for displaying an array as a tree
See the extension 'lowlevel' /config (Backend module 'Tools > Configuration')

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @package TYPO3
  @subpackage t3lib
  @see SC_mod_tools_config_index::main()

function tree($arr, $depth_in, $depthData)

Make browsable tree
Before calling this function you may want to set some of the internal vars like depthKeys, regexMode and fixedLgd. For examples see SC_mod_tools_config_index::main()

$arr array The array to display
$depth_in string Key-position id. Build up during recursive calls - [key1].[key2].[key3] - an so on.
$depthData string Depth-data - basically a prefix for the icons. For calling this function from outside, let it stay blank.
Returns: string HTML for the tree
  @see SC_mod_tools_config_index::main()

function wrapValue($theValue,$depth)

Wrapping the value in bold tags etc.

$theValue string The title string
$depth string Depth path
Returns: string Title string, htmlspecialchars()'ed

function wrapArrayKey($label,$depth,$theValue)

Wrapping the value in bold tags etc.

$label string The title string
$depth string Depth path
$theValue string The value for the array entry.
Returns: string Title string, htmlspecialchars()'ed

function getSearchKeys($keyArr, $depth_in, $searchString, $keyArray)

Creates an array with "depthKeys" which will expand the array to show the search results

$keyArr array The array to search for the value
$depth_in string Depth string - blank for first call (will build up during recursive calling creating an id of the position: [key1].[key2].[key3]
$searchString string The string to search for
$keyArray array Key array, for first call pass empty array
Returns: array

function fixed_lgd($string,$chars)

Fixed length function

$string string String to process
$chars integer Max number of chars
Returns: string Processed string

function depthKeys($arr,$settings)

Function modifying the depthKey array

$arr array Array with instructions to open/close nodes.
$settings array Input depth_key array
Returns: array Output depth_key array with entries added/removed based on $arr
  @see SC_mod_tools_config_index::main()

class.t3lib_basicfilefunc.php

Contains functions for management, validation etc of files in TYPO3, using the concepts of web- and ftp-space. Please see the comment for the init() function

Filesize: 18.7 K
Func/Classes: 20
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@package TYPO3
@subpackage t3lib
@see t3lib_basicFileFunctions::init()

class t3lib_basicFileFunctions

Contains functions for management, validation etc of files in TYPO3, using the concepts of web- and ftp-space. Please see the comment for the init() function

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @package TYPO3
  @subpackage t3lib
  @see t3lib_basicFileFunctions::init()

function init($mounts, $f_ext)

Constructor
This function should be called to initialise the internal arrays $this->mounts and $this->f_ext

A typical example of the array $mounts is this:
$mounts[xx][path] = (..a mounted path..)
the 'xx'-keys is just numerical from zero. There are also a [name] and [type] value that just denotes the mountname and type. Not used for athentication here.
$this->mounts is traversed in the function checkPathAgainstMounts($thePath), and it is checked that $thePath is actually below one of the mount-paths
The mountpaths are with a trailing '/'. $thePath must be with a trailing '/' also!
As you can see, $this->mounts is very critical! This is the array that decides where the user will be allowed to copy files!!
Typically the global var $WEBMOUNTS would be passed along as $mounts

A typical example of the array $f_ext is this:
$f_ext['webspace']['allow']='';
$f_ext['webspace']['deny']='php3,php';
$f_ext['ftpspace']['allow']='*';
$f_ext['ftpspace']['deny']='';
The control of fileextensions goes in two catagories. Webspace and Ftpspace. Webspace is folders accessible from a webbrowser (below TYPO3_DOCUMENT_ROOT) and ftpspace is everything else.
The control is done like this: If an extension matches 'allow' then the check returns true. If not and an extension matches 'deny' then the check return false. If no match at all, returns true.
You list extensions comma-separated. If the value is a '*' every extension is allowed
The list is case-insensitive when used in this class (see init())
Typically TYPO3_CONF_VARS['BE']['fileExtensions'] would be passed along as $f_ext.

Example:
$basicff->init($GLOBALS['FILEMOUNTS'],$TYPO3_CONF_VARS['BE']['fileExtensions']);

$mounts array Contains the paths of the file mounts for the current BE user. Normally $GLOBALS['FILEMOUNTS'] is passed. This variable is set during backend user initialization; $FILEMOUNTS = $BE_USER->returnFilemounts(); (see typo3/init.php)
$f_ext array Array with information about allowed and denied file extensions. Typically passed: $TYPO3_CONF_VARS['BE']['fileExtensions']
Returns: void
  @see typo3/init.php, t3lib_userAuthGroup::returnFilemounts()

function getTotalFileInfo($wholePath)

Returns an array with a whole lot of fileinformation.

$wholePath string Filepath to existing file. Should probably be absolute. Filefunctions are performed on this value.
Returns: array Information about the file in the filepath

function is_allowed($iconkey,$type)

Checks if a $iconkey (fileextension) is allowed according to $this->f_ext.

$iconkey string The extension to check, eg. "php" or "html" etc.
$type string Either "webspage" or "ftpspace" - points to a key in $this->f_ext
Returns: boolean True if file extension is allowed.

function checkIfFullAccess($theDest)

Returns true if you can operate of ANY file ('*') in the space $theDest is in ('webspace' / 'ftpspace')

$theDest string Absolute path
Returns: boolean

function is_webpath($path)

Checks if $this->webPath (should be TYPO3_DOCUMENT_ROOT) is in the first part of $path
Returns true also if $this->init is not set or if $path is empty...

$path string Absolute path to check
Returns: boolean

function checkIfAllowed($ext, $theDest, $filename='')

If the filename is given, check it against the TYPO3_CONF_VARS[BE][fileDenyPattern] +
Checks if the $ext fileextension is allowed in the path $theDest (this is based on whether $theDest is below the $this->webPath)

$ext string File extension, eg. "php" or "html"
$theDest string Absolute path for which to test
$filename='' string Filename to check against TYPO3_CONF_VARS[BE][fileDenyPattern]
Returns: boolean True if extension/filename is allowed

function checkFileNameLen($fileName)

Returns true if the input filename string is shorter than $this->maxInputNameLen.

$fileName string Filename, eg "somefile.html"
Returns: boolean

function is_directory($theDir)

Cleans $theDir for slashes in the end of the string and returns the new path, if it exists on the server.

$theDir string Directory path to check
Returns: string Returns the cleaned up directory name if OK, otherwise false.

function isPathValid($theFile)

Wrapper for t3lib_div::validPathStr()

$theFile string Filepath to evaluate
Returns: boolean True, if no '//', '..' or '\' is in the $theFile
  @see t3lib_div::validPathStr()

function getUniqueName($theFile, $theDest, $dontCheckForUnique=0)

Returns the destination path/filename of a unique filename/foldername in that path.
If $theFile exists in $theDest (directory) the file have numbers appended up to $this->maxNumber. Hereafter a unique string will be appended.
This function is used by fx. TCEmain when files are attached to records and needs to be uniquely named in the uploads/* folders

$theFile string The input filename to check
$theDest string The directory for which to return a unique filename for $theFile. $theDest MUST be a valid directory. Should be absolute.
$dontCheckForUnique=0 boolean If set the filename is returned with the path prepended without checking whether it already existed!
Returns: string The destination absolute filepath (not just the name!) of a unique filename/foldername in that path.
  @see t3lib_TCEmain::checkValue()

function checkPathAgainstMounts($thePath)

Checks if $thePath is a path under one of the paths in $this->mounts
See comment in the header of this class.

$thePath string $thePath MUST HAVE a trailing '/' in order to match correctly with the mounts
Returns: string The key to the first mount found, otherwise nothing is returned.
  @see init()

function findFirstWebFolder()

Find first web folder (relative to PATH_site.'fileadmin') in filemounts array

Returns: string The key to the first mount inside PATH_site."fileadmin" found, otherwise nothing is returned.

function blindPath($thePath)

Removes filemount part of a path, thus blinding the position.
Takes a path, $thePath, and removes the part of the path which equals the filemount.

$thePath string $thePath is a path which MUST be found within one of the internally set filemounts, $this->mounts
Returns: string The processed input path

function findTempFolder()

Find temporary folder
Finds the first $this->tempFN ('_temp_' usually) -folder in the internal array of filemounts, $this->mounts

Returns: string Returns the path if found, otherwise nothing if error.

function cleanDirectoryName($theDir)

Removes all dots, slashes and spaces after a path...

$theDir string Input string
Returns: string Output string

function rmDoubleSlash($string)

Converts any double slashes (//) to a single slash (/)

$string string Input value
Returns: string Returns the converted string

function slashPath($path)

Returns a string which has a slash '/' appended if it doesn't already have that slash

$path string Input string
Returns: string Output string with a slash in the end (if not already there)

function cleanFileName($fileName,$charset='')

Returns a string where any character not matching [.a-zA-Z0-9_-] is substituted by '_'

$fileName string Input string, typically the body of a filename
$charset='' string Charset of the a filename (defaults to current charset; depending on context)
Returns: string Output string with any characters not matching [.a-zA-Z0-9_-] is substituted by '_'

function formatSize($sizeInBytes)

Formats an integer, $sizeInBytes, to Mb or Kb or just bytes

$sizeInBytes integer Bytes to be formated
Returns: string Formatted with M,K or &nbsp;&nbsp; appended.

class.t3lib_bedisplaylog.php

This class holds some functions used to display the sys_log table-content.
Used in the status-scripts and the log-module.

Filesize: 8.1 K
Func/Classes: 11
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@package TYPO3
@subpackage t3lib
@see tx_belog_webinfo, SC_mod_tools_log_index

class t3lib_BEDisplayLog

This class holds some functions used to display the sys_log table-content.
Used in the status-scripts and the log-module.

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @package TYPO3
  @subpackage t3lib
  @see tx_belog_webinfo, SC_mod_tools_log_index

function initArray()

Initialize the log table array with header labels.

Returns: array

function getTimeLabel($code)

Get time label for log listing

$code integer Timestamp to display
Returns: string If the timestamp was also shown last time, then "." is returned. Otherwise the new timestamp formatted with ->doc->formatTime()

function getUserLabel($code,$workspace=0)

Get user name label for log listing

$code integer be_user uid
$workspace=0 integer Workspace ID
Returns: string If username is different from last username then the username, otherwise "."

function getTypeLabel($code)

Get type label for log listing

$code string Key for the type label in locallang
Returns: string If labe is different from last type label then the label is returned, otherwise "."

function getActionLabel($code)

Get action label for log listing

$code string Key for the action label in locallang
Returns: string If labe is different from last action label then the label is returned, otherwise "."

function getDetails($code,$text,$data,$sys_log_uid=0)

Get details for the log entry

$code string Suffix to "msg_" to get label from locallang.
$text string Details text
$data array Data array
$sys_log_uid=0 integer sys_log uid number
Returns: string Text string
  @see formatDetailsForList()

function reset()

Reset all internal "last..." variables to blank string.

Returns: void

function getErrorFormatting($sign, $error=0)

Formats input string in red-colored font tags

$sign string Input value
$error=0 integer Error value
Returns: string Input wrapped in red font-tag and bold

function formatDetailsForList($row)

Formatting details text for the sys_log row inputted

$row array sys_log row
Returns: string Details string

function stripPath($inArr)

For all entries in the $inArray (expected to be filepaths) the basename is extracted and set as value (if $this->stripPath is set)
This is done for log-entries from the FILE modules

$inArr array Array of file paths
Returns: array
  @see formatDetailsForList()

class.t3lib_befunc.php

Standard functions available for the TYPO3 backend.
Don't instantiate - call functions with "t3lib_BEfunc::" prefixed the function name.

Filesize: 139 K
Func/Classes: 100
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@package TYPO3
@subpackage t3lib

class t3lib_BEfunc

Standard functions available for the TYPO3 backend.
Don't instantiate - call functions with "t3lib_BEfunc::" prefixed the function name.

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @package TYPO3
  @subpackage t3lib

function deleteClause($table,$tableAlias='')

Returns the WHERE clause " AND NOT [tablename].[deleted-field]" if a deleted-field is configured in $TCA for the tablename, $table
This function should ALWAYS be called in the backend for selection on tables which are configured in TCA since it will ensure consistent selection of records, even if they are marked deleted (in which case the system must always treat them as non-existent!)
In the frontend a function, ->enableFields(), is known to filter hidden-field, start- and endtime and fe_groups as well. But that is a job of the frontend, not the backend. If you need filtering on those fields as well in the backend you can use ->BEenableFields() though.
Usage: 71

$table string Table name present in $TCA
$tableAlias='' string Table alias if any
Returns: string WHERE clause for filtering out deleted records, eg " AND tablename.deleted=0"

function getRecord($table,$uid,$fields='*',$where='')

Gets record with uid=$uid from $table
You can set $field to a list of fields (default is '*')
Additional WHERE clauses can be added by $where (fx. ' AND blabla=1')
Will automatically check if records has been deleted and if so, not return anything.
$table must be found in $TCA
Usage: 99

$table string Table name present in $TCA
$uid integer UID of record
$fields='*' string List of fields to select
$where='' string Additional WHERE clause, eg. " AND blablabla=0"
Returns: array Returns the row if found, otherwise nothing

function getRecordWSOL($table,$uid,$fields='*',$where='')

Like getRecord(), but overlays workspace version if any.

$table string Table name present in $TCA
$uid integer UID of record
$fields='*' string List of fields to select
$where='' string Additional WHERE clause, eg. " AND blablabla=0"
Returns: array Returns the row if found, otherwise nothing

function getRecordRaw($table,$where='',$fields='*')

Returns the first record found from $table with $where as WHERE clause
This function does NOT check if a record has the deleted flag set.
$table does NOT need to be configured in $TCA
The query used is simply this:
$query='SELECT '.$fields.' FROM '.$table.' WHERE '.$where;
Usage: 5 (ext: sys_todos)

$table string Table name (not necessarily in TCA)
$where='' string WHERE clause
$fields='*' string $fields is a list of fields to select, default is '*'
Returns: array First row found, if any

function getRecordsByField($theTable,$theField,$theValue,$whereClause='',$groupBy='',$orderBy='',$limit='')

Returns records from table, $theTable, where a field ($theField) equals the value, $theValue
The records are returned in an array
If no records were selected, the function returns nothing
Usage: 8

$theTable string Table name present in $TCA
$theField string Field to select on
$theValue string Value that $theField must match
$whereClause='' string Optional additional WHERE clauses put in the end of the query. DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
$groupBy='' string Optional GROUP BY field(s), if none, supply blank string.
$orderBy='' string Optional ORDER BY field(s), if none, supply blank string.
$limit='' string Optional LIMIT value ([begin,]max), if none, supply blank string.
Returns: mixed Multidimensional array with selected records (if any is selected)

function searchQuery($searchWords,$fields,$table='')

Returns a WHERE clause which will make an AND search for the words in the $searchWords array in any of the fields in array $fields.
Usage: 0

$searchWords array Array of search words
$fields array Array of fields
$table='' string Table in which we are searching (for DBAL detection of quoteStr() method)
Returns: string WHERE clause for search
  @deprecated Use $GLOBALS['TYPO3_DB']->searchQuery() directly!

function listQuery($field,$value)

Returns a WHERE clause that can find a value ($value) in a list field ($field)
For instance a record in the database might contain a list of numbers, "34,234,5" (with no spaces between). This query would be able to select that record based on the value "34", "234" or "5" regardless of their positioni in the list (left, middle or right).
Is nice to look up list-relations to records or files in TYPO3 database tables.
Usage: 0

$field string Table field name
$value string Value to find in list
Returns: string WHERE clause for a query
  @deprecated Use $GLOBALS['TYPO3_DB']->listQuery() directly!

function splitTable_Uid($str)

Makes an backwards explode on the $str and returns an array with ($table,$uid).
Example: tt_content_45 => array('tt_content',45)
Usage: 1

$str string [tablename]_[uid] string to explode
Returns: array

function getSQLselectableList($in_list,$tablename,$default_tablename)

Returns a list of pure integers based on $in_list being a list of records with table-names prepended.
Ex: $in_list = "pages_4,tt_content_12,45" would result in a return value of "4,45" if $tablename is "pages" and $default_tablename is 'pages' as well.
Usage: 1 (t3lib_userauthgroup)

$in_list string Input list
$tablename string Table name from which ids is returned
$default_tablename string $default_tablename denotes what table the number '45' is from (if nothing is prepended on the value)
Returns: string List of ids

function BEenableFields($table,$inv=0)

Backend implementation of enableFields()
Notice that "fe_groups" is not selected for - only disabled, starttime and endtime.
Notice that deleted-fields are NOT filtered - you must ALSO call deleteClause in addition.
$GLOBALS["SIM_EXEC_TIME"] is used for date.
Usage: 5

$table string $table is the table from which to return enableFields WHERE clause. Table name must have a 'ctrl' section in $TCA.
$inv=0 boolean $inv means that the query will select all records NOT VISIBLE records (inverted selection)
Returns: string WHERE clause part

function mm_query($select,$local_table,$mm_table,$foreign_table,$whereClause='',$groupBy='',$orderBy='',$limit='')

Returns a SELECT query, selecting fields ($select) from two/three tables joined
$local_table and $mm_table is mandatory. $foreign_table is optional.
The JOIN is done with [$local_table].uid <--> [$mm_table].uid_local / [$mm_table].uid_foreign <--> [$foreign_table].uid
The function is very useful for selecting MM-relations between tables adhering to the MM-format used by TCE (TYPO3 Core Engine). See the section on $TCA in Inside TYPO3 for more details.
DEPRECATED - Use $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query() instead since that will return the result pointer while this returns the query. Using this function may make your application less fitted for DBAL later.

$select string Field list for SELECT
$local_table string Tablename, local table
$mm_table string Tablename, relation table
$foreign_table string Tablename, foreign table
$whereClause='' string Optional additional WHERE clauses put in the end of the query. DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
$groupBy='' string Optional GROUP BY field(s), if none, supply blank string.
$orderBy='' string Optional ORDER BY field(s), if none, supply blank string.
$limit='' string Optional LIMIT value ([begin,]max), if none, supply blank string.
Returns: string Full SQL query
  @deprecated
  @see t3lib_DB::exec_SELECT_mm_query()

function DBcompileInsert($table,$fields_values)

Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values.
DEPRECATED - $GLOBALS['TYPO3_DB']->INSERTquery() directly instead! But better yet, use $GLOBALS['TYPO3_DB']->exec_INSERTquery()

$table string Table name
$fields_values array Field values as key=>value pairs.
Returns: string Full SQL query for INSERT
  @deprecated

function DBcompileUpdate($table,$where,$fields_values)

Creates an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values.
DEPRECATED - $GLOBALS['TYPO3_DB']->UPDATEquery() directly instead! But better yet, use $GLOBALS['TYPO3_DB']->exec_UPDATEquery()

$table string Database tablename
$where string WHERE clause, eg. "uid=1"
$fields_values array Field values as key=>value pairs.
Returns: string Full SQL query for UPDATE
  @deprecated

function BEgetRootLine($uid,$clause='',$workspaceOL=FALSE)

Returns what is called the 'RootLine'. That is an array with information about the page records from a page id ($uid) and back to the root.
By default deleted pages are filtered.
This RootLine will follow the tree all the way to the root. This is opposite to another kind of root line known from the frontend where the rootline stops when a root-template is found.
Usage: 1

$uid integer Page id for which to create the root line.
$clause='' string $clause can be used to select other criteria. It would typically be where-clauses that stops the process if we meet a page, the user has no reading access to.
$workspaceOL=FALSE boolean If true, version overlay is applied. This must be requested specifically because it is usually only wanted when the rootline is used for visual output while for permission checking you want the raw thing!
Returns: array Root line array, all the way to the page tree root (or as far as $clause allows!)

function openPageTree($pid,$clearExpansion)

Opens the page tree to the specified page id

$pid integer Page id.
$clearExpansion boolean If set, then other open branches are closed.
Returns: void

function getRecordPath($uid, $clause, $titleLimit, $fullTitleLimit=0)

Returns the path (visually) of a page $uid, fx. "/First page/Second page/Another subpage"
Each part of the path will be limited to $titleLimit characters
Deleted pages are filtered out.
Usage: 15

$uid integer Page uid for which to create record path
$clause string $clause is additional where clauses, eg. "
$titleLimit integer Title limit
$fullTitleLimit=0 integer Title limit of Full title (typ. set to 1000 or so)
Returns: mixed Path of record (string) OR array with short/long title if $fullTitleLimit is set.

function getExcludeFields()

Returns an array with the exclude-fields as defined in TCA
Used for listing the exclude-fields in be_groups forms
Usage: 2 (t3lib_tceforms + t3lib_transferdata)

Returns: array Array of arrays with excludeFields (fieldname, table:fieldname) from all TCA entries

function getExplicitAuthFieldValues()

Returns an array with explicit Allow/Deny fields.
Used for listing these field/value pairs in be_groups forms

Returns: array Array with information from all of $TCA

function getSystemLanguages()

Returns an array with system languages:

Returns: array Array with languages

function readPageAccess($id,$perms_clause)

Returns a page record (of page with $id) with an extra field "_thePath" set to the record path IF the WHERE clause, $perms_clause, selects the record. Thus is works as an access check that returns a page record if access was granted, otherwise not.
If $id is zero a pseudo root-page with "_thePath" set is returned IF the current BE_USER is admin.
In any case ->isInWebMount must return true for the user (regardless of $perms_clause)
Usage: 21

$id integer Page uid for which to check read-access
$perms_clause string $perms_clause is typically a value generated with $BE_USER->getPagePermsClause(1);
Returns: array Returns page record if OK, otherwise false.

function getTCAtypes($table,$rec,$useFieldNameAsKey=0)

Returns the "types" configuration parsed into an array for the record, $rec, from table, $table
Usage: 6

$table string Table name (present in TCA)
$rec array Record from $table
$useFieldNameAsKey=0 boolean If $useFieldNameAsKey is set, then the fieldname is associative keys in the return array, otherwise just numeric keys.
Returns: array

function getTCAtypeValue($table,$rec)

Returns the "type" value of $rec from $table which can be used to look up the correct "types" rendering section in $TCA
If no "type" field is configured in the "ctrl"-section of the $TCA for the table, zero is used.
If zero is not an index in the "types" section of $TCA for the table, then the $fieldValue returned will default to 1 (no matter if that is an index or not)
Usage: 7

$table string Table name present in TCA
$rec array Record from $table
Returns: string Field value
  @see getTCAtypes()

function getSpecConfParts($str, $defaultExtras)

Parses a part of the field lists in the "types"-section of $TCA arrays, namely the "special configuration" at index 3 (position 4)
Elements are splitted by ":" and within those parts, parameters are splitted by "|".
Everything is returned in an array and you should rather see it visually than listen to me anymore now... Check out example in Inside TYPO3
Usage: 5

$str string Content from the "types" configuration of TCA (the special configuration) - see description of function
$defaultExtras string The ['defaultExtras'] value from field configuration
Returns: array

function getSpecConfParametersFromArray($pArr)

Takes an array of "[key]=[value]" strings and returns an array with the keys set as keys pointing to the value.
Better see it in action! Find example in Inside TYPO3
Usage: 6

$pArr array Array of "[key]=[value]" strings to convert.
Returns: array

function getFlexFormDS($conf,$row,$table,$fieldName='',$WSOL=TRUE)

Finds the Data Structure for a FlexForm field
Usage: 5

$conf array Field config array
$row array Record data
$table string The table name
$fieldName='' string Optional fieldname passed to hook object
$WSOL=TRUE boolean Boolean; If set, workspace overlay is applied to records. This is correct behaviour for all presentation and export, but NOT if you want a true reflection of how things are in the live workspace.
Returns: mixed If array, the data structure was found and returned as an array. Otherwise (string) it is an error message.
  @see t3lib_TCEforms::getSingleField_typeFlex()

function storeHash($hash,$data,$ident)

Stores the string value $data in the 'cache_hash' table with the hash key, $hash, and visual/symbolic identification, $ident
IDENTICAL to the function by same name found in t3lib_page:
Usage: 2

$hash string Hash key, 32 bytes hex
$data string $data must be serialized before function call
$ident string Visual/symbolic identification (informational only)
Returns: void

function getHash($hash,$expTime=0)

Retrieves the string content stored with hash key, $hash, in cache_hash
IDENTICAL to the function by same name found in t3lib_page:
Usage: 2

$hash string Hash key, 32 bytes hex
$expTime=0 integer $expTime represents the expire time in seconds. For instance a value of 3600 would allow cached content within the last hour, otherwise nothing is returned.
Returns: string

function getPagesTSconfig($id,$rootLine='',$returnPartArray=0)

Returns the Page TSconfig for page with id, $id
Requires class "t3lib_TSparser"
Usage: 26 (spec. in ext info_pagetsconfig)

$id integer Page uid for which to create Page TSconfig
$rootLine='' array If $rootLine is an array, that is used as rootline, otherwise rootline is just calculated
$returnPartArray=0 boolean If $returnPartArray is set, then the array with accumulated Page TSconfig is returned non-parsed. Otherwise the output will be parsed by the TypoScript parser.
Returns: array Page TSconfig
  @see t3lib_TSparser

function updatePagesTSconfig($id,$pageTS,$TSconfPrefix,$impParams='')

Updates Page TSconfig for a page with $id
The function seems to take $pageTS as an array with properties and compare the values with those that already exists for the "object string", $TSconfPrefix, for the page, then sets those values which were not present.
$impParams can be supplied as already known Page TSconfig, otherwise it's calculated.

THIS DOES NOT CHECK ANY PERMISSIONS. SHOULD IT?
More documentation is needed.

Usage: 1 (ext. direct_mail)

$id integer Page id
$pageTS array Page TS array to write
$TSconfPrefix string Prefix for object paths
$impParams='' array [Description needed.]
Returns: void
  @internal
  @see implodeTSParams(), getPagesTSconfig()

function implodeTSParams($p,$k='')

Implodes a multi dimensional TypoScript array, $p, into a one-dimentional array (return value)
Usage: 3

$p array TypoScript structure
$k='' string Prefix string
Returns: array Imploded TypoScript objectstring/values

function getUserNames($fields='username,usergroup,usergroup_cached_list,uid',$where='')

Returns an array with be_users records of all user NOT DELETED sorted by their username
Keys in the array is the be_users uid
Usage: 14 (spec. ext. "beuser" and module "web_perm")

$fields='username,usergroup,usergroup_cached_list,uid' string Optional $fields list (default: username,usergroup,usergroup_cached_list,uid) can be used to set the selected fields
$where='' string Optional $where clause (fx. "AND username='pete'") can be used to limit query
Returns: array

function getGroupNames($fields='title,uid', $where='')

Returns an array with be_groups records (title, uid) of all groups NOT DELETED sorted by their title
Usage: 8 (spec. ext. "beuser" and module "web_perm")

$fields='title,uid' string Field list
$where='' string WHERE clause
Returns: array

function getListGroupNames($fields='title,uid')

Returns an array with be_groups records (like ->getGroupNames) but:
- if the current BE_USER is admin, then all groups are returned, otherwise only groups that the current user is member of (usergroup_cached_list) will be returned.
Usage: 2 (module "web_perm" and ext. taskcenter)

$fields='title,uid' string Field list; $fields specify the fields selected (default: title,uid)
Returns: array

function blindUserNames($usernames,$groupArray,$excludeBlindedFlag=0)

Returns the array $usernames with the names of all users NOT IN $groupArray changed to the uid (hides the usernames!).
If $excludeBlindedFlag is set, then these records are unset from the array $usernames
Takes $usernames (array made by t3lib_BEfunc::getUserNames()) and a $groupArray (array with the groups a certain user is member of) as input
Usage: 8

$usernames array User names
$groupArray array Group names
$excludeBlindedFlag=0 boolean If $excludeBlindedFlag is set, then these records are unset from the array $usernames
Returns: array User names, blinded

function blindGroupNames($groups,$groupArray,$excludeBlindedFlag=0)

Corresponds to blindUserNames but works for groups instead
Usage: 2 (module web_perm)

$groups array Group names
$groupArray array Group names (reference)
$excludeBlindedFlag=0 boolean If $excludeBlindedFlag is set, then these records are unset from the array $usernames
Returns: array

function daysUntil($tstamp)

Returns the difference in days between input $tstamp and $EXEC_TIME
Usage: 2 (class t3lib_BEfunc)

$tstamp integer Time stamp, seconds
Returns: integer

function date($tstamp)

Returns $tstamp formatted as "ddmmyy" (According to $TYPO3_CONF_VARS['SYS']['ddmmyy'])
Usage: 11

$tstamp integer Time stamp, seconds
Returns: string Formatted time

function datetime($value)

Returns $tstamp formatted as "ddmmyy hhmm" (According to $TYPO3_CONF_VARS['SYS']['ddmmyy'] AND $TYPO3_CONF_VARS['SYS']['hhmm'])
Usage: 28

$value integer Time stamp, seconds
Returns: string Formatted time

function time($value)

Returns $value (in seconds) formatted as hh:mm:ss
For instance $value = 3600 + 60*2 + 3 should return "01:02:03"
Usage: 1 (class t3lib_BEfunc)

$value integer Time stamp, seconds
Returns: string Formatted time

function calcAge($seconds,$labels = 'min|hrs|days|yrs')

Returns the "age" in minutes / hours / days / years of the number of $seconds inputted.
Usage: 15

$seconds integer $seconds could be the difference of a certain timestamp and time()
$labels = 'min|hrs|days|yrs' string $labels should be something like ' min| hrs| days| yrs'. This value is typically delivered by this function call: $GLOBALS["LANG"]->sL("LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears")
Returns: string Formatted time

function dateTimeAge($tstamp,$prefix=1,$date='')

Returns a formatted timestamp if $tstamp is set.
The date/datetime will be followed by the age in parenthesis.
Usage: 3

$tstamp integer Time stamp, seconds
$prefix=1 integer 1/-1 depending on polarity of age.
$date='' string $date=="date" will yield "dd:mm:yy" formatting, otherwise "dd:mm:yy hh:mm"
Returns: string

function titleAttrib($content='',$hsc=0)

Returns either title='' or alt='' attribute. This depends on the client browser and whether it supports title='' or not (which is the default)
If no $content is given only the attribute name is returned.
The returned attribute with content will have a leading space char.
Warning: Be careful to submit empty $content var - that will return just the attribute name!
Usage: 0

$content='' string String to set as title-attribute. If no $content is given only the attribute name is returned.
$hsc=0 boolean If $hsc is set, then content of the attribute is htmlspecialchar()'ed (which is good for XHTML and other reasons...)
Returns: string
  @deprecated The idea made sense with older browsers, but now all browsers should support the "title" attribute - so just hardcode the title attribute instead!

function titleAltAttrib($content)

Returns alt="" and title="" attributes with the value of $content.
Usage: 7

$content string Value for 'alt' and 'title' attributes (will be htmlspecialchars()'ed before output)
Returns: string

function thumbCode($row,$table,$field,$backPath,$thumbScript='',$uploaddir=NULL,$abs=0,$tparams='',$size='')

Returns a linked image-tag for thumbnail(s)/fileicons/truetype-font-previews from a database row with a list of image files in a field
All $TYPO3_CONF_VARS['GFX']['imagefile_ext'] extension are made to thumbnails + ttf file (renders font-example)
Thumbsnails are linked to the show_item.php script which will display further details.
Usage: 7

$row array $row is the database row from the table, $table.
$table string Table name for $row (present in TCA)
$field string $field is pointing to the field with the list of image files
$backPath string Back path prefix for image tag src="" field
$thumbScript='' string Optional: $thumbScript os by default 'thumbs.php' if you don't set it otherwise
$uploaddir=NULL string Optional: $uploaddir is the directory relative to PATH_site where the image files from the $field value is found (Is by default set to the entry in $TCA for that field! so you don't have to!)
$abs=0 boolean If set, uploaddir is NOT prepended with "../"
$tparams='' string Optional: $tparams is additional attributes for the image tags
$size='' integer Optional: $size is [w]x[h] of the thumbnail. 56 is default.
Returns: string Thumbnail image tag.

function getThumbNail($thumbScript,$theFile,$tparams='',$size='')

Returns single image tag to thumbnail using a thumbnail script (like thumbs.php)
Usage: 3

$thumbScript string $thumbScript must point to "thumbs.php" relative to the script position
$theFile string $theFile must be the proper reference to the file thumbs.php should show
$tparams='' string $tparams are additional attributes for the image tag
$size='' integer $size is the size of the thumbnail send along to "thumbs.php"
Returns: string Image tag

function titleAttribForPages($row,$perms_clause='',$includeAttrib=1)

Returns title-attribute information for a page-record informing about id, alias, doktype, hidden, starttime, endtime, fe_group etc.
Usage: 8

$row array Input must be a page row ($row) with the proper fields set (be sure - send the full range of fields for the table)
$perms_clause='' string $perms_clause is used to get the record path of the shortcut page, if any (and doktype==4)
$includeAttrib=1 boolean If $includeAttrib is set, then the 'title=""' attribute is wrapped about the return value, which is in any case htmlspecialchar()'ed already
Returns: string

function getRecordIconAltText($row,$table='pages')

Returns title-attribute information for ANY record (from a table defined in TCA of course)
The included information depends on features of the table, but if hidden, starttime, endtime and fe_group fields are configured for, information about the record status in regard to these features are is included.
"pages" table can be used as well and will return the result of ->titleAttribForPages() for that page.
Usage: 10

$row array Table row; $row is a row from the table, $table
$table='pages' string Table name
Returns: string

function getLabelFromItemlist($table,$col,$key)

Returns the label of the first found entry in an "items" array from $TCA (tablename=$table/fieldname=$col) where the value is $key
Usage: 9

$table string Table name, present in $TCA
$col string Field name, present in $TCA
$key string items-array value to match
Returns: string Label for item entry

function getItemLabel($table,$col,$printAllWrap='')

Returns the label-value for fieldname $col in table, $table
If $printAllWrap is set (to a "wrap") then it's wrapped around the $col value IF THE COLUMN $col DID NOT EXIST in TCA!, eg. $printAllWrap='<b>|</b>' and the fieldname was 'not_found_field' then the return value would be '<b>not_found_field</b>'
Usage: 17

$table string Table name, present in $TCA
$col string Field name
$printAllWrap='' string Wrap value - set function description
Returns: string

function getRecordTitle($table,$row,$prep=0)

Returns the "title"-value in record, $row, from table, $table
The field(s) from which the value is taken is determined by the "ctrl"-entries 'label', 'label_alt' and 'label_alt_force'
Usage: 26

$table string Table name, present in TCA
$row array Row from table
$prep=0 boolean If set, result is prepared for output: The output is cropped to a limited lenght (depending on BE_USER->uc['titleLen']) and if no value is found for the title, '<em>[No title]</em>' is returned (localized). Further, the output is htmlspecialchars()'ed
Returns: string

function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0,$noRecordLookup=FALSE,$uid=0)

Returns a human readable output of a value from a record
For instance a database record relation would be looked up to display the title-value of that record. A checkbox with a "1" value would be "Yes", etc.
$table/$col is tablename and fieldname
REMEMBER to pass the output through htmlspecialchars() if you output it to the browser! (To protect it from XSS attacks and be XHTML compliant)
Usage: 24

$table string Table name, present in TCA
$col string Field name, present in TCA
$value string $value is the value of that field from a selected record
$fixed_lgd_chars=0 integer $fixed_lgd_chars is the max amount of characters the value may occupy
$defaultPassthrough=0 boolean $defaultPassthrough flag means that values for columns that has no conversion will just be pass through directly (otherwise cropped to 200 chars or returned as "N/A")
$noRecordLookup=FALSE boolean If set, no records will be looked up, UIDs are just shown.
$uid=0 integer uid of the current record
Returns: string

function getProcessedValueExtra($table,$fN,$fV,$fixed_lgd_chars=0,$uid=0)

Same as ->getProcessedValue() but will go easy on fields like "tstamp" and "pid" which are not configured in TCA - they will be formatted by this function instead.
Usage: 2

$table string Table name, present in TCA
$fN string Field name
$fV string Field value
$fixed_lgd_chars=0 integer $fixed_lgd_chars is the max amount of characters the value may occupy
$uid=0 integer uid of the current record
Returns: string
  @see getProcessedValue()

function getFileIcon($ext)

Returns file icon name (from $FILEICONS) for the fileextension $ext
Usage: 10

$ext string File extension, lowercase
Returns: string File icon filename

function getCommonSelectFields($table,$prefix='')

Returns fields for a table, $table, which would typically be interesting to select
This includes uid, the fields defined for title, icon-field.
Returned as a list ready for query ($prefix can be set to eg. "pages." if you are selecting from the pages table and want the table name prefixed)
Usage: 3

$table string Table name, present in TCA
$prefix='' string Table prefix
Returns: string List of fields.

function makeConfigForm($configArray,$defaults,$dataPrefix)

Makes a form for configuration of some values based on configuration found in the array $configArray, with default values from $defaults and a data-prefix $dataPrefix
<form>-tags must be supplied separately
Needs more documentation and examples, in particular syntax for configuration array. See Inside TYPO3. That's were you can expect to find example, if anywhere.
Usage: 1 (ext. direct_mail)

$configArray array Field configuration code.
$defaults array Defaults
$dataPrefix string Prefix for formfields
Returns: string HTML for a form.

function helpTextIcon($table,$field,$BACK_PATH,$force=0)

Returns help-text icon if configured for.
TCA_DESCR must be loaded prior to this function and $BE_USER must have 'edit_showFieldHelp' set to 'icon', otherwise nothing is returned
Usage: 6

$table string Table name
$field string Field name
$BACK_PATH string Back path
$force=0 boolean Force display of icon nomatter BE_USER setting for help
Returns: string HTML content for a help icon/text

function helpText($table,$field,$BACK_PATH,$styleAttrib='')

Returns CSH help text (description), if configured for.
TCA_DESCR must be loaded prior to this function and $BE_USER must have "edit_showFieldHelp" set to "text", otherwise nothing is returned
Will automatically call t3lib_BEfunc::helpTextIcon() to get the icon for the text.
Usage: 4

$table string Table name
$field string Field name
$BACK_PATH string Back path
$styleAttrib='' string Additional style-attribute content for wrapping table
Returns: string HTML content for help text

function cshItem($table,$field,$BACK_PATH,$wrap='',$onlyIconMode=FALSE, $styleAttrib='')

API for getting CSH icons/text for use in backend modules.
TCA_DESCR will be loaded if it isn't already
Usage: ?

$table string Table name ('_MOD_'+module name)
$field string Field name (CSH locallang main key)
$BACK_PATH string Back path
$wrap='' string Wrap code for icon-mode, splitted by "|". Not used for full-text mode.
$onlyIconMode=FALSE boolean If set, the full text will never be shown (only icon). Useful for places where it will break the page if the table with full text is shown.
$styleAttrib='' string Additional style-attribute content for wrapping table (full text mode only)
Returns: string HTML content for help text
  @see helpText(), helpTextIcon()

function editOnClick($params,$backPath='',$requestUri='')

Returns a JavaScript string (for an onClick handler) which will load the alt_doc.php script that shows the form for editing of the record(s) you have send as params.
REMEMBER to always htmlspecialchar() content in href-properties to ampersands get converted to entities (XHTML requirement and XSS precaution)
Usage: 35

$params string $params is parameters sent along to alt_doc.php. This requires a much more details description which you must seek in Inside TYPO3s documentation of the alt_doc.php API. And example could be '&edit[pages][123]=edit' which will show edit form for page record 123.
$backPath='' string $backPath must point back to the TYPO3_mainDir directory (where alt_doc.php is)
$requestUri='' string $requestUri is an optional returnUrl you can set - automatically set to REQUEST_URI.
Returns: string
  @see template::issueCommand()

function viewOnClick($id,$backPath='',$rootLine='',$anchor='',$altUrl='',$addGetVars='',$switchFocus=TRUE)

Returns a JavaScript string for viewing the page id, $id
It will detect the correct domain name if needed and provide the link with the right back path. Also it will re-use any window already open.
Usage: 8

$id integer $id is page id
$backPath='' string $backpath must point back to TYPO3_mainDir (where the site is assumed to be one level above)
$rootLine='' array If root line is supplied the function will look for the first found domain record and use that URL instead (if found)
$anchor='' string $anchor is optional anchor to the URL
$altUrl='' string $altUrl is an alternative URL which - if set - will make all other parameters ignored: The function will just return the window.open command wrapped around this URL!
$addGetVars='' string Additional GET variables.
$switchFocus=TRUE boolean If true, then the preview window will gain the focus.
Returns: string

function getModTSconfig($id,$TSref)

Returns the merged User/Page TSconfig for page id, $id.
Please read details about module programming elsewhere!
Usage: 15

$id integer Page uid
$TSref string $TSref is an object string which determines the path of the TSconfig to return.
Returns: array

function getFuncMenu($mainParams,$elementName,$currentValue,$menuItems,$script='',$addparams='')

Returns a selector box "function menu" for a module
Requires the JS function jumpToUrl() to be available
See Inside TYPO3 for details about how to use / make Function menus
Usage: 50

$mainParams mixed $id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
$elementName string $elementName it the form elements name, probably something like "SET[...]"
$currentValue string $currentValue is the value to be selected currently.
$menuItems array $menuItems is an array with the menu items for the selector box
$script='' string $script is the script to send the &id to, if empty it's automatically found
$addparams='' string $addParams is additional parameters to pass to the script.
Returns: string HTML code for selector box

function getFuncCheck($mainParams,$elementName,$currentValue,$script='',$addparams='',$tagParams='')

Checkbox function menu.
Works like ->getFuncMenu() but takes no $menuItem array since this is a simple checkbox.
Usage: 34

$mainParams mixed $mainParams $id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
$elementName string $elementName it the form elements name, probably something like "SET[...]"
$currentValue string $currentValue is the value to be selected currently.
$script='' string $script is the script to send the &id to, if empty it's automatically found
$addparams='' string $addParams is additional parameters to pass to the script.
$tagParams='' string Additional attributes for the checkbox input tag
Returns: string HTML code for checkbox
  @see getFuncMenu()

function getFuncInput($mainParams,$elementName,$currentValue,$size=10,$script="",$addparams="")

Input field function menu
Works like ->getFuncMenu() / ->getFuncCheck() but displays a input field instead which updates the script "onchange"
Usage: 1

$mainParams mixed $id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
$elementName string $elementName it the form elements name, probably something like "SET[...]"
$currentValue string $currentValue is the value to be selected currently.
$size=10 integer Relative size of input field, max is 48
$script="" string $script is the script to send the &id to, if empty it's automatically found
$addparams="" string $addParams is additional parameters to pass to the script.
Returns: string HTML code for input text field.
  @see getFuncMenu()

function unsetMenuItems($modTSconfig,$itemArray,$TSref)

Removes menu items from $itemArray if they are configured to be removed by TSconfig for the module ($modTSconfig)
See Inside TYPO3 about how to program modules and use this API.
Usage: 4

$modTSconfig array Module TS config array
$itemArray array Array of items from which to remove items.
$TSref string $TSref points to the "object string" in $modTSconfig
Returns: array The modified $itemArray is returned.

function getSetUpdateSignal($set='')

Call to update the page tree frame (or something else..?) after
t3lib_BEfunc::getSetUpdateSignal('updatePageTree') -> will set the page tree to be updated.
t3lib_BEfunc::getSetUpdateSignal() -> will return some JavaScript that does the update (called in the typo3/template.php file, end() function)
Usage: 11

$set='' string Whether to set or clear the update signal. When setting, this value contains strings telling WHAT to set. At this point it seems that the value "updatePageTree" is the only one it makes sense to set.
Returns: string HTML code (<script> section)

function getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')

Returns an array which is most backend modules becomes MOD_SETTINGS containing values from function menus etc. determining the function of the module.
This is kind of session variable management framework for the backend users.
If a key from MOD_MENU is set in the CHANGED_SETTINGS array (eg. a value is passed to the script from the outside), this value is put into the settings-array
Ultimately, see Inside TYPO3 for how to use this function in relation to your modules.
Usage: 23

$MOD_MENU array MOD_MENU is an array that defines the options in menus.
$CHANGED_SETTINGS array CHANGED_SETTINGS represents the array used when passing values to the script from the menus.
$modName string modName is the name of this module. Used to get the correct module data.
$type='' string If type is 'ses' then the data is stored as session-lasting data. This means that it'll be wiped out the next time the user logs in.
$dontValidateList='' string dontValidateList can be used to list variables that should not be checked if their value is found in the MOD_MENU array. Used for dynamically generated menus.
$setDefaultList='' string List of default values from $MOD_MENU to set in the output array (only if the values from MOD_MENU are not arrays)
Returns: array The array $settings, which holds a key for each MOD_MENU key and the values of each key will be within the range of values for each menuitem

function compilePreviewKeyword($getVarsStr, $beUserUid, $ttl=172800)

Set preview keyword, eg:
$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('id='.$pageId.'&L='.$language.'&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS='.$this->workspace, $GLOBALS['BE_USER']->user['uid'], 120);

todo for sys_preview:
- Add a comment which can be shown to previewer in frontend in some way (plus maybe ability to write back, take other action?)
- Add possibility for the preview keyword to work in the backend as well: So it becomes a quick way to a certain action of sorts?

$getVarsStr string Get variables to preview, eg. 'id=1150&L=0&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=8'
$beUserUid string 32 byte MD5 hash keyword for the URL: "?ADMCMD_prev=[keyword]"
$ttl=172800 integer Time-To-Live for keyword
Returns: string Returns keyword to use in URL for ADMCMD_prev=

function lockRecords($table='',$uid=0,$pid=0)

Unlock or Lock a record from $table with $uid
If $table and $uid is not set, then all locking for the current BE_USER is removed!
Usage: 5

$table='' string Table name
$uid=0 integer Record uid
$pid=0 integer Record pid
Returns: void
  @internal
  @see t3lib_transferData::lockRecord(), alt_doc.php, db_layout.php, db_list.php, wizard_rte.php

function isRecordLocked($table,$uid)

Returns information about whether the record from table, $table, with uid, $uid is currently locked (edited by another user - which should issue a warning).
Notice: Locking is not strictly carried out since locking is abandoned when other backend scripts are activated - which means that a user CAN have a record "open" without having it locked. So this just serves as a warning that counts well in 90% of the cases, which should be sufficient.
Usage: 5

$table string Table name
$uid integer Record uid
Returns: array
  @internal
  @see class.db_layout.inc, alt_db_navframe.php, alt_doc.php, db_layout.php

function exec_foreign_table_where_query($fieldValue,$field='',$TSconfig=array(),$prefix='')

Returns select statement for MM relations (as used by TCEFORMs etc)
Usage: 3

$fieldValue array Configuration array for the field, taken from $TCA
$field='' string Field name
$TSconfig=array() array TSconfig array from which to get further configuration settings for the field name
$prefix='' string Prefix string for the key "*foreign_table_where" from $fieldValue array
Returns: string Part of query
  @internal
  @see t3lib_transferData::renderRecord(), t3lib_TCEforms::foreignTable()

function getTCEFORM_TSconfig($table,$row)

Returns TSConfig for the TCEFORM object in Page TSconfig.
Used in TCEFORMs
Usage: 4

$table string Table name present in TCA
$row array Row from table
Returns: array
  @see t3lib_transferData::renderRecord(), t3lib_TCEforms::setTSconfig(), SC_wizard_list::main(), SC_wizard_add::main()

function getTSconfig_pidValue($table,$uid,$pid)

Find the real PID of the record (with $uid from $table). This MAY be impossible if the pid is set as a reference to the former record or a page (if two records are created at one time).
NOTICE: Make sure that the input PID is never negativ because the record was an offline version! Therefore, you should always use t3lib_BEfunc::fixVersioningPid($table,$row); on the data you input before calling this function!
Usage: 2

$table string Table name
$uid integer Record uid
$pid integer Record pid, could be negative then pointing to a record from same table whos pid to find and return.
Returns: integer
  @internal
  @see t3lib_TCEmain::copyRecord(), getTSCpid()

function getPidForModTSconfig($table,$uid,$pid)

Return $uid if $table is pages and $uid is integer - otherwise the $pid
Usage: 1

$table string Table name
$uid integer Record uid
$pid integer Record pid
Returns: integer
  @internal
  @see t3lib_TCEforms::getTSCpid()

function getTSCpid($table,$uid,$pid)

Returns the REAL pid of the record, if possible. If both $uid and $pid is strings, then pid=-1 is returned as an error indication.
Usage: 8

$table string Table name
$uid integer Record uid
$pid integer Record pid
Returns: array Array of two integers; first is the REAL PID of a record and if its a new record negative values are resolved to the true PID, second value is the PID value for TSconfig (uid if table is pages, otherwise the pid)
  @internal
  @see t3lib_TCEmain::setHistory(), t3lib_TCEmain::process_datamap()

function firstDomainRecord($rootLine)

Returns first found domain record "domainName" (without trailing slash) if found in the input $rootLine
Usage: 2

$rootLine array Root line array
Returns: string Domain name, if found.

function getDomainStartPage($domain, $path='')

Returns the sys_domain record for $domain, optionally with $path appended.
Usage: 2

$domain string Domain name
$path='' string Appended path
Returns: array Domain record, if found

function RTEsetup($RTEprop,$table,$field,$type='')

Returns overlayered RTE setup from an array with TSconfig. Used in TCEforms and TCEmain
Usage: 8

$RTEprop array The properties of Page TSconfig in the key "RTE."
$table string Table name
$field string Field name
$type='' string Type value of the current record (like from CType of tt_content)
Returns: array Array with the configuration for the RTE
  @internal

function &RTEgetObj()

Returns first possible RTE object if available.
Usage: $RTEobj = &t3lib_BEfunc::RTEgetObj();

Returns: mixed If available, returns RTE object, otherwise an array of messages from possible RTEs

function &softRefParserObj($spKey)

Returns soft-reference parser for the softRef processing type
Usage: $softRefObj = &t3lib_BEfunc::softRefParserObj('[parser key]');

$spKey string softRef parser key
Returns: mixed If available, returns Soft link parser object.

function explodeSoftRefParserList($parserList)

Returns array of soft parser references

$parserList string softRef parser list
string Table name
string Field name
Returns: array Array where the parser key is the key and the value is the parameter string

function isModuleSetInTBE_MODULES($modName)

Returns true if $modName is set and is found as a main- or submodule in $TBE_MODULES array
Usage: 1

$modName string Module name
Returns: boolean

function referenceCount($table,$ref,$msg='')

Counting references to a record/file

$table string Table name (or "_FILE" if its a file)
$ref string Reference: If table, then integer-uid, if _FILE, then file reference (relative to PATH_site)
$msg='' string Message with %s, eg. "There were %s records pointing to this file!"
Returns: string Output string (or integer count value if no msg string specified)

function selectVersionsOfRecord($table, $uid, $fields='*', $workspace=0)

Select all versions of a record, ordered by version id (DESC)

$table string Table name to select from
$uid integer Record uid for which to find versions.
$fields='*' string Field list to select
$workspace=0 integer Workspace ID, if zero all versions regardless of workspace is found.
Returns: array Array of versions of table/uid

function fixVersioningPid($table,&$rr,$ignoreWorkspaceMatch=FALSE)

Find page-tree PID for versionized record
Will look if the "pid" value of the input record is -1 and if the table supports versioning - if so, it will translate the -1 PID into the PID of the original record
Used whenever you are tracking something back, like making the root line.
Will only translate if the workspace of the input record matches that of the current user (unless flag set)
Principle; Record offline! => Find online?

$table string Table name
&$rr array Record array passed by reference. As minimum, "pid" and "uid" fields must exist! "t3ver_oid" and "t3ver_wsid" is nice and will save you a DB query.
$ignoreWorkspaceMatch=FALSE boolean Ignore workspace match
Returns: void (Passed by ref). If the record had its pid corrected to the online versions pid, then "_ORIG_pid" is set to the original pid value (-1 of course). The field "_ORIG_pid" is used by various other functions to detect if a record was in fact in a versionized branch.
  @see t3lib_page::fixVersioningPid()

function workspaceOL($table,&$row,$wsid=-99)

Workspace Preview Overlay
Generally ALWAYS used when records are selected based on uid or pid. If records are selected on other fields than uid or pid (eg. "email = ....") then usage might produce undesired results and that should be evaluated on individual basis.
Principle; Record online! => Find offline?

$table string Table name
&$row array Record array passed by reference. As minimum, the "uid", "pid" and "t3ver_swapmode" (pages) fields must exist! Fake fields cannot exist since the fields in the array is used as field names in the SQL look up.
$wsid=-99 integer Workspace ID, if not specified will use $GLOBALS['BE_USER']->workspace
Returns: void (Passed by ref).
  @see fixVersioningPid()

function getWorkspaceVersionOfRecord($workspace, $table, $uid, $fields='*')

Select the workspace version of a record, if exists

$workspace integer Workspace ID
$table string Table name to select from
$uid integer Record uid for which to find workspace version.
$fields='*' string Field list to select
Returns: array If found, return record, otherwise false

function getLiveVersionOfRecord($table,$uid,$fields='*')

Returns live version of record

$table string Table name
$uid integer Record UID of draft, offline version
$fields='*' string Field list, default is *
Returns: array If found, the record, otherwise nothing.

function isPidInVersionizedBranch($pid, $table='',$returnStage=FALSE)

Will fetch the rootline for the pid, then check if anywhere in the rootline there is a branch point and if so everything is allowed of course.
Alternatively; if the page of the PID itself is a version and swapmode is zero (page+content) then tables from versioning_followPages are allowed as well.

$pid integer Page id inside of which you want to edit/create/delete something.
$table='' string Table name you are checking for. If you don't give the table name ONLY "branch" types are found and returned true. Specifying table you might also get a positive response if the pid is a "page" versioning type AND the table has "versioning_followPages" set.
$returnStage=FALSE boolean If set, the keyword "branchpoint" or "first" is not returned by rather the "t3ver_stage" value of the branch-point.
Returns: mixed Returns either "branchpoint" (if branch) or "first" (if page) or false if nothing. Alternatively, it returns the value of "t3ver_stage" for the branchpoint (if any)

function versioningPlaceholderClause($table)

Will return where clause de-selecting new-versions from other workspaces.

$table string Table name
Returns: string Where clause if applicable.

function countVersionsOfRecordsOnPage($workspace,$pageId, $allTables=FALSE)

Count number of versions on a page

$workspace integer Workspace ID
$pageId integer Page ID
$allTables=FALSE boolean If set, then all tables and not only "versioning_followPages" are found (except other pages)
Returns: array Overview of records

function wsMapId($table,$uid)

Performs mapping of new uids to new versions UID in case of import inside a workspace.

$table string Table name
$uid integer Record uid (of live record placeholder)
Returns: integer Uid of offline version if any, otherwise live uid.

function typo3PrintError($header,$text,$js='',$head=1)

Print error message with header, text etc.
Usage: 19

$header string Header string
$text string Content string
$js='' boolean Will return an alert() with the content of header and text.
$head=1 boolean Print header.
Returns: void

function TYPO3_copyRightNotice()

Prints TYPO3 Copyright notice for About Modules etc. modules.

Returns: void

function displayWarningMessages()

Display some warning messages if this installation is obviously insecure!!
These warnings are only displayed to admin users

Returns: void

function getPathType_web_nonweb($path)

Returns "web" if the $path (absolute) is within the DOCUMENT ROOT - and thereby qualifies as a "web" folder.
Usage: 4

$path string Path to evaluate
Returns: boolean

function ADMCMD_previewCmds($pageinfo)

Creates ADMCMD parameters for the "viewpage" extension / "cms" frontend
Usage: 1

$pageinfo array Page record
Returns: string Query-parameters
  @internal

function processParams($params)

Returns an array with key=>values based on input text $params
$params is exploded by line-breaks and each line is supposed to be on the syntax [key] = [some value]
These pairs will be parsed into an array an returned.
Usage: 1

$params string String of parameters on multiple lines to parse into key-value pairs (see function description)
Returns: array

function getListOfBackendModules($name,$perms_clause,$backPath='',$script='index.php')

Returns "list of backend modules". Most likely this will be obsolete soon / removed. Don't use.
Usage: 3

$name array Module names in array. Must be "addslashes()"ed
$perms_clause string Perms clause for SQL query
$backPath='' string Backpath
$script='index.php' string The URL/script to jump to (used in A tag)
Returns: array Two keys, rows and list
  @internal
  @deprecated
  @obsolete

class.t3lib_beuserauth.php

TYPO3 user authentication, backend
Could technically have been the same class as t3lib_userauthgroup since these two are always used together and only together.
t3lib_userauthgroup contains most of the functions used for checking permissions, authenticating users, setting up the user etc. This class is most interesting in terms of an API for user from outside.
This class contains the configuration of the database fields used plus some functions for the authentication process of backend users.

Filesize: 13.9 K
Func/Classes: 10
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@package TYPO3
@subpackage t3lib

class t3lib_beUserAuth extends t3lib_userAuthGroup

TYPO3 user authentication, backend
Could technically have been the same class as t3lib_userauthgroup since these two are always used together and only together.
t3lib_userauthgroup contains most of the functions used for checking permissions, authenticating users, setting up the user etc. This class is most interesting in terms of an API for user from outside.
This class contains the configuration of the database fields used plus some functions for the authentication process of backend users.

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @package TYPO3
  @subpackage t3lib

function trackBeUser($flag)

If flag is set and the extensions 'beuser_tracking' is loaded, this will insert a table row with the REQUEST_URI of current script - thus tracking the scripts the backend users uses...
This function works ONLY with the "beuser_tracking" extension and is deprecated since it does nothing useful.

$flag boolean Activate insertion of the URL.
Returns: void

function checkLockToIP()

If TYPO3_CONF_VARS['BE']['enabledBeUserIPLock'] is enabled and an IP-list is found in the User TSconfig objString "options.lockToIP", then make an IP comparison with REMOTE_ADDR and return the outcome (true/false)

Returns: boolean True, if IP address validates OK (or no check is done at all)

function backendCheckLogin()

Check if user is logged in and if so, call ->fetchGroupData() to load group information and access lists of all kind, further check IP, set the ->uc array and send login-notification email if required.
If no user is logged in the default behaviour is to exit with an error message, but this will happen ONLY if the constant TYPO3_PROCEED_IF_NO_USER is set true.
This function is called right after ->start() in fx. init.php

Returns: void

function checkCLIuser()

If the backend script is in CLI mode, it will try to load a backend user named by the CLI module name (in lowercase)

Returns: boolean Returns true if a CLI user was loaded, otherwise false!

function backendSetUC()

Initialize the internal ->uc array for the backend user
Will make the overrides if necessary, and write the UC back to the be_users record if changes has happend

Returns: void
  @internal

function overrideUC()

Override: Call this function every time the uc is updated.
That is 1) by reverting to default values, 2) in the setup-module, 3) userTS changes (userauthgroup)

Returns: void
  @internal

function resetUC()

Clears the user[uc] and ->uc to blank strings. Then calls ->backendSetUC() to fill it again with reset contents

Returns: void
  @internal

function emailAtLogin()

Will send an email notification to warning_email_address/the login users email address when a login session is just started.
Depends on various parameters whether mails are send and to whom.

Returns: void

function veriCode()

VeriCode returns 10 first chars of a md5 hash of the session cookie AND the encryptionKey from TYPO3_CONF_VARS.
This code is used as an alternative verification when the JavaScript interface executes cmd's to tce_db.php from eg. MSIE 5.0 because the proper referer is not passed with this browser...

Returns: string

class.t3lib_browsetree.php

Extension class for the t3lib_treeView class, specially made for browsing pages

Filesize: 4.8 K
Func/Classes: 4
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@coauthor René Fritz <r.fritz@colorcube.de>
@see t3lib_treeView, t3lib_pageTree
@package TYPO3
@subpackage t3lib

class t3lib_browseTree extends t3lib_treeView

Extension class for the t3lib_treeView class, specially made for browsing pages

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @coauthor RenĂ© Fritz <r.fritz@colorcube.de>
  @see t3lib_treeView, t3lib_pageTree
  @package TYPO3
  @subpackage t3lib

function init($clause='')

Initialize, setting what is necessary for browsing pages.
Using the current user.

$clause='' string Additional clause for selecting pages.
Returns: void

function getTitleAttrib($row)

Creates title attribute content for pages.
Uses API function in t3lib_BEfunc which will retrieve lots of useful information for pages.

$row array The table row.
Returns: string

function wrapIcon($icon,$row)

Wrapping the image tag, $icon, for the row, $row (except for mount points)

$icon string The image tag for the icon
$row array The row for the current element
Returns: string The processed icon input value.

class.t3lib_clipboard.php

TYPO3 clipboard for records and files

Filesize: 34 K
Func/Classes: 32
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@package TYPO3
@subpackage t3lib

class t3lib_clipboard

TYPO3 clipboard for records and files

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @package TYPO3
  @subpackage t3lib

function initializeClipboard()

Initialize the clipboard from the be_user session

Returns: void

function lockToNormal()

Call this method after initialization if you want to lock the clipboard to operate on the normal pad only. Trying to switch pad through ->setCmd will not work
This is used by the clickmenu since it only allows operation on single elements at a time (that is the "normal" pad)

Returns: void

function setCmd($cmd)

The array $cmd may hold various keys which notes some action to take.
Normally perform only one action at a time.
In scripts like db_list.php / file_list.php the GET-var CB is used to control the clipboard.

Selecting / Deselecting elements
Array $cmd['el'] has keys = element-ident, value = element value (see description of clipData array in header)
Selecting elements for 'copy' should be done by simultaneously setting setCopyMode.

$cmd array Array of actions, see function description
Returns: void

function setCurrentPad($padIdent)

Setting the current pad on clipboard

$padIdent string Key in the array $this->clipData
Returns: void

function endClipboard()

Call this after initialization and setCmd in order to save the clipboard to the user session.
The function will check if the internal flag ->changed has been set and if so, save the clipboard. Else not.

Returns: void

function cleanUpCBC($CBarr,$table,$removeDeselected=0)

Cleans up an incoming element array $CBarr (Array selecting/deselecting elements)

$CBarr array Element array from outside ("key" => "selected/deselected")
$table string $table is the 'table which is allowed'. Must be set.
$removeDeselected=0 boolean $removeDeselected can be set in order to remove entries which are marked for deselection.
Returns: array Processed input $CBarr

function printClipboard()

Prints the clipboard

Returns: string HTML output

function printContentFromTab($pad)

Print the content on a pad. Called from ->printClipboard()

$pad string Pad reference
Returns: array Array with table rows for the clipboard.

function padTitleWrap($str,$pad)

Wraps title of pad in bold-tags and maybe the number of elements if any.

$str string String (already htmlspecialchars()'ed)
$pad string Pad reference
Returns: string HTML output (htmlspecialchar'ed content inside of tags.)

function linkItemText($str,$rec,$table='')

Wraps the title of the items listed in link-tags. The items will link to the page/folder where they originate from

$str string Title of element - must be htmlspecialchar'ed on beforehand.
$rec mixed If array, a record is expected. If string, its a path
$table='' string Table name
Returns: string

function selUrlDB($table,$uid,$copy=0,$deselect=0,$baseArray=array())

Returns the select-url for database elements

$table string Table name
$uid integer Uid of record
$copy=0 boolean If set, copymode will be enabled
$deselect=0 boolean If set, the link will deselect, otherwise select.
$baseArray=array() array The base array of GET vars to be sent in addition. Notice that current GET vars WILL automatically be included.
Returns: string URL linking to the current script but with the CB array set to select the element with table/uid

function selUrlFile($path,$copy=0,$deselect=0,$baseArray=array())

Returns the select-url for files

$path string Filepath
$copy=0 boolean If set, copymode will be enabled
$deselect=0 boolean If set, the link will deselect, otherwise select.
$baseArray=array() array The base array of GET vars to be sent in addition. Notice that current GET vars WILL automatically be included.
Returns: string URL linking to the current script but with the CB array set to select the path

function pasteUrl($table,$uid,$setRedirect=1)

pasteUrl of the element (database and file)
For the meaning of $table and $uid, please read from ->makePasteCmdArray!!!
The URL will point to tce_file or tce_db depending in $table

$table string Tablename (_FILE for files)
$uid mixed "destination": can be positive or negative indicating how the paste is done (paste into / paste after)
$setRedirect=1 boolean If set, then the redirect URL will point back to the current script, but with CB reset.
Returns: string

function deleteUrl($setRedirect=1,$file=0)

deleteUrl for current pad

$setRedirect=1 boolean If set, then the redirect URL will point back to the current script, but with CB reset.
$file=0 boolean If set, then the URL will link to the tce_file.php script in the typo3/ dir.
Returns: string

function editUrl()

editUrl of all current elements
ONLY database
Links to alt_doc.php

Returns: string The URL to alt_doc.php with parameters.

function removeUrl($table,$uid)

Returns the remove-url (file and db)
for file $table='_FILE' and $uid = shortmd5 hash of path

$table string Tablename
$uid string uid integer/shortmd5 hash
Returns: string URL

function confirmMsg($table,$rec,$type,$clElements)

Returns confirm JavaScript message

$table string Table name
$rec mixed For records its an array, for files its a string (path)
$type string Type-code
$clElements array Array of selected elements
Returns: string JavaScript "confirm" message

function clLabel($key,$Akey='labels')

Clipboard label - getting from "EXT:lang/locallang_core.php:"

$key string Label Key
$Akey='labels' string Alternative key to "labels"
Returns: string

function exportClipElementParameters()

Creates GET parameters for linking to the export module.

Returns: string GET parameters for current clipboard content to be exported.

function removeElement($el)

Removes element on clipboard

$el string Key of element in ->clipData array
Returns: void

function saveClipboard()

Saves the clipboard, no questions asked.
Use ->endClipboard normally (as it checks if changes has been done so saving is necessary)

Returns: void

function currentMode()

Returns the current mode, 'copy' or 'cut'

Returns: string "copy" or "cut"

function cleanCurrent()

This traverses the elements on the current clipboard pane
and unsets elements which does not exist anymore or are disabled.

Returns: void

function elFromTable($matchTable='',$pad='')

Counts the number of elements from the table $matchTable. If $matchTable is blank, all tables (except '_FILE' of course) is counted.

$matchTable='' string Table to match/count for.
$pad='' string $pad can optionally be used to set another pad than the current.
Returns: array Array with keys from the CB.

function isSelected($table,$uid)

Verifies if the item $table/$uid is on the current pad.
If the pad is "normal", the mode value is returned if the element existed. Thus you'll know if the item was copy or cut moded...

$table string Table name, (_FILE for files...)
$uid integer Element uid (path for files)
Returns: string

function getSelectedRecord($table='',$uid='')

Returns item record $table,$uid if selected on current clipboard
If table and uid is blank, the first element is returned.
Makes sense only for DB records - not files!

$table='' string Table name
$uid='' integer Element uid
Returns: array Element record with extra field _RECORD_TITLE set to the title of the record...

function isElements()

Reports if the current pad has elements (does not check file/DB type OR if file/DBrecord exists or not. Only counting array)

Returns: boolean True if elements exist.

function makePasteCmdArray($ref,$CMD)

Applies the proper paste configuration in the $cmd array send to tce_db.php.
$ref is the target, see description below.
The current pad is pasted

$ref: [tablename]:[paste-uid].
tablename is the name of the table from which elements *on the current clipboard* is pasted with the 'pid' paste-uid.
No tablename means that all items on the clipboard (non-files) are pasted. This requires paste-uid to be positive though.
so 'tt_content:-3' means 'paste tt_content elements on the clipboard to AFTER tt_content:3 record
'tt_content:30' means 'paste tt_content elements on the clipboard into page with id 30
':30' means 'paste ALL database elements on the clipboard into page with id 30
':-30' not valid.

$ref string [tablename]:[paste-uid], see description
$CMD array Command-array
Returns: array Modified Command-array

function makeDeleteCmdArray($CMD)

Delete record entries in CMD array

$CMD array Command-array
Returns: array Modified Command-array

function makePasteCmdArray_file($ref,$FILE)

Applies the proper paste configuration in the $file array send to tce_file.php.
The current pad is pasted

$ref string Reference to element (splitted by "|")
$FILE array Command-array
Returns: array Modified Command-array

function makeDeleteCmdArray_file($FILE)

Delete files in CMD array

$FILE array Command-array
Returns: array Modified Command-array

class.t3lib_cs.php

Class for conversion between charsets

Filesize: 64 K
Func/Classes: 36
Tags: @author Kasper Skaarhoj <kasperYYYY@typo3.com>
@author Martin Kutschker <martin.t.kutschker@blackbox.net>
@package TYPO3
@subpackage t3lib

class t3lib_cs

Class for conversion between charsets

Returns: [type] ...
  @author Kasper Skaarhoj <kasperYYYY@typo3.com>
  @author Martin Kutschker <martin.t.kutschker@blackbox.net>
  @package TYPO3
  @subpackage t3lib

function parse_charset($charset)

Normalize - changes input character set to lowercase letters.

$charset string Input charset
Returns: string Normalized charset
  @author Martin Kutschker <martin.t.kutschker@blackbox.net>

function get_locale_charset($locale)

Get the charset of a locale.

ln language
ln_CN language / country
ln_CN.cs language / country / charset
ln_CN.cs@mod language / country / charset / modifier

$locale string Locale string
Returns: string Charset resolved for locale string
  @author Martin Kutschker <martin.t.kutschker@blackbox.net>

function conv($str,$fromCS,$toCS,$useEntityForNoChar=0)

Convert from one charset to another charset.

$str string Input string
$fromCS string From charset (the current charset of the string)
$toCS string To charset (the output charset wanted)
$useEntityForNoChar=0 boolean If set, then characters that are not available in the destination character set will be encoded as numeric entities
Returns: string Converted string
  @see convArray()

function convArray(&$array,$fromCS,$toCS,$useEntityForNoChar=0)

Convert all elements in ARRAY from one charset to another charset.
NOTICE: Array is passed by reference!

&$array string Input array, possibly multidimensional
$fromCS string From charset (the current charset of the string)
$toCS string To charset (the output charset wanted)
$useEntityForNoChar=0 boolean If set, then characters that are not available in the destination character set will be encoded as numeric entities
Returns: void
  @see conv()

function utf8_encode($str,$charset)

Converts $str from $charset to UTF-8

$str string String in local charset to convert to UTF-8
$charset string Charset, lowercase. Must be found in csconvtbl/ folder.
Returns: string Output string, converted to UTF-8

function utf8_decode($str,$charset,$useEntityForNoChar=0)

Converts $str from UTF-8 to $charset

$str string String in UTF-8 to convert to local charset
$charset string Charset, lowercase. Must be found in csconvtbl/ folder.
$useEntityForNoChar=0 boolean If set, then characters that are not available in the destination character set will be encoded as numeric entities
Returns: string Output string, converted to local charset

function utf8_to_entities($str)

Converts all chars > 127 to numeric entities.

$str string Input string
Returns: string Output string

function entities_to_utf8($str,$alsoStdHtmlEnt=0)

Converts numeric entities (UNICODE, eg. decimal (&#1234;) or hexadecimal (&#x1b;)) to UTF-8 multibyte chars

$str string Input string, UTF-8
$alsoStdHtmlEnt=0 boolean If set, then all string-HTML entities (like &amp; or &pound; will be converted as well)
Returns: string Output string

function utf8_to_numberarray($str,$convEntities=0,$retChar=0)

Converts all chars in the input UTF-8 string into integer numbers returned in an array

$str string Input string, UTF-8
$convEntities=0 boolean If set, then all HTML entities (like &amp; or &pound; or &#123; or &#x3f5d;) will be detected as characters.
$retChar=0 boolean If set, then instead of integer numbers the real UTF-8 char is returned.
Returns: array Output array with the char numbers

function UnumberToChar($cbyte)

Converts a UNICODE number to a UTF-8 multibyte character
Algorithm based on script found at From: http://czyborra.com/utf/
Unit-tested by Kasper

The binary representation of the character's integer value is thus simply spread across the bytes and the number of high bits set in the lead byte announces the number of bytes in the multibyte sequence:

bytes | bits | representation
1 | 7 | 0vvvvvvv
2 | 11 | 110vvvvv 10vvvvvv
3 | 16 | 1110vvvv 10vvvvvv 10vvvvvv
4 | 21 | 11110vvv 10vvvvvv 10vvvvvv 10vvvvvv
5 | 26 | 111110vv 10vvvvvv 10vvvvvv 10vvvvvv 10vvvvvv
6 | 31 | 1111110v 10vvvvvv 10vvvvvv 10vvvvvv 10vvvvvv 10vvvvvv

$cbyte integer UNICODE integer
Returns: string UTF-8 multibyte character string
  @see utf8CharToUnumber()

function utf8CharToUnumber($str,$hex=0)

Converts a UTF-8 Multibyte character to a UNICODE number
Unit-tested by Kasper

$str string UTF-8 multibyte character string
$hex=0 boolean If set, then a hex. number is returned.
Returns: integer UNICODE integer
  @see UnumberToChar()

function initCharset($charset)

This will initialize a charset for use if it's defined in the PATH_t3lib.'csconvtbl/' folder
This function is automatically called by the conversion functions

PLEASE SEE: http://www.unicode.org/Public/MAPPINGS/

$charset string The charset to be initialized. Use lowercase charset always (the charset must match exactly with a filename in csconvtbl/ folder ([charset].tbl)
Returns: integer Returns '1' if already loaded. Returns FALSE if charset conversion table was not found. Returns '2' if the charset conversion table was found and parsed.

function initUnicodeData($mode=null)

This function initializes all UTF-8 character data tables.

PLEASE SEE: http://www.unicode.org/Public/UNIDATA/

$mode=null string Mode ("case", "ascii", ...)
Returns: integer Returns FALSE on error, a TRUE value on success: 1 table already loaded, 2, cached version, 3 table parsed (and cached).

function initCaseFolding($charset)

This function initializes the folding table for a charset other than UTF-8.
This function is automatically called by the case folding functions.

$charset string Charset for which to initialize case folding.
Returns: integer Returns FALSE on error, a TRUE value on success: 1 table already loaded, 2, cached version, 3 table parsed (and cached).

function initToASCII($charset)

This function initializes the to-ASCII conversion table for a charset other than UTF-8.
This function is automatically called by the ASCII transliteration functions.

$charset string Charset for which to initialize conversion.
Returns: integer Returns FALSE on error, a TRUE value on success: 1 table already loaded, 2, cached version, 3 table parsed (and cached).

function substr($charset,$string,$start,$len=null)

Returns a part of a string.
Unit-tested by Kasper (single byte charsets only)

$charset string The character set
$string string Character string
$start integer Start position (character position)
$len=null integer Length (in characters)
Returns: string The substring
  @see substr(), mb_substr()
  @author Martin Kutschker <martin.t.kutschker@blackbox.net>

function strlen($charset,$string)

Counts the number of characters.
Unit-tested by Kasper (single byte charsets only)

$charset string The character set
$string string Character string
Returns: integer The number of characters
  @see strlen()
  @author Martin Kutschker <martin.t.kutschker@blackbox.net>

function crop($charset,$string,$len,$crop='')

Truncates a string and pre-/appends a string.
Unit tested by Kasper

$charset string The character set
$string string Character string
$len integer Length (in characters)
$crop='' string Crop signifier
Returns: string The shortened string
  @see substr(), mb_strimwidth()
  @author Martin Kutschker <martin.t.kutschker@blackbox.net>