tslib_cObj Class Reference

List of all members.

Public Member Functions

 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)

Public Attributes

 $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()


Detailed Description

Definition at line 256 of file class.tslib_content.php.


Member Function Documentation

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.

Parameters:
array $data the record data that is rendered.
string $table the table that the data record is from.
Returns:
void

Definition at line 351 of file class.tslib_content.php.

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.

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

Definition at line 372 of file class.tslib_content.php.

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.

Returns:
mixed The "current" value

Definition at line 397 of file class.tslib_content.php.

tslib_cObj::setCurrentVal ( value  ) 

Sets the "current" value.

Parameters:
mixed The variable that you want to set as "current"
Returns:
void
See also:
getCurrentVal()

Definition at line 408 of file class.tslib_content.php.

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.

Parameters:
array $setup: Array with cObjects as values.
string $addKey: A prefix for the debugging information
Returns:
string Rendered output from the cObjects in the array.
See also:
cObjGetSingle()

Definition at line 421 of file class.tslib_content.php.

tslib_cObj::HTML ( conf  ) 

Rendering the cObject, HTML

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=349&cHash=d3fd0c70b4

Definition at line 598 of file class.tslib_content.php.

tslib_cObj::TEXT ( conf  ) 

Rendering the cObject, TEXT

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=350&cHash=b49de28f83

Definition at line 609 of file class.tslib_content.php.

tslib_cObj::CLEARGIF ( conf  ) 

Rendering the cObject, CLEARGIF

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=355&cHash=70c0f19915

Definition at line 620 of file class.tslib_content.php.

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

Rendering the cObject, COBJ_ARRAY / COA and COBJ_ARRAY_INT

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

Definition at line 639 of file class.tslib_content.php.

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

Rendering the cObject, USER and USER_INT

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

Definition at line 675 of file class.tslib_content.php.

tslib_cObj::FILE ( conf  ) 

Rendering the cObject, FILE

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=352&cHash=379c60f8bc

Definition at line 702 of file class.tslib_content.php.

tslib_cObj::IMAGE ( conf  ) 

Rendering the cObject, IMAGE

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=353&cHash=440681ea56 cImage()

Definition at line 718 of file class.tslib_content.php.

tslib_cObj::IMG_RESOURCE ( conf  ) 

Rendering the cObject, IMG_RESOURCE

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=354&cHash=46f9299706 getImgResource()

Definition at line 737 of file class.tslib_content.php.

tslib_cObj::IMGTEXT ( conf  ) 

Rendering the cObject, IMGTEXT

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=363&cHash=cf2969bce1

Definition at line 749 of file class.tslib_content.php.

tslib_cObj::CONTENT ( conf  ) 

Rendering the cObject, CONTENT

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=356&cHash=9f3b5c6ba2

Definition at line 1172 of file class.tslib_content.php.

tslib_cObj::RECORDS ( conf  ) 

Rendering the cObject, RECORDS

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=357&cHash=303e959472

Definition at line 1258 of file class.tslib_content.php.

tslib_cObj::HMENU ( conf  ) 

Rendering the cObject, HMENU

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=358&cHash=5400c1c06a

Definition at line 1338 of file class.tslib_content.php.

tslib_cObj::CTABLE ( conf  ) 

Rendering the cObject, CTABLE

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=359&cHash=2e0065b4e7

Definition at line 1370 of file class.tslib_content.php.

tslib_cObj::OTABLE ( conf  ) 

Rendering the cObject, OTABLE

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=360&cHash=02c9552d38

Definition at line 1408 of file class.tslib_content.php.

tslib_cObj::COLUMNS ( conf  ) 

Rendering the cObject, COLUMNS

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=361&cHash=7e4e228cad

Definition at line 1423 of file class.tslib_content.php.

tslib_cObj::HRULER ( conf  ) 

Rendering the cObject, HRULER

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=362&cHash=2a462aa084

Definition at line 1502 of file class.tslib_content.php.

tslib_cObj::CASEFUNC ( conf  ) 

Rendering the cObject, CASE

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=364&cHash=cffedd09e3

Definition at line 1527 of file class.tslib_content.php.

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.

Parameters:
array Array of TypoScript properties
string If "RESTORE_REGISTER" then the cObject rendered is "RESTORE_REGISTER", otherwise "LOAD_REGISTER"
Returns:
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

Definition at line 1552 of file class.tslib_content.php.

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.

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

Definition at line 1592 of file class.tslib_content.php.

tslib_cObj::SEARCHRESULT ( conf  ) 

Rendering the cObject, SEARCHRESULT

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=368&cHash=d00731cd7b

Definition at line 2099 of file class.tslib_content.php.

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

Rendering the cObject, PHP_SCRIPT, PHP_SCRIPT_INT and PHP_SCRIPT_EXT

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

Definition at line 2265 of file class.tslib_content.php.

tslib_cObj::TEMPLATE ( conf  ) 

Rendering the cObject, TEMPLATE

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=373&cHash=109a171b1e substituteMarkerArrayCached()

Definition at line 2308 of file class.tslib_content.php.

tslib_cObj::MULTIMEDIA ( conf  ) 

Rendering the cObject, MULTIMEDIA

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=374&cHash=efd88ab4a9

Definition at line 2459 of file class.tslib_content.php.

tslib_cObj::getSlidePids ( pidList,
pidConf 
)

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

Parameters:
string A list of page Content-Element PIDs (Page UIDs) / stdWrap
array stdWrap array for the list
Returns:
string A list of PIDs private

Definition at line 2546 of file class.tslib_content.php.

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.

Parameters:
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
Returns:
string The default value, either from INPUT var or the current default, based on whether caching is enabled or not. private

Definition at line 2577 of file class.tslib_content.php.

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

Parameters:
string File TypoScript resource
array TypoScript configuration properties
Returns:
string tag, (possibly wrapped in links and other HTML) if any image found. private
See also:
IMAGE()

Definition at line 2595 of file class.tslib_content.php.

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.

Parameters:
string the border attribute
Returns:
string the border attribute

Definition at line 2624 of file class.tslib_content.php.

tslib_cObj::imageLinkWrap ( string,
imageFile,
conf 
)

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

Parameters:
string String to wrap, probably an tag
string The original image file
array TypoScript properties for the "imageLinkWrap" function
Returns:
string The input string, $string, wrapped as configured.
See also:
cImage() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=316&cHash=2848266da6

Definition at line 2640 of file class.tslib_content.php.

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.

Parameters:
string The filename, being a TypoScript resource data type
string Additional parameters (attributes). Default is empty alt and title tags.
Returns:
string If jpg,gif,jpeg,png: returns image_tag with picture in. If html,txt: returns content string
See also:
FILE()

Definition at line 2720 of file class.tslib_content.php.

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.

Parameters:
integer Unix timestamp (number of seconds since 1970)
Returns:
void
See also:
tslib_fe::setSysLastChanged()

Definition at line 2743 of file class.tslib_content.php.

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.

Parameters:
string Input string
string A string where the first two parts separated by "|" (vertical line) will be wrapped around the input string
Returns:
string Wrapped output string
See also:
wrap(), cImage(), FILE() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=282&cHash=831a95115d

Definition at line 2760 of file class.tslib_content.php.

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"

Parameters:
array TypoScript configuration properties
boolean If set, the longdesc attribute will be generated - must only be used for img elements!
Returns:
string Parameter string containing alt and title parameters (if any)
See also:
IMGTEXT(), FILE(), FORM(), cImage(), filelink()

Definition at line 2779 of file class.tslib_content.php.

tslib_cObj::cleanFormName ( name  ) 

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

Parameters:
string Input string
Returns:
string the cleaned string
See also:
FORM()

Definition at line 2814 of file class.tslib_content.php.

tslib_cObj::getATagParams ( conf,
addGlobal = 1 
)

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

Parameters:
array TypoScript configuration properties
boolean If set, will add the global config.ATagParams to the link
Returns:
string String containing the parameters to the A tag (if non empty, with a leading space)
See also:
IMGTEXT(), filelink(), makelinks(), typolink()

Definition at line 2830 of file class.tslib_content.php.

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

Parameters:
string The content stream, typically HTML template content.
string The marker string, typically on the form "###[the marker string]###"
Returns:
string The subpart found, if found.
See also:
substituteSubpart(), t3lib_parsehtml::getSubpart()

Definition at line 2877 of file class.tslib_content.php.

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

Parameters:
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!
Returns:
string The processed HTML content string.
See also:
getSubpart(), t3lib_parsehtml::substituteSubpart()

Definition at line 2893 of file class.tslib_content.php.

tslib_cObj::substituteMarker ( content,
marker,
markContent 
)

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

Parameters:
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.
Returns:
string The processed HTML content string.
See also:
substituteSubpart()

Definition at line 2906 of file class.tslib_content.php.

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.

Parameters:
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.
Returns:
string The output content stream
See also:
substituteSubpart(), substituteMarker(), substituteMarkerInObject(), TEMPLATE()

Definition at line 2926 of file class.tslib_content.php.

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.

Parameters:
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.
Returns:
string The processed output stream
See also:
substituteMarker(), substituteMarkerInObject(), TEMPLATE()

Definition at line 3024 of file class.tslib_content.php.

tslib_cObj::substituteMarkerInObject ( &$  tree,
markContentArray 
)

Substitute marker array in an array of values

Parameters:
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.
Returns:
mixed The processed input variable.
See also:
substituteMarker()

Definition at line 3045 of file class.tslib_content.php.

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

Parameters:
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.
Returns:
array The modified $markContentArray

Definition at line 3068 of file class.tslib_content.php.

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

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

Definition at line 3131 of file class.tslib_content.php.

tslib_cObj::numRows ( conf  ) 

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

Parameters:
array TypoScript properties for the property (see link to "numRows")
Returns:
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()

Definition at line 3305 of file class.tsli