Documentation TYPO3 par Ameos |
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() | |
Definition at line 256 of file class.tslib_content.php.
| 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.
| array | $data the record data that is rendered. | |
| string | $table the table that the data record is from. |
Definition at line 351 of file class.tslib_content.php.
References $data, and t3lib_div::getUserObj().
| 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.
| array | $data: The record array | |
| string |
|
Definition at line 372 of file class.tslib_content.php.
References $currentRecord, and $data.
| 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.
Definition at line 397 of file class.tslib_content.php.
| tslib_cObj::setCurrentVal | ( | $ | value | ) |
Sets the "current" value.
| mixed | The variable that you want to set as "current" |
Definition at line 408 of file class.tslib_content.php.
Referenced by FORM(), and TEMPLATE().
| 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.
| array | $setup: Array with cObjects as values. | |
| string | $addKey: A prefix for the debugging information |
Definition at line 421 of file class.tslib_content.php.
References cObjGetSingle(), and t3lib_TStemplate::sortedKeyList().
Referenced by COBJ_ARRAY(), CTABLE(), IMGTEXT(), and OTABLE().
| tslib_cObj::HTML | ( | $ | conf | ) |
Rendering the cObject, HTML
| array | Array of TypoScript properties |
Definition at line 598 of file class.tslib_content.php.
References stdWrap().
Referenced by cObjGetSingle().
| tslib_cObj::TEXT | ( | $ | conf | ) |
Rendering the cObject, TEXT
| array | Array of TypoScript properties |
Definition at line 609 of file class.tslib_content.php.
References stdWrap().
Referenced by cObjGetSingle().
| tslib_cObj::CLEARGIF | ( | $ | conf | ) |
Rendering the cObject, CLEARGIF
| array | Array of TypoScript properties |
Definition at line 620 of file class.tslib_content.php.
References getBorderAttr(), stdWrap(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::COBJ_ARRAY | ( | $ | conf, | |
| $ | ext = '' | |||
| ) |
Rendering the cObject, COBJ_ARRAY / COA and COBJ_ARRAY_INT
| array | Array of TypoScript properties | |
| string | If "INT" then the cObject is a "COBJ_ARRAY_INT" (non-cached), otherwise just "COBJ_ARRAY" (cached) |
Definition at line 639 of file class.tslib_content.php.
References checkIf(), cObjGet(), stdWrap(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::USER | ( | $ | conf, | |
| $ | ext = '' | |||
| ) |
Rendering the cObject, USER and USER_INT
| array | Array of TypoScript properties | |
| string | If "INT" then the cObject is a "USER_INT" (non-cached), otherwise just "USER" (cached) |
Definition at line 675 of file class.tslib_content.php.
References callUserFunction().
Referenced by cObjGetSingle().
| tslib_cObj::FILE | ( | $ | conf | ) |
Rendering the cObject, FILE
| array | Array of TypoScript properties |
Definition at line 702 of file class.tslib_content.php.
References fileResource(), getAltParam(), linkWrap(), stdWrap(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::IMAGE | ( | $ | conf | ) |
Rendering the cObject, IMAGE
| array | Array of TypoScript properties |
Definition at line 718 of file class.tslib_content.php.
References checkIf(), cImage(), and stdWrap().
Referenced by cObjGetSingle(), and IMGTEXT().
| tslib_cObj::IMG_RESOURCE | ( | $ | conf | ) |
Rendering the cObject, IMG_RESOURCE
| array | Array of TypoScript properties |
Definition at line 737 of file class.tslib_content.php.
References getImgResource(), and stdWrap().
Referenced by cObjGetSingle(), and FORM().
| tslib_cObj::IMGTEXT | ( | $ | conf | ) |
Rendering the cObject, IMGTEXT
| array | Array of TypoScript properties |
Definition at line 749 of file class.tslib_content.php.
References $align, $image_compression, $image_effects, cObjGet(), cObjGetSingle(), editIcons(), getBorderAttr(), IMAGE(), t3lib_div::intInRange(), t3lib_div::makeInstance(), stdWrap(), t3lib_div::trimExplode(), and wrapSpace().
Referenced by cObjGetSingle().
| tslib_cObj::CONTENT | ( | $ | conf | ) |
Rendering the cObject, CONTENT
| array | Array of TypoScript properties |
Definition at line 1172 of file class.tslib_content.php.
References exec_getQuery(), getSlidePids(), lastChanged(), t3lib_div::makeInstance(), stdWrap(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::RECORDS | ( | $ | conf | ) |
Rendering the cObject, RECORDS
| array | Array of TypoScript properties |
Definition at line 1258 of file class.tslib_content.php.
References $data, checkPid(), enableFields(), lastChanged(), t3lib_div::makeInstance(), stdWrap(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::HMENU | ( | $ | conf | ) |
Rendering the cObject, HMENU
| array | Array of TypoScript properties |
Definition at line 1338 of file class.tslib_content.php.
References checkIf(), t3lib_div::inList(), t3lib_div::makeInstance(), stdWrap(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::CTABLE | ( | $ | conf | ) |
Rendering the cObject, CTABLE
| array | Array of TypoScript properties |
Definition at line 1370 of file class.tslib_content.php.
References cObjGet(), and t3lib_div::makeInstance().
Referenced by cObjGetSingle().
| tslib_cObj::OTABLE | ( | $ | conf | ) |
Rendering the cObject, OTABLE
| array | Array of TypoScript properties |
Definition at line 1408 of file class.tslib_content.php.
References cObjGet(), and t3lib_div::makeInstance().
Referenced by cObjGetSingle().
| tslib_cObj::COLUMNS | ( | $ | conf | ) |
Rendering the cObject, COLUMNS
| array | Array of TypoScript properties |
Definition at line 1423 of file class.tslib_content.php.
References checkIf(), cObjGetSingle(), t3lib_div::intInRange(), and stdWrap().
Referenced by cObjGetSingle().
| tslib_cObj::HRULER | ( | $ | conf | ) |
Rendering the cObject, HRULER
| array | Array of TypoScript properties |
Definition at line 1502 of file class.tslib_content.php.
References t3lib_div::intInRange(), and stdWrap().
Referenced by cObjGetSingle().
| tslib_cObj::CASEFUNC | ( | $ | conf | ) |
Rendering the cObject, CASE
| array | Array of TypoScript properties |
Definition at line 1527 of file class.tslib_content.php.
References checkIf(), cObjGetSingle(), and stdWrap().
Referenced by cObjGetSingle().
| 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.
| array | Array of TypoScript properties | |
| string | If "RESTORE_REGISTER" then the cObject rendered is "RESTORE_REGISTER", otherwise "LOAD_REGISTER" |
Definition at line 1552 of file class.tslib_content.php.
References stdWrap().
Referenced by cObjGetSingle().
| 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.
| array | Array of TypoScript properties | |
| array | Alternative formdata overriding whatever comes from TypoScript |
Definition at line 1592 of file class.tslib_content.php.
References $data, t3lib_div::_POST(), cleanFormName(), cObjGetSingle(), t3lib_div::deHSCentities(), t3lib_div::formatForTextarea(), getAltParam(), getClosestMPvalueForPage(), getFieldDefaultValue(), IMG_RESOURCE(), t3lib_div::inList(), t3lib_div::intInRange(), setCurrentVal(), t3lib_TStemplate::sortedKeyList(), stdWrap(), t3lib_div::testInt(), t3lib_div::trimExplode(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::SEARCHRESULT | ( | $ | conf | ) |
Rendering the cObject, SEARCHRESULT
| array | Array of TypoScript properties |
Definition at line 2099 of file class.tslib_content.php.
References t3lib_div::_GP(), t3lib_div::_POST(), cObjGetSingle(), enableFields(), getClosestMPvalueForPage(), getKey(), getTreeList(), t3lib_div::intInRange(), t3lib_div::makeInstance(), stdWrap(), t3lib_div::testInt(), URLqMark(), and wrap().
Referenced by cObjGetSingle().
| tslib_cObj::PHP_SCRIPT | ( | $ | conf, | |
| $ | ext = '' | |||
| ) |
Rendering the cObject, PHP_SCRIPT, PHP_SCRIPT_INT and PHP_SCRIPT_EXT
| 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) |
Definition at line 2265 of file class.tslib_content.php.
Referenced by cObjGetSingle().
| tslib_cObj::TEMPLATE | ( | $ | conf | ) |
Rendering the cObject, TEMPLATE
| array | Array of TypoScript properties |
Definition at line 2308 of file class.tslib_content.php.
References cObjGetSingle(), getSubpart(), t3lib_div::makeInstance(), setCurrentVal(), substituteMarkerArray(), substituteMarkerArrayCached(), and substituteSubpart().
Referenced by cObjGetSingle().
| tslib_cObj::MULTIMEDIA | ( | $ | conf | ) |
Rendering the cObject, MULTIMEDIA
| array | Array of TypoScript properties |
Definition at line 2459 of file class.tslib_content.php.
References t3lib_div::inList(), t3lib_div::split_fileref(), and stdWrap().
Referenced by cObjGetSingle().
| tslib_cObj::getSlidePids | ( | $ | pidList, | |
| $ | pidConf | |||
| ) |
Returns all parents of the given PID (Page UID) list
| string | A list of page Content-Element PIDs (Page UIDs) / stdWrap | |
| array | stdWrap array for the list |
Definition at line 2546 of file class.tslib_content.php.
References checkPidArray(), t3lib_div::intExplode(), and stdWrap().
Referenced by CONTENT().
| 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.
| 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 |
Definition at line 2577 of file class.tslib_content.php.
References t3lib_div::_GP().
Referenced by FORM().
| 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().
| string | File TypoScript resource | |
| array | TypoScript configuration properties |
Definition at line 2595 of file class.tslib_content.php.
References getAltParam(), getImgResource(), imageLinkWrap(), linkWrap(), t3lib_div::png_to_gif_by_imagemagick(), and wrap().
Referenced by 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.
| string | the border attribute |
Definition at line 2624 of file class.tslib_content.php.
References t3lib_div::inList().
Referenced by CLEARGIF(), tslib_tmenu::getBeforeAfter(), and IMGTEXT().
| tslib_cObj::imageLinkWrap | ( | $ | string, | |
| $ | imageFile, | |||
| $ | conf | |||
| ) |
Wraps the input string in link-tags that opens the image in a new window.
| string | String to wrap, probably an tag | |
| string | The original image file | |
| array | TypoScript properties for the "imageLinkWrap" function |
Definition at line 2640 of file class.tslib_content.php.
References t3lib_div::inList(), t3lib_div::intExplode(), t3lib_div::makeInstance(), stdWrap(), and wrap().
Referenced by cImage().
| 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.
| string | The filename, being a TypoScript resource data type | |
| string | Additional parameters (attributes). Default is empty alt and title tags. |
Definition at line 2720 of file class.tslib_content.php.
References t3lib_div::inList(), and t3lib_div::split_fileref().
Referenced by 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.
| integer | Unix timestamp (number of seconds since 1970) |
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.
| string | Input string | |
| string | A string where the first two parts separated by "|" (vertical line) will be wrapped around the input string |
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"
| array | TypoScript configuration properties | |
| boolean | If set, the longdesc attribute will be generated - must only be used for img elements! |
Definition at line 2779 of file class.tslib_content.php.
References stdWrap().
| tslib_cObj::cleanFormName | ( | $ | name | ) |
Removes forbidden characters and spaces from name/id attributes in the form tag and formfields
| string | Input string |
Definition at line 2814 of file class.tslib_content.php.
Referenced by FORM().
| tslib_cObj::getATagParams | ( | $ | conf, | |
| $ | addGlobal = 1 | |||
| ) |
An abstraction method to add parameters to an A tag. Uses the ATagParams property.
| array | TypoScript configuration properties | |
| boolean | If set, will add the global config.ATagParams to the link |
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
| string | The content stream, typically HTML template content. | |
| string | The marker string, typically on the form "###[the marker string]###" |
Definition at line 2877 of file class.tslib_content.php.
References t3lib_parsehtml::getSubpart().
Referenced by TEMPLATE().
| 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
| 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! |
Definition at line 2893 of file class.tslib_content.php.
References t3lib_parsehtml::substituteSubpart().
Referenced by substituteMarkerArrayCached(), and TEMPLATE().
| tslib_cObj::substituteMarker | ( | $ | content, | |
| $ | marker, | |||
| $ | markContent | |||
| ) |
Substitutes a marker string in the input content (by a simple str_replace())
| 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. |