Solutions Open Source

Référence de la classe tslib_cObj

Liste de tous les membres

Fonctions membres publiques

 start ($data, $table='')
 setParent ($data, $currentRecord)
 getCurrentVal ()
 setCurrentVal ($value)
 cObjGet ($setup, $addKey='')
 cObjGetSingle ($name, $conf, $TSkey='__')
 HTML ($conf)
 TEXT ($conf)
 CLEARGIF ($conf)
 COBJ_ARRAY ($conf, $ext='')
 USER ($conf, $ext='')
 FILE ($conf)
 IMAGE ($conf)
 IMG_RESOURCE ($conf)
 IMGTEXT ($conf)
 CONTENT ($conf)
 RECORDS ($conf)
 HMENU ($conf)
 CTABLE ($conf)
 OTABLE ($conf)
 COLUMNS ($conf)
 HRULER ($conf)
 CASEFUNC ($conf)
 LOAD_REGISTER ($conf, $name)
 FORM ($conf, $formData='')
 SEARCHRESULT ($conf)
 PHP_SCRIPT ($conf, $ext='')
 TEMPLATE ($conf)
 MULTIMEDIA ($conf)
 getSlidePids ($pidList, $pidConf)
 getFieldDefaultValue ($noValueInsert, $fieldName, $defaultVal)
 cImage ($file, $conf)
 getBorderAttr ($borderAttr)
 imageLinkWrap ($string, $imageFile, $conf)
 fileResource ($fName, $addParams='alt=""title=""')
 lastChanged ($tstamp)
 linkWrap ($content, $wrap)
 getAltParam ($conf, $longDesc=true)
 cleanFormName ($name)
 getATagParams ($conf, $addGlobal=1)
 getSubpart ($content, $marker)
 substituteSubpart ($content, $marker, $subpartContent, $recursive=1)
 substituteMarker ($content, $marker, $markContent)
 substituteMarkerArrayCached ($content, $markContentArray=array(), $subpartContentArray=array(), $wrappedSubpartContentArray=array())
 substituteMarkerArray ($content, $markContentArray, $wrap='', $uppercase=0)
 substituteMarkerInObject (&$tree, $markContentArray)
 fillInMarkerArray ($markContentArray, $row, $fieldList='', $nl2br=TRUE, $prefix='FIELD_', $HSC=FALSE)
 stdWrap ($content, $conf)
 numRows ($conf)
 listNum ($content, $listNum, $char)
 checkIf ($conf)
 filelist ($data)
 clean_directory ($theDir)
 HTMLparser_TSbridge ($theValue, $conf)
 dataWrap ($content, $wrap)
 insertData ($str)
 prefixComment ($str, $conf, $content)
 substring ($content, $options)
 crop ($content, $options)
 removeBadHTML ($text, $conf)
 textStyle ($theValue, $conf)
 tableStyle ($theValue, $conf)
 addParams ($content, $conf)
 filelink ($theValue, $conf)
 locDataJU ($jumpUrl, $conf)
 calc ($val)
 calcIntExplode ($delim, $string)
 splitObj ($value, $conf)
 parseFunc ($theValue, $conf, $ref='')
 _parseFunc ($theValue, $conf)
 encaps_lineSplit ($theValue, $conf)
 http_makelinks ($data, $conf)
 mailto_makelinks ($data, $conf)
 getImgResource ($file, $fileArray)
 getFieldVal ($field)
 getData ($string, $fieldArray)
 rootLineValue ($key, $field, $slideBack=0, $altRootLine='')
 getGlobal ($var, $source=NULL)
 getKey ($key, $arr)
 TCAlookup ($inputValue, $conf)
 typoLink ($linktxt, $conf)
 typoLink_URL ($conf)
 getTypoLink ($label, $params, $urlParameters=array(), $target='')
 getTypoLink_URL ($params, $urlParameters=array(), $target='')
 typolinkWrap ($conf)
 currentPageUrl ($urlParameters=array(), $id=0)
 getClosestMPvalueForPage ($pageId, $raw=FALSE)
 getMailTo ($mailAddress, $linktxt, $initP='?')
 getQueryArguments ($conf, $overruleQueryArgs=array(), $forceArgs=FALSE)
 wrap ($content, $wrap, $char='|')
 noTrimWrap ($content, $wrap)
 wrapSpace ($content, $wrap)
 callUserFunction ($funcName, $conf, $content)
 processParams ($params)
 keywords ($content)
 caseshift ($theValue, $case)
 HTMLcaseshift ($theValue, $case)
 bytes ($sizeInBytes, $labels)
 calcAge ($seconds, $labels)
 sendNotifyEmail ($msg, $recipients, $cc, $email_from, $email_fromName='', $replyTo='')
 URLqMark ($url, $params)
 checkEmail ($email)
 clearTSProperties ($TSArr, $propList)
 mergeTSRef ($confArr, $prop)
 joinTSarrays ($conf, $old_conf)
 gifBuilderTextBox ($gifbuilderConf, $conf, $text)
 linebreaks ($string, $chars, $maxLines=0)
 getUpdateJS ($dataArray, $formName, $arrPrefix, $fieldList)
 DBgetDelete ($table, $uid, $doExec=FALSE)
 DBgetUpdate ($table, $uid, $dataArr, $fieldList, $doExec=FALSE)
 DBgetInsert ($table, $pid, $dataArr, $fieldList, $doExec=FALSE)
 DBmayFEUserEdit ($table, $row, $feUserRow, $allowedGroups='', $feEditSelf=0)
 DBmayFEUserEditSelect ($table, $feUserRow, $allowedGroups='', $feEditSelf=0)
 enableFields ($table, $show_hidden=0)
 getTreeList ($id, $depth, $begin=0, $dontCheckEnableFields=FALSE, $addSelectFields='', $moreWhereClauses='', $prevId_array=array(), $recursionLevel=0)
 whereSelectFromList ($field, $value)
 exec_mm_query ($select, $local_table, $mm_table, $foreign_table, $whereClause='', $groupBy='', $orderBy='', $limit='')
 exec_mm_query_uidList ($select, $local_table_uidlist, $mm_table, $foreign_table='', $whereClause='', $groupBy='', $orderBy='', $limit='')
 searchWhere ($sw, $searchFieldList, $searchTable='')
 exec_getQuery ($table, $conf)
 getQuery ($table, $conf, $returnQueryArray=FALSE)
 getWhere ($table, $conf, $returnQueryArray=FALSE)
 checkPidArray ($listArr)
 checkPid ($uid)
 editPanel ($content, $conf, $currentRecord='', $dataArr=array())
 editIcons ($content, $params, $conf=array(), $currentRecord='', $dataArr=array(), $addUrlParamStr='')
 editPanelLinkWrap ($string, $formName, $cmd, $currentRecord='', $confirm='', $nPid='')
 editPanelLinkWrap_doWrap ($string, $url, $currentRecord)
 editPanelPreviewBorder ($table, $row, $content, $thick, $conf=array())
 isDisabled ($table, $row)

Attributs publics

 $align = Array ('center', 'right', 'left')
 $image_compression
 $image_effects
 $data = Array()
 $oldData = Array()
 $alternativeData = ''
 $parameters = Array()
 $currentValKey = 'currentValue_kidjls9dksoje'
 $currentRecord = ''
 $currentRecordTotal = 0
 $currentRecordNumber = 0
 $parentRecordNumber = 0
 $parentRecord = array()
 $regObj
 $INT_include = 0
 $checkPid_cache = Array()
 $checkPid_badDoktypeList = '255'
 $lastTypoLinkUrl = ''
 $lastTypoLinkTarget = ''
 $substMarkerCache = array()
 $recordRegister = array()
 $cObjHookObjectsArr = array()


Documentation des fonctions membres

tslib_cObj::start ( data,
table = '' 
)

Class constructor. Well, it has to be called manually since it is not a real constructor function. So after making an instance of the class, call this function and pass to it a database record and the tablename from where the record is from. That will then become the "current" record loaded into memory and accessed by the .fields property found in eg. stdWrap.

Paramètres:
array $data the record data that is rendered.
string $table the table that the data record is from.
Renvoie:
void

tslib_cObj::setParent ( data,
currentRecord 
)

Sets the internal variable parentRecord with information about current record. If the tslib_cObj was started from CONTENT, RECORD or SEARCHRESULT cObject's this array has two keys, 'data' and 'currentRecord' which indicates the record and data for the parent cObj.

Paramètres:
array $data: The record array
string 
currentRecord
data-array, if the cObjects CONTENT or RECORD is in operation. Note that $GLOBALS['TSFE']->currentRecord is set to an equal value but always indicating the latest record rendered.
Renvoie:
void private

tslib_cObj::getCurrentVal (  ) 

Returns the "current" value. The "current" value is just an internal variable that can be used by functions to pass a single value on to another function later in the TypoScript processing. It's like "load accumulator" in the good old C64 days... basically a "register" you can use as you like. The TSref will tell if functions are setting this value before calling some other object so that you know if it holds any special information.

Renvoie:
mixed The "current" value

tslib_cObj::setCurrentVal ( value  ) 

Sets the "current" value.

Paramètres:
mixed The variable that you want to set as "current"
Renvoie:
void
Voir également:
getCurrentVal()

tslib_cObj::cObjGet ( setup,
addKey = '' 
)

Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found and accumulate the output.

Paramètres:
array $setup: Array with cObjects as values.
string $addKey: A prefix for the debugging information
Renvoie:
string Rendered output from the cObjects in the array.
Voir également:
cObjGetSingle()

tslib_cObj::cObjGetSingle ( name,
conf,
TSkey = '__' 
)

tslib_cObj::HTML ( conf  ) 

Rendering the cObject, HTML

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=349&cHash=d3fd0c70b4

tslib_cObj::TEXT ( conf  ) 

Rendering the cObject, TEXT

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=350&cHash=b49de28f83

tslib_cObj::CLEARGIF ( conf  ) 

Rendering the cObject, CLEARGIF

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=355&cHash=70c0f19915

tslib_cObj::COBJ_ARRAY ( conf,
ext = '' 
)

Rendering the cObject, COBJ_ARRAY / COA and COBJ_ARRAY_INT

Paramètres:
array Array of TypoScript properties
string If "INT" then the cObject is a "COBJ_ARRAY_INT" (non-cached), otherwise just "COBJ_ARRAY" (cached)
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=351&cHash=a09db0329c

tslib_cObj::USER ( conf,
ext = '' 
)

Rendering the cObject, USER and USER_INT

Paramètres:
array Array of TypoScript properties
string If "INT" then the cObject is a "USER_INT" (non-cached), otherwise just "USER" (cached)
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=369&cHash=b623aca0a9

tslib_cObj::FILE ( conf  ) 

Rendering the cObject, FILE

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=352&cHash=379c60f8bc

tslib_cObj::IMAGE ( conf  ) 

Rendering the cObject, IMAGE

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=353&cHash=440681ea56 cImage()

tslib_cObj::IMG_RESOURCE ( conf  ) 

Rendering the cObject, IMG_RESOURCE

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=354&cHash=46f9299706 getImgResource()

tslib_cObj::IMGTEXT ( conf  ) 

Rendering the cObject, IMGTEXT

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=363&cHash=cf2969bce1

tslib_cObj::CONTENT ( conf  ) 

Rendering the cObject, CONTENT

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=356&cHash=9f3b5c6ba2

tslib_cObj::RECORDS ( conf  ) 

Rendering the cObject, RECORDS

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=357&cHash=303e959472

tslib_cObj::HMENU ( conf  ) 

Rendering the cObject, HMENU

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=358&cHash=5400c1c06a

tslib_cObj::CTABLE ( conf  ) 

Rendering the cObject, CTABLE

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=359&cHash=2e0065b4e7

tslib_cObj::OTABLE ( conf  ) 

Rendering the cObject, OTABLE

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=360&cHash=02c9552d38

tslib_cObj::COLUMNS ( conf  ) 

Rendering the cObject, COLUMNS

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=361&cHash=7e4e228cad

tslib_cObj::HRULER ( conf  ) 

Rendering the cObject, HRULER

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=362&cHash=2a462aa084

tslib_cObj::CASEFUNC ( conf  ) 

Rendering the cObject, CASE

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=364&cHash=cffedd09e3

tslib_cObj::LOAD_REGISTER ( conf,
name 
)

Rendering the cObject, LOAD_REGISTER and RESTORE_REGISTER NOTICE: This cObject does NOT return any content since it just sets internal data based on the TypoScript properties.

Paramètres:
array Array of TypoScript properties
string If "RESTORE_REGISTER" then the cObject rendered is "RESTORE_REGISTER", otherwise "LOAD_REGISTER"
Renvoie:
string Empty string (the cObject only sets internal data!) &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=365&cHash=4935524e2e http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=366&cHash=4f9485e8cc

tslib_cObj::FORM ( conf,
formData = '' 
)

Rendering the cObject, FORM

Note on $formData: In the optional $formData array each entry represents a line in the ordinary setup. In those entries each entry (0,1,2...) represents a space normally divided by the '|' line.

$formData [] = array('Name:', 'name=input, 25 ', 'Default value....'); $formData [] = array('Email:', 'email=input, 25 ', 'Default value for email....');

If $formData is an array the value of $conf['data'] is ignored.

Paramètres:
array Array of TypoScript properties
array Alternative formdata overriding whatever comes from TypoScript
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=367&cHash=bbc518d930

tslib_cObj::SEARCHRESULT ( conf  ) 

Rendering the cObject, SEARCHRESULT

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=368&cHash=d00731cd7b

tslib_cObj::PHP_SCRIPT ( conf,
ext = '' 
)

Rendering the cObject, PHP_SCRIPT, PHP_SCRIPT_INT and PHP_SCRIPT_EXT

Paramètres:
array Array of TypoScript properties
string If "INT", then rendering "PHP_SCRIPT_INT"; If "EXT", then rendering "PHP_SCRIPT_EXT"; Default is rendering "PHP_SCRIPT" (cached)
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=370&cHash=aa107f2ad8 http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=371&cHash=53f71d025e http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=372&cHash=91fe391e1c

tslib_cObj::TEMPLATE ( conf  ) 

Rendering the cObject, TEMPLATE

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=373&cHash=109a171b1e substituteMarkerArrayCached()

tslib_cObj::MULTIMEDIA ( conf  ) 

Rendering the cObject, MULTIMEDIA

Paramètres:
array Array of TypoScript properties
Renvoie:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=374&cHash=efd88ab4a9

tslib_cObj::getSlidePids ( pidList,
pidConf 
)

Returns all parents of the given PID (Page UID) list

Paramètres:
string A list of page Content-Element PIDs (Page UIDs) / stdWrap
array stdWrap array for the list
Renvoie:
string A list of PIDs private

tslib_cObj::getFieldDefaultValue ( noValueInsert,
fieldName,
defaultVal 
)

Returns a default value for a form field in the FORM cObject. Page CANNOT be cached because that would include the inserted value for the current user.

Paramètres:
boolean If noValueInsert OR if the no_cache flag for this page is NOT set, the original default value is returned.
string $fieldName: The POST var name to get default value for
string $defaultVal: The current default value
Renvoie:
string The default value, either from INPUT var or the current default, based on whether caching is enabled or not. private

tslib_cObj::cImage ( file,
conf 
)

Returns a tag with the image file defined by $file and processed according to the properties in the TypoScript array. Mostly this function is a sub-function to the IMAGE function which renders the IMAGE cObject in TypoScript. This function is called by "$this->cImage($conf['file'],$conf);" from IMAGE().

Paramètres:
string File TypoScript resource
array TypoScript configuration properties
Renvoie:
string tag, (possibly wrapped in links and other HTML) if any image found. private
Voir également:
IMAGE()

tslib_cObj::getBorderAttr ( borderAttr  ) 

Returns the 'border' attribute for an tag only if the doctype is not xhtml_strict,xhtml_11 or xhtml_2 or if the config parameter 'disableImgBorderAttr' is not set.

Paramètres:
string the border attribute
Renvoie:
string the border attribute

tslib_cObj::imageLinkWrap ( string,
imageFile,
conf 
)

Wraps the input string in link-tags that opens the image in a new window.

Paramètres:
string String to wrap, probably an tag
string The original image file
array TypoScript properties for the "imageLinkWrap" function
Renvoie:
string The input string, $string, wrapped as configured.
Voir également:
cImage() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=316&cHash=2848266da6

tslib_cObj::fileResource ( fName,
addParams = 'alt="" title=""' 
)

Returns content of a file. If it's an image the content of the file is not returned but rather an image tag is.

Paramètres:
string The filename, being a TypoScript resource data type
string Additional parameters (attributes). Default is empty alt and title tags.
Renvoie:
string If jpg,gif,jpeg,png: returns image_tag with picture in. If html,txt: returns content string
Voir également:
FILE()

tslib_cObj::lastChanged ( tstamp  ) 

Sets the SYS_LASTCHANGED timestamp if input timestamp is larger than current value. The SYS_LASTCHANGED timestamp can be used by various caching/indexing applications to determine if the page has new content. Therefore you should call this function with the last-changed timestamp of any element you display.

Paramètres:
integer Unix timestamp (number of seconds since 1970)
Renvoie:
void
Voir également:
tslib_fe::setSysLastChanged()

tslib_cObj::linkWrap ( content,
wrap 
)

Wraps the input string by the $wrap value and implements the "linkWrap" data type as well. The "linkWrap" data type means that this function will find any integer encapsulated in {} (curly braces) in the first wrap part and substitute it with the corresponding page uid from the rootline where the found integer is pointing to the key in the rootline. See link below.

Paramètres:
string Input string
string A string where the first two parts separated by "|" (vertical line) will be wrapped around the input string
Renvoie:
string Wrapped output string
Voir également:
wrap(), cImage(), FILE() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=282&cHash=831a95115d

tslib_cObj::getAltParam ( conf,
longDesc = true 
)

An abstraction method which creates an alt or title parameter for an HTML img, applet, area or input element and the FILE content element. From the $conf array it implements the properties "altText", "titleText" and "longdescURL"

Paramètres:
array TypoScript configuration properties
boolean If set, the longdesc attribute will be generated - must only be used for img elements!
Renvoie:
string Parameter string containing alt and title parameters (if any)
Voir également:
IMGTEXT(), FILE(), FORM(), cImage(), filelink()

tslib_cObj::cleanFormName ( name  ) 

Removes forbidden characters and spaces from name/id attributes in the form tag and formfields

Paramètres:
string Input string
Renvoie:
string the cleaned string
Voir également:
FORM()

tslib_cObj::getATagParams ( conf,
addGlobal = 1 
)

An abstraction method to add parameters to an A tag. Uses the ATagParams property.

Paramètres:
array TypoScript configuration properties
boolean If set, will add the global config.ATagParams to the link
Renvoie:
string String containing the parameters to the A tag (if non empty, with a leading space)
Voir également:
IMGTEXT(), filelink(), makelinks(), typolink()

tslib_cObj::getSubpart ( content,
marker 
)

Returns a subpart from the input content stream. A subpart is a part of the input stream which is encapsulated in a string matching the input string, $marker. If this string is found inside of HTML comment tags the start/end points of the content block returned will be that right outside that comment block. Example: The contennt string is "Hello <!--###sub1### begin--> World. How are <!--###sub1### end--> you?" If $marker is "###sub1###" then the content returned is " World. How are ". The input content string could just as well have been "Hello ###sub1### World. How are ###sub1### you?" and the result would be the same Wrapper for t3lib_parsehtml::getSubpart which behaves identical

Paramètres:
string The content stream, typically HTML template content.
string The marker string, typically on the form "###[the marker string]###"
Renvoie:
string The subpart found, if found.
Voir également:
substituteSubpart(), t3lib_parsehtml::getSubpart()

tslib_cObj::substituteSubpart ( content,
marker,
subpartContent,
recursive = 1 
)

Substitute subpart in input template stream. This function substitutes a subpart in $content with the content of $subpartContent. Wrapper for t3lib_parsehtml::substituteSubpart which behaves identical

Paramètres:
string The content stream, typically HTML template content.
string The marker string, typically on the form "###[the marker string]###"
mixed The content to insert instead of the subpart found. If a string, then just plain substitution happens (includes removing the HTML comments of the subpart if found). If $subpartContent happens to be an array, it's [0] and [1] elements are wrapped around the EXISTING content of the subpart (fetched by getSubpart()) thereby not removing the original content.
boolean If $recursive is set, the function calls itself with the content set to the remaining part of the content after the second marker. This means that proceding subparts are ALSO substituted!
Renvoie:
string The processed HTML content string.
Voir également:
getSubpart(), t3lib_parsehtml::substituteSubpart()

tslib_cObj::substituteMarker ( content,
marker,
markContent 
)

Substitutes a marker string in the input content (by a simple str_replace())

Paramètres:
string The content stream, typically HTML template content.
string The marker string, typically on the form "###[the marker string]###"
mixed The content to insert instead of the marker string found.
Renvoie:
string The processed HTML content string.
Voir également:
substituteSubpart()

tslib_cObj::substituteMarkerArrayCached ( content,
markContentArray = array(),
subpartContentArray = array(),
wrappedSubpartContentArray = array() 
)

Multi substitution function with caching.

This function should be a one-stop substitution function for working with HTML-template. It does not substitute by str_replace but by splitting. This secures that the value inserted does not themselves contain markers or subparts. This function takes three kinds of substitutions in one: $markContentArray is a regular marker-array where the 'keys' are substituted in $content with their values $subpartContentArray works exactly like markContentArray only is whole subparts substituted and not only a single marker. $wrappedSubpartContentArray is an array of arrays with 0/1 keys where the subparts pointed to by the main key is wrapped with the 0/1 value alternating.

Paramètres:
string The content stream, typically HTML template content.
array Regular marker-array where the 'keys' are substituted in $content with their values
array Exactly like markContentArray only is whole subparts substituted and not only a single marker.
array An array of arrays with 0/1 keys where the subparts pointed to by the main key is wrapped with the 0/1 value alternating.
Renvoie:
string The output content stream
Voir également:
substituteSubpart(), substituteMarker(), substituteMarkerInObject(), TEMPLATE()

tslib_cObj::substituteMarkerArray ( content,
markContentArray,
wrap = '',
uppercase = 0 
)

Traverses the input $markContentArray array and for each key the marker by the same name (possibly wrapped and in upper case) will be substituted with the keys value in the array. This is very useful if you have a data-record to substitute in some content. In particular when you use the $wrap and $uppercase values to pre-process the markers. Eg. a key name like "myfield" could effectively be represented by the marker "###MYFIELD###" if the wrap value was "###|###" and the $uppercase boolean true.

Paramètres:
string The content stream, typically HTML template content.
array The array of key/value pairs being marker/content values used in the substitution. For each element in this array the function will substitute a marker in the content stream with the content.
string A wrap value - [part 1] | [part 2] - for the markers before substitution
boolean If set, all marker string substitution is done with upper-case markers.
Renvoie:
string The processed output stream
Voir également:
substituteMarker(), substituteMarkerInObject(), TEMPLATE()

tslib_cObj::substituteMarkerInObject ( &$  tree,
markContentArray 
)

Substitute marker array in an array of values

Paramètres:
mixed If string, then it just calls substituteMarkerArray. If array (and even multi-dim) then for each key/value pair the marker array will be substituted (by calling this function recursively)
array The array of key/value pairs being marker/content values used in the substitution. For each element in this array the function will substitute a marker in the content string/array values.
Renvoie:
mixed The processed input variable.
Voir également:
substituteMarker()

tslib_cObj::fillInMarkerArray ( markContentArray,
row,
fieldList = '',
nl2br = TRUE,
prefix = 'FIELD_',
HSC = FALSE 
)

Adds elements to the input $markContentArray based on the values from the fields from $fieldList found in $row

Paramètres:
array Array with key/values being marker-strings/substitution values.
array An array with keys found in the $fieldList (typically a record) which values should be moved to the $markContentArray
string A list of fields from the $row array to add to the $markContentArray array. If empty all fields from $row will be added (unless they are integers)
boolean If set, all values added to $markContentArray will be nl2br()'ed
string Prefix string to the fieldname before it is added as a key in the $markContentArray. Notice that the keys added to the $markContentArray always start and end with "###"
boolean If set, all values are passed through htmlspecialchars() - RECOMMENDED to avoid most obvious XSS and maintain XHTML compliance.
Renvoie:
array The modified $markContentArray

tslib_cObj::stdWrap ( content,
conf 
)

The "stdWrap" function. This is the implementation of what is known as "stdWrap properties" in TypoScript. Basically "stdWrap" performs some processing of a value based on properties in the input $conf array (holding the TypoScript "stdWrap properties") See the link below for a complete list of properties and what they do. The order of the table with properties found in TSref (the link) follows the actual order of implementation in this function.

If $this->alternativeData is an array it's used instead of the $this->data array in ->getData

Paramètres:
string Input value undergoing processing in this function. Possibly substituted by other values fetched from another source.
array TypoScript "stdWrap properties".
Renvoie:
string The processed input value &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=314&cHash=02ab044c7b

tslib_cObj::numRows ( conf  ) 

Returns number of rows selected by the query made by the properties set. Implements the stdWrap "numRows" property

Paramètres:
array TypoScript properties for the property (see link to "numRows")
Renvoie:
integer The number of rows found by the select private &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=317&cHash=e28e53e634 http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=318&cHash=a98cb4e7e6 stdWrap()

tslib_cObj::listNum ( content,
listNum,
char 
)

Exploding a string by the $char value (if integer its an ASCII value) and returning index $listNum

Paramètres:
string String to explode
string Index-number. You can place the word "last" in it and it will be substituted with the pointer to the last value. You can use math operators like "+-/*" (passed to calc())
string Either a string used to explode the content string or an integer value which will then be changed into a character, eg. "10" for a linebreak char.
Renvoie:
string

tslib_cObj::checkIf ( conf  ) 

Compares values together based on the settings in the input TypoScript array and returns true or false based on the comparison result. Implements the "if" function in TYPO3 TypoScript

Paramètres:
array TypoScript properties defining what to compare
Renvoie:
boolean &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=320&cHash=da01618eab HMENU(), CASEFUNC(), IMAGE(), COLUMN(), stdWrap(), _parseFunc()

tslib_cObj::filelist ( data  ) 

Reads a directory for files and returns the filepaths in a string list separated by comma. Implements the stdWrap property "filelist"

Paramètres:
string The command which contains information about what files/directory listing to return. See the "filelist" property of stdWrap for details.
Renvoie:
string Comma list of files. private
Voir également:
stdWrap()

tslib_cObj::clean_directory ( theDir  ) 

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

Paramètres:
string Absolute path to directory
Renvoie:
string The directory path if it existed as was valid to access. private
Voir également:
filelist()

tslib_cObj::HTMLparser_TSbridge ( theValue,
conf 
)

Passes the input value, $theValue, to an instance of "t3lib_parsehtml" together with the TypoScript options which are first converted from a TS style array to a set of arrays with options for the t3lib_parsehtml class.

Paramètres:
string The value to parse by the class "t3lib_parsehtml"
array TypoScript properties for the parser. See link.
Renvoie:
string Return value. &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=330&cHash=664e0296bf stdWrap(), t3lib_parsehtml::HTMLparserConfig(), t3lib_parsehtml::HTMLcleaner()

tslib_cObj::dataWrap ( content,
wrap 
)

Wrapping input value in a regular "wrap" but parses the wrapping value first for "insertData" codes.

Paramètres:
string Input string being wrapped
string The wrap string, eg. "<b></b>" or more likely here '| ' which will wrap the input string in a tag linking to the current page.
Renvoie:
string Output string wrapped in the wrapping value.
Voir également:
insertData(), stdWrap()

tslib_cObj::insertData ( str  ) 

Implements the "insertData" property of stdWrap meaning that if strings matching {...} is found in the input string they will be substituted with the return value from getData (datatype) which is passed the content of the curly braces. Example: If input string is "This is the page title: {page:title}" then the part, '{page:title}', will be substituted with the current pages title field value.

Paramètres:
string Input value
Renvoie:
string Processed input value
Voir également:
getData(), stdWrap(), dataWrap() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=314&cHash=02ab044c7b

tslib_cObj::prefixComment ( str,
conf,
content 
)

Returns a HTML comment with the second part of input string (divided by "|") where first part is an integer telling how many trailing tabs to put before the comment on a new line. Notice; this function (used by stdWrap) can be disabled by a "config.disablePrefixComment" setting in TypoScript.

Paramètres: