TYPO3CMS  7
 All Classes Namespaces Files Functions Variables Pages
ContentObjectRenderer Class Reference

Public Member Functions

 __construct (TypoScriptFrontendController $typoScriptFrontendController=null)
 
 __sleep ()
 
 __wakeup ()
 
 setContentObjectClassMap (array $contentObjectClassMap)
 
 registerContentObjectClass ($className, $contentObjectName)
 
 start ($data, $table= '')
 
 getCurrentTable ()
 
 setParent ($data, $currentRecord)
 
 getCurrentVal ()
 
 setCurrentVal ($value)
 
 cObjGet ($setup, $addKey= '')
 
 getContentObject ($name)
 
 getUserObjectType ()
 
 setUserObjectType ($userObjectType)
 
 convertToUserIntObject ()
 
 readFlexformIntoConf ($flexData, &$conf, $recursive=false)
 
 getSlidePids ($pidList, $pidConf)
 
 cImage ($file, $conf)
 
 getBorderAttr ($borderAttr)
 
 getImageTagTemplate ($layoutKey, $conf)
 
 getImageSourceCollection ($layoutKey, $conf, $file)
 
 imageLinkWrap ($string, $imageFile, $conf)
 
 fileResource ($fName, $addParams= 'alt=""title=""')
 
 lastChanged ($tstamp)
 
 linkWrap ($content, $wrap)
 
 getAltParam ($conf, $longDesc=true)
 
 getATagParams ($conf, $addGlobal=1)
 
 extLinkATagParams ($URL, $TYPE)
 
 getSubpart ($content, $marker)
 
 substituteSubpart ($content, $marker, $subpartContent, $recursive=1)
 
 substituteSubpartArray ($content, array $subpartsContent)
 
 substituteMarker ($content, $marker, $markContent)
 
 substituteMarkerArrayCached ($content, array $markContentArray=null, array $subpartContentArray=null, array $wrappedSubpartContentArray=null)
 
 substituteMarkerArray ($content, array $markContentArray, $wrap= '', $uppercase=false, $deleteUnused=false)
 
 substituteMarkerInObject (&$tree, array $markContentArray)
 
 substituteMarkerAndSubpartArrayRecursive ($content, array $markersAndSubparts, $wrap= '', $uppercase=false, $deleteUnused=false)
 
 fillInMarkerArray (array $markContentArray, array $row, $fieldList= '', $nl2br=true, $prefix= 'FIELD_', $HSC=false)
 
 setCurrentFile ($fileObject)
 
 getCurrentFile ()
 
 stdWrap ($content= '', $conf=[])
 
 stdWrapValue ($key, array $config, $defaultValue= '')
 
 stdWrap_cacheRead ($content= '', $conf=[])
 
 stdWrap_addPageCacheTags ($content= '', $conf=[])
 
 stdWrap_setContentToCurrent ($content= '')
 
 stdWrap_setCurrent ($content= '', $conf=[])
 
 stdWrap_lang ($content= '', $conf=[])
 
 stdWrap_data ($content= '', $conf=[])
 
 stdWrap_field ($content= '', $conf=[])
 
 stdWrap_current ($content= '', $conf=[])
 
 stdWrap_cObject ($content= '', $conf=[])
 
 stdWrap_numRows ($content= '', $conf=[])
 
 stdWrap_filelist ($content= '', $conf=[])
 
 stdWrap_preUserFunc ($content= '', $conf=[])
 
 stdWrap_override ($content= '', $conf=[])
 
 stdWrap_preIfEmptyListNum ($content= '', $conf=[])
 
 stdWrap_ifNull ($content= '', $conf=[])
 
 stdWrap_ifEmpty ($content= '', $conf=[])
 
 stdWrap_ifBlank ($content= '', $conf=[])
 
 stdWrap_listNum ($content= '', $conf=[])
 
 stdWrap_trim ($content= '')
 
 stdWrap_strPad ($content= '', $conf=[])
 
 stdWrap_stdWrap ($content= '', $conf=[])
 
 stdWrap_required ($content= '')
 
 stdWrap_if ($content= '', $conf=[])
 
 stdWrap_fieldRequired ($content= '', $conf=[])
 
 stdWrap_parseFunc ($content= '', $conf=[])
 
 stdWrap_HTMLparser ($content= '', $conf=[])
 
 stdWrap_split ($content= '', $conf=[])
 
 stdWrap_replacement ($content= '', $conf=[])
 
 stdWrap_prioriCalc ($content= '', $conf=[])
 
 stdWrap_char ($content= '', $conf=[])
 
 stdWrap_intval ($content= '')
 
 stdWrap_hash ($content= '', array $conf=[])
 
 stdWrap_round ($content= '', $conf=[])
 
 stdWrap_numberFormat ($content= '', $conf=[])
 
 stdWrap_expandList ($content= '')
 
 stdWrap_date ($content= '', $conf=[])
 
 stdWrap_strtotime ($content= '', $conf=[])
 
 stdWrap_age ($content= '', $conf=[])
 
 stdWrap_case ($content= '', $conf=[])
 
 stdWrap_bytes ($content= '', $conf=[])
 
 stdWrap_substring ($content= '', $conf=[])
 
 stdWrap_removeBadHTML ($content= '')
 
 stdWrap_cropHTML ($content= '', $conf=[])
 
 stdWrap_stripHtml ($content= '')
 
 stdWrap_crop ($content= '', $conf=[])
 
 stdWrap_rawUrlEncode ($content= '')
 
 stdWrap_htmlSpecialChars ($content= '', $conf=[])
 
 stdWrap_encodeForJavaScriptValue ($content= '')
 
 stdWrap_doubleBrTag ($content= '', $conf=[])
 
 stdWrap_br ($content= '')
 
 stdWrap_brTag ($content= '', $conf=[])
 
 stdWrap_encapsLines ($content= '', $conf=[])
 
 stdWrap_keywords ($content= '')
 
 stdWrap_innerWrap ($content= '', $conf=[])
 
 stdWrap_innerWrap2 ($content= '', $conf=[])
 
 stdWrap_fontTag ($content= '', $conf=[])
 
 stdWrap_addParams ($content= '', $conf=[])
 
 stdWrap_filelink ($content= '', $conf=[])
 
 stdWrap_preCObject ($content= '', $conf=[])
 
 stdWrap_postCObject ($content= '', $conf=[])
 
 stdWrap_wrapAlign ($content= '', $conf=[])
 
 stdWrap_typolink ($content= '', $conf=[])
 
 stdWrap_TCAselectItem ($content= '', $conf=[])
 
 stdWrap_spaceBefore ($content= '', $conf=[])
 
 stdWrap_spaceAfter ($content= '', $conf=[])
 
 stdWrap_space ($content= '', $conf=[])
 
 stdWrap_wrap ($content= '', $conf=[])
 
 stdWrap_noTrimWrap ($content= '', $conf=[])
 
 stdWrap_wrap2 ($content= '', $conf=[])
 
 stdWrap_dataWrap ($content= '', $conf=[])
 
 stdWrap_prepend ($content= '', $conf=[])
 
 stdWrap_append ($content= '', $conf=[])
 
 stdWrap_wrap3 ($content= '', $conf=[])
 
 stdWrap_orderedStdWrap ($content= '', $conf=[])
 
 stdWrap_outerWrap ($content= '', $conf=[])
 
 stdWrap_insertData ($content= '')
 
 stdWrap_postUserFunc ($content= '', $conf=[])
 
 stdWrap_postUserFuncInt ($content= '', $conf=[])
 
 stdWrap_prefixComment ($content= '', $conf=[])
 
 stdWrap_editIcons ($content= '', $conf=[])
 
 stdWrap_editPanel ($content= '', $conf=[])
 
 stdWrap_debug ($content= '')
 
 stdWrap_debugFunc ($content= '', $conf=[])
 
 stdWrap_debugData ($content= '')
 
 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)
 
 removeBadHTML ($text)
 
 addParams ($content, $conf)
 
 calc ($val)
 
 calcIntExplode ($delim, $string)
 
 splitObj ($value, $conf)
 
 numberFormat ($content, $conf)
 
 parseFunc ($theValue, $conf, $ref= '')
 
 _parseFunc ($theValue, $conf)
 
 encaps_lineSplit ($theValue, $conf)
 
 http_makelinks ($data, $conf)
 
 mailto_makelinks ($data, $conf)
 
 getFieldVal ($field)
 
 getData ($string, $fieldArray=null)
 
 rootLineValue ($key, $field, $slideBack=false, $altRootLine= '')
 
 getGlobal ($keyString, $source=null)
 
 getKey ($key, $arr)
 
 TCAlookup ($inputValue, $conf)
 
 typoLink_URL ($conf)
 
 getTypoLink ($label, $params, $urlParameters=[], $target= '')
 
 getUrlToCurrentLocation ($addQueryString=true)
 
 getTypoLink_URL ($params, $urlParameters=[], $target= '')
 
 typolinkWrap ($conf)
 
 currentPageUrl ($urlParameters=[], $id=0)
 
 getClosestMPvalueForPage ($pageId, $raw=false)
 
 getMailTo ($mailAddress, $linktxt)
 
 getQueryArguments ($conf, $overruleQueryArguments=[], $forceOverruleArguments=false)
 
 wrap ($content, $wrap, $char= '|')
 
 noTrimWrap ($content, $wrap, $char= '|')
 
 wrapSpace ($content, $wrap, array $conf=null)
 
 callUserFunction ($funcName, $conf, $content)
 
 processParams ($params)
 
 keywords ($content)
 
 HTMLcaseshift ($theValue, $case)
 
 calcAge ($seconds, $labels)
 
 URLqMark ($url, $params)
 
 clearTSProperties ($TSArr, $propList)
 
 mergeTSRef ($confArr, $prop)
 
 gifBuilderTextBox ($gifbuilderConf, $conf, $text)
 
 linebreaks ($string, $chars, $maxLines=0)
 
 includeLibs (array $config)
 
 enableFields ($table, $show_hidden=false, array $ignore_array=[])
 
 searchWhere ($sw, $searchFieldList, $searchTable= '')
 
 exec_getQuery ($table, $conf)
 
 getRecords ($tableName, array $queryConfiguration)
 
 getQuery ($table, $conf, $returnQueryArray=false)
 
 getWhere ($table, $conf, $returnQueryArray=false)
 
 checkPidArray ($listArr)
 
 checkPid ($uid)
 
 getQueryMarkers ($table, $conf)
 
 editPanel ($content, $conf, $currentRecord= '', $dataArr=[])
 
 editIcons ($content, $params, array $conf=[], $currentRecord= '', $dataArr=[], $addUrlParamStr= '')
 
 isDisabled ($table, $row)
 

Public Attributes

 $align
 
 $stdWrapOrder
 
 $image_compression
 
 $image_effects
 
 $data = []
 
 $oldData = []
 
 $alternativeData = ''
 
 $parameters = []
 
 $currentValKey = 'currentValue_kidjls9dksoje'
 
 $currentRecord = ''
 
 $currentRecordTotal = 0
 
 $currentRecordNumber = 0
 
 $parentRecordNumber = 0
 
 $parentRecord = []
 
 $checkPid_cache = []
 
 $checkPid_badDoktypeList = '255'
 
 $lastTypoLinkUrl = ''
 
 $lastTypoLinkTarget = ''
 
 $lastTypoLinkLD = []
 
 $substMarkerCache = []
 
 $recordRegister = []
 
 $cObjHookObjectsArr = []
 
 $doConvertToUserIntObject = false
 
const OBJECTTYPE_USER_INT = 1
 
const OBJECTTYPE_USER = 2
 

Protected Member Functions

 getGetImgResourceHookObjects ()
 
 createExceptionHandler ($configuration=[])
 
 determineExceptionHandlerClassName ($configuration)
 
 mergeExceptionHandlerConfiguration ($configuration)
 
 replacement ($content, array $configuration)
 
 replacementSingle ($content, array $configuration)
 
 round ($content, array $conf=[])
 
 resolveMixedLinkParameter ($linkText, $mixedLinkParameter, &$configuration=[])
 
 detectLinkTypeFromLinkParameter ($linkParameter)
 
 parseFallbackLinkTextIfLinkTextIsEmpty ($originalLinkText, $fallbackLinkText)
 
 forceAbsoluteUrl ($url, array $configuration)
 
 sanitizeSelectPart ($selectPart, $table)
 
 getResourceFactory ()
 
 getEnvironmentVariable ($key)
 
 calculateCacheLifetime (array $configuration)
 
 calculateCacheTags (array $configuration)
 
 calculateCacheKey (array $configuration)
 
 getFrontendBackendUser ()
 
 getDatabaseConnection ()
 
 getTimeTracker ()
 
 getTypoScriptFrontendController ()
 

Protected Attributes

 $contentObjectClassMap = []
 
 $table = ''
 
 $cObjHookObjectsRegistry = []
 
 $stdWrapHookObjects = []
 
 $getImgResourceHookObjects
 
 $currentFile = null
 
 $userObjectType = false
 
 $stopRendering = []
 
 $stdWrapRecursionLevel = 0
 
 $typoScriptFrontendController
 
 $templateService
 

Detailed Description

This class contains all main TypoScript features. This includes the rendering of TypoScript content objects (cObjects). Is the backbone of TypoScript Template rendering.

There are lots of functions you can use from your include-scripts. The class is normally instantiated and referred to as "cObj". When you call your own PHP-code typically through a USER or USER_INT cObject then it is this class that instantiates the object and calls the main method. Before it does so it will set (if you are using classes) a reference to itself in the internal variable "cObj" of the object. Thus you can access all functions and data from this class by $this->cObj->... from within you classes written to be USER or USER_INT content objects.

Definition at line 63 of file ContentObjectRenderer.php.

Constructor & Destructor Documentation

__construct ( TypoScriptFrontendController  $typoScriptFrontendController = null)
Parameters
TypoScriptFrontendController$typoScriptFrontendController

Definition at line 573 of file ContentObjectRenderer.php.

References $GLOBALS, ContentObjectRenderer\$typoScriptFrontendController, and GeneralUtility\makeInstance().

Member Function Documentation

__sleep ( )

Prevent several objects from being serialized. If currentFile is set, it is either a File or a FileReference object. As the object itself can't be serialized, we have store a hash and restore the object in __wakeup()

Returns
array

Definition at line 587 of file ContentObjectRenderer.php.

__wakeup ( )

Restore currentFile from hash. If currentFile references a File, the identifier equals file identifier. If it references a FileReference the identifier equals the uid of the reference.

Definition at line 606 of file ContentObjectRenderer.php.

References $GLOBALS, and ResourceFactory\getInstance().

_parseFunc (   $theValue,
  $conf 
)

Helper function for parseFunc()

Parameters
string$theValueThe value to process.
array$confTypoScript configuration for parseFunc
Returns
string The processed value private
See also
parseFunc()

Definition at line 4656 of file ContentObjectRenderer.php.

References StringUtility\beginsWith(), StringUtility\endsWith(), GeneralUtility\get_tag_attributes(), and GeneralUtility\inList().

addParams (   $content,
  $conf 
)

Implements the TypoScript function "addParams"

Parameters
string$contentThe string with the HTML tag.
array$confThe TypoScript configuration properties
Returns
string The modified string
Todo:
Make it XHTML compatible. Will not present "/>" endings of tags right now. Further getting the tagname might fail if it is not separated by a normal space from the attributes.

Definition at line 4078 of file ContentObjectRenderer.php.

References GeneralUtility\get_tag_attributes(), and GeneralUtility\implodeAttributes().

calc (   $val)

Performs basic mathematical evaluation of the input string. Does NOT take parathesis and operator precedence into account! (for that, see ::calculateWithPriorityToAdditionAndSubtraction())

Parameters
string$valThe string to evaluate. Example: "3+4*10/5" will generate "35". Only integer numbers can be used.
Returns
int The result (might be a float if you did a division of the numbers).
See also
::calculateWithPriorityToAdditionAndSubtraction()

Definition at line 4281 of file ContentObjectRenderer.php.

References GeneralUtility\splitCalc().

calcAge (   $seconds,
  $labels 
)

Returns the 'age' of the tstamp $seconds

Parameters
int$secondsSeconds to return age for. Example: "70" => "1 min", "3601" => "1 hrs
string$labelsThe labels of the individual units. Defaults to : ' min| hrs| days| yrs'
Returns
string The formatted string

Definition at line 6852 of file ContentObjectRenderer.php.

calcIntExplode (   $delim,
  $string 
)

This explodes a comma-list into an array where the values are parsed through ContentObjectRender::calc() and cast to (int)(so you are sure to have integers in the output array) Used to split and calculate min and max values for GMENUs.

Parameters
string$delimDelimited to explode by
string$stringThe string with parts in (where each part is evaluated by ->calc())
Returns
array And array with evaluated values.
See also
calc(), ::makeGifs()

Definition at line 4320 of file ContentObjectRenderer.php.

calculateCacheKey ( array  $configuration)
protected

Applies stdWrap to the cache key

Parameters
array$configuration
Returns
string

Definition at line 8030 of file ContentObjectRenderer.php.

calculateCacheLifetime ( array  $configuration)
protected

Calculates the lifetime of a cache entry based on the given configuration

Parameters
array$configuration
Returns
int|null

Definition at line 7991 of file ContentObjectRenderer.php.

calculateCacheTags ( array  $configuration)
protected

Calculates the tags for a cache entry bases on the given configuration

Parameters
array$configuration
Returns
array

Definition at line 8015 of file ContentObjectRenderer.php.

callUserFunction (   $funcName,
  $conf,
  $content 
)

Calling a user function/class-method Notice: For classes the instantiated object will have the internal variable, $cObj, set to be a reference to $this (the parent/calling object).

Parameters
string$funcNameThe functionname, eg "user_myfunction" or "user_myclass->main". Notice that there are rules for the names of functions/classes you can instantiate. If a function cannot be called for some reason it will be seen in the TypoScript log in the AdminPanel.
array$confThe TypoScript configuration to pass the function
string$contentThe content string to pass the function
Returns
string The return content from the function call. Should probably be a string.
See also
USER(), stdWrap(), typoLink(), _parseFunc()

Definition at line 6709 of file ContentObjectRenderer.php.

checkIf (   $conf)

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

Parameters
array$confTypoScript properties defining what to compare
Returns
bool
See also
stdWrap(), _parseFunc()

Definition at line 3557 of file ContentObjectRenderer.php.

References GeneralUtility\inList().

Referenced by ContentObjectRenderer\getImageSourceCollection(), SplitProcessor\process(), CommaSeparatedValueProcessor\process(), and GalleryProcessor\process().

checkPid (   $uid)

Checks if a page UID is available due to enableFields() AND the list of bad doktype numbers ($this->checkPid_badDoktypeList)

Parameters
int$uidPage UID to test
Returns
bool TRUE if OK private
See also
getWhere(), checkPidArray()

Definition at line 7779 of file ContentObjectRenderer.php.

checkPidArray (   $listArr)

Removes Page UID numbers from the input array which are not available due to enableFields() or the list of bad doktype numbers ($this->checkPid_badDoktypeList)

Parameters
array$listArrArray of Page UID numbers for select and for which pages with enablefields and bad doktypes should be removed.
Returns
array Returns the array of remaining page UID numbers private
See also
getWhere(),checkPid()

Definition at line 7752 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\getSlidePids().

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$fileFile TypoScript resource
array$confTypoScript configuration properties
Returns
string tag, (possibly wrapped in links and other HTML) if any image found. private
See also
IMAGE()

Definition at line 1166 of file ContentObjectRenderer.php.

References ContentObjectRenderer\getAltParam(), ContentObjectRenderer\getBorderAttr(), ContentObjectRenderer\getImageSourceCollection(), ContentObjectRenderer\getImageTagTemplate(), ContentObjectRenderer\getTypoScriptFrontendController(), ContentObjectRenderer\imageLinkWrap(), ContentObjectRenderer\linkWrap(), ContentObjectRenderer\stdWrap(), ContentObjectRenderer\stdWrapValue(), ContentObjectRenderer\substituteMarkerArray(), and ContentObjectRenderer\wrap().

clean_directory (   $theDir)

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

Parameters
string$theDirAbsolute path to directory
Returns
string The directory path if it existed as was valid to access. private
See also
filelist()

Definition at line 3724 of file ContentObjectRenderer.php.

References GeneralUtility\isAbsPath(), and GeneralUtility\validPathStr().

clearTSProperties (   $TSArr,
  $propList 
)

Clears TypoScript properties listed in $propList from the input TypoScript array.

Parameters
array$TSArrTypoScript array of values/properties
string$propListList of properties to clear both value/properties for. Eg. "myprop,another_property
Returns
array The TypoScript array
See also
gifBuilderTextBox()

Definition at line 6965 of file ContentObjectRenderer.php.

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$setuparray with cObjects as values.
string$addKeyA prefix for the debugging information
Returns
string Rendered output from the cObjects in the array.
See also
cObjGetSingle()

Definition at line 784 of file ContentObjectRenderer.php.

References ArrayUtility\filterAndSortByNumericKeys().

convertToUserIntObject ( )

Requests the current USER object to be converted to USER_INT.

Returns
void

Definition at line 1063 of file ContentObjectRenderer.php.

References ContentObjectRenderer\getTimeTracker().

createExceptionHandler (   $configuration = [])
protected

Creates the content object exception handler from local content object configuration or, from global configuration if not explicitly disabled in local configuration

Parameters
array$configuration
Returns
NULL|ExceptionHandlerInterface
Exceptions
ContentRenderingException

Definition at line 970 of file ContentObjectRenderer.php.

References ContentObjectRenderer\determineExceptionHandlerClassName(), GeneralUtility\makeInstance(), and ContentObjectRenderer\mergeExceptionHandlerConfiguration().

currentPageUrl (   $urlParameters = [],
  $id = 0 
)

Returns the current page URL

Parameters
array | string$urlParametersAs an array key/value pairs represent URL parameters to set. Values NOT URL-encoded yet, keys should be URL-encoded if needed. As a string the parameter is expected to be URL-encoded already.
int$idAn alternative ID to the current id ($GLOBALS['TSFE']->id)
Returns
string The URL
See also
getTypoLink_URL()

Definition at line 6423 of file ContentObjectRenderer.php.

dataWrap (   $content,
  $wrap 
)

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

Parameters
string$contentInput string being wrapped
string$wrapThe wrap string, eg. "<strong></strong>" or more likely here '| ' which will wrap the input string in a tag linking to the current page.
Returns
string Output string wrapped in the wrapping value.
See also
insertData(), stdWrap()

Definition at line 3762 of file ContentObjectRenderer.php.

detectLinkTypeFromLinkParameter (   $linkParameter)
protected

part of the typolink construction functionality, called by typoLink()

tries to get the type of the link from the link parameter could be

  • "mailto" an email address
  • "url" external URL
  • "file" a local file (checked AFTER getPublicUrl() is called)
  • "page" a page (integer or alias)
Parameters
string$linkParametercould be "fileadmin/myfile.jpg" or "info@typo3.org" or "13" or "http://www.typo3.org"
Returns
string the keyword
See also
typoLink()

Definition at line 5754 of file ContentObjectRenderer.php.

determineExceptionHandlerClassName (   $configuration)
protected

Determine exception handler class name from global and content object configuration

Parameters
array$configuration
Returns
string|NULL

Definition at line 990 of file ContentObjectRenderer.php.

References GeneralUtility\getApplicationContext(), and ContentObjectRenderer\getTypoScriptFrontendController().

Referenced by ContentObjectRenderer\createExceptionHandler().

editIcons (   $content,
  $params,
array  $conf = [],
  $currentRecord = '',
  $dataArr = [],
  $addUrlParamStr = '' 
)

Adds an edit icon to the content string. The edit icon links to FormEngine with proper parameters for editing the table/fields of the context. This implements TYPO3 context sensitive editing facilities. Only backend users will have access (if properly configured as well).

Parameters
string$contentThe content to which the edit icons should be appended
string$paramsThe parameters defining which table and fields to edit. Syntax is [tablename]:[fieldname],[fieldname],[fieldname],... OR [fieldname],[fieldname],[fieldname],... (basically "[tablename]:" is optional, default table is the one of the "current record" used in the function). The fieldlist is sent as "&columnsOnly=" parameter to FormEngine
array$confTypoScript properties for configuring the edit icons.
string$currentRecordThe "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW
array$dataArrAlternative data array to use. Default is $this->data
string$addUrlParamStrAdditional URL parameters for the link pointing to FormEngine
Returns
string The input content string, possibly with edit icons added (not necessarily in the end but just after the last string of normal content.

Definition at line 7908 of file ContentObjectRenderer.php.

editPanel (   $content,
  $conf,
  $currentRecord = '',
  $dataArr = [] 
)

Generates the "edit panels" which can be shown for a page or records on a page when the Admin Panel is enabled for a backend users surfing the frontend. With the "edit panel" the user will see buttons with links to editing, moving, hiding, deleting the element This function is used for the cObject EDITPANEL and the stdWrap property ".editPanel"

Parameters
string$contentA content string containing the content related to the edit panel. For cObject "EDITPANEL" this is empty but not so for the stdWrap property. The edit panel is appended to this string and returned.
array$confTypoScript configuration properties for the editPanel
string$currentRecordThe "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW
array$dataArrAlternative data array to use. Default is $this->data
Returns
string The input content string with the editPanel appended. This function returns only an edit panel appended to the content string if a backend user is logged in (and has the correct permissions). Otherwise the content string is directly returned.

Definition at line 7881 of file ContentObjectRenderer.php.

enableFields (   $table,
  $show_hidden = false,
array  $ignore_array = [] 
)

Returns a part of a WHERE clause which will filter out records with start/end times or hidden/fe_groups fields set to values that should de-select them according to the current time, preview settings or user login. Definitely a frontend function. THIS IS A VERY IMPORTANT FUNCTION: Basically you must add the output from this function for EVERY select query you create for selecting records of tables in your own applications - thus they will always be filtered according to the "enablefields" configured in TCA Simply calls ::enableFields() BUT will send the show_hidden flag along! This means this function will work in conjunction with the preview facilities of the frontend engine/Admin Panel.

Parameters
string$tableThe table for which to get the where clause
bool$show_hiddenIf set, then you want NOT to filter out hidden records. Otherwise hidden record are filtered based on the current preview settings.
array$ignore_arrayArray you can pass where keys can be "disabled", "starttime", "endtime", "fe_group" (keys from "enablefields" in TCA) and if set they will make sure that part of the clause is not added. Thus disables the specific part of the clause. For previewing etc.
Returns
string The part of the where clause on the form " AND [fieldname]=0 AND ...". Eg. " AND hidden=0 AND starttime < 123345567

Definition at line 7119 of file ContentObjectRenderer.php.

encaps_lineSplit (   $theValue,
  $conf 
)

Lets you split the content by LF and proces each line independently. Used to format content made with the RTE.

Parameters
string$theValueThe input value
array$confTypoScript options
Returns
string The processed input value being returned; Splitted lines imploded by LF again. private

Definition at line 4884 of file ContentObjectRenderer.php.

References GeneralUtility\get_tag_attributes(), GeneralUtility\implodeAttributes(), GeneralUtility\revExplode(), and GeneralUtility\trimExplode().

exec_getQuery (   $table,
  $conf 
)

Executes a SELECT query for records from $table and with conditions based on the configuration in the $conf array This function is preferred over ->getQuery() if you just need to create and then execute a query.

Parameters
string$tableThe table name
array$confThe TypoScript configuration properties
Returns
bool||object MySQLi result object / DBAL object
See also
getQuery()

Definition at line 7360 of file ContentObjectRenderer.php.

extLinkATagParams (   $URL,
  $TYPE 
)

All extension links should ask this function for additional properties to their tags. Designed to add for instance an "onclick" property for site tracking systems.

Parameters
string$URLURL of the website
string$TYPE
Returns
string The additional tag properties

Definition at line 1631 of file ContentObjectRenderer.php.

filelist (   $data)

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

Parameters
string$dataThe command which contains information about what files/directory listing to return. See the "filelist" property of stdWrap for details.
Returns
string Comma list of files. private
See also
stdWrap()

Definition at line 3632 of file ContentObjectRenderer.php.

References GeneralUtility\inList(), GeneralUtility\isFirstPartOfStr(), GeneralUtility\split_fileref(), and GeneralUtility\uniqueList().

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$fNameThe filename, being a TypoScript resource data type
string$addParamsAdditional 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 1490 of file ContentObjectRenderer.php.

fillInMarkerArray ( array  $markContentArray,
array  $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$markContentArrayArray with key/values being marker-strings/substitution values.
array$rowAn array with keys found in the $fieldList (typically a record) which values should be moved to the $markContentArray
string$fieldListA 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)
bool$nl2brIf set, all values added to $markContentArray will be nl2br()'ed
string$prefixPrefix 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 "###
bool$HSCIf 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 1922 of file ContentObjectRenderer.php.

forceAbsoluteUrl (   $url,
array  $configuration 
)
protected

Forces a given URL to be absolute.

Parameters
string$urlThe URL to be forced to be absolute
array$configurationTypoScript configuration of typolink
Returns
string The absolute URL

Definition at line 6280 of file ContentObjectRenderer.php.

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$confTypoScript configuration properties
bool$longDescIf 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 1555 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\cImage().

getATagParams (   $conf,
  $addGlobal = 1 
)

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

Parameters
array$confTypoScript configuration properties
bool | int$addGlobalIf 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 1592 of file ContentObjectRenderer.php.

getBorderAttr (   $borderAttr)

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

Parameters
string$borderAttrThe border attribute
Returns
string The border attribute

Definition at line 1226 of file ContentObjectRenderer.php.

References ContentObjectRenderer\getTypoScriptFrontendController().

Referenced by ContentObjectRenderer\cImage().

getClosestMPvalueForPage (   $pageId,
  $raw = false 
)

Returns the &MP variable value for a page id. The function will do its best to find a MP value that will keep the page id inside the current Mount Point rootline if any.

Parameters
int$pageIdpage id
bool$rawIf TRUE, the MPvalue is returned raw. Normally it is encoded as &MP=... variable
Returns
string MP value, prefixed with &MP= (depending on $raw)
See also
typolink()

Definition at line 6481 of file ContentObjectRenderer.php.

References $GLOBALS.

getContentObject (   $name)

Returns a new content object of type $name. This content object needs to be registered as content object in $this->contentObjectClassMap

Parameters
string$name
Returns
NULL|AbstractContentObject
Exceptions
ContentRenderingException

Definition at line 887 of file ContentObjectRenderer.php.

References GeneralUtility\makeInstance().

getCurrentFile ( )

Gets the current file object during iterations over files.

Returns
File The current file object.

Definition at line 1960 of file ContentObjectRenderer.php.

getCurrentTable ( )

Returns the current table

Returns
string

Definition at line 700 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$table.

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 758 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$currentValKey.

getData (   $string,
  $fieldArray = null 
)

Implements the TypoScript data type "getText". This takes a string with parameters and based on those a value from somewhere in the system is returned.

Parameters
string$stringThe parameter string, eg. "field : title" or "field : navtitle // field : title" (in the latter case and example of how the value is FIRST splitted by "//" is shown)
NULL | array$fieldArrayAlternative field array; If you set this to an array this variable will be used to look up values for the "field" key. Otherwise the current page record in $GLOBALS['TSFE']->page is used.
Returns
string The value fetched
See also
getFieldVal()

Definition at line 5307 of file ContentObjectRenderer.php.

References $GLOBALS, GeneralUtility\_GET(), GeneralUtility\_POST(), GeneralUtility\getUserObj(), ArrayUtility\mergeRecursiveWithOverrule(), GeneralUtility\trimExplode(), and DebugUtility\viewArray().

getDatabaseConnection ( )
protected

Returns the database connection

Returns

Definition at line 8053 of file ContentObjectRenderer.php.

References $GLOBALS.

getEnvironmentVariable (   $key)
protected

Wrapper function for GeneralUtility::getIndpEnv()

See also
GeneralUtility::getIndpEnv
Parameters
string$keyName of the "environment variable"/"server variable" you wish to get.
Returns
string

Definition at line 7959 of file ContentObjectRenderer.php.

getFieldVal (   $field)

Returns the value for the field from $this->data. If "//" is found in the $field value that token will split the field values apart and the first field having a non-blank value will be returned.

Parameters
string$fieldThe fieldname, eg. "title" or "navtitle // title" (in the latter case the value of $this->data[navtitle] is returned if not blank, otherwise $this->data[title] will be)
Returns
string

Definition at line 5284 of file ContentObjectRenderer.php.

References GeneralUtility\trimExplode().

getFrontendBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 8043 of file ContentObjectRenderer.php.

References $GLOBALS.

getGetImgResourceHookObjects ( )
protected

Gets the 'getImgResource' hook objects. The first call initializes the accordant objects.

Returns
array The 'getImgResource' hook objects (if any)

Definition at line 711 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$getImgResourceHookObjects, $GLOBALS, and GeneralUtility\getUserObj().

getGlobal (   $keyString,
  $source = null 
)

Return global variable where the input string $var defines array keys separated by "|" Example: $var = "HTTP_SERVER_VARS | something" will return the value $GLOBALS['HTTP_SERVER_VARS']['something'] value

Parameters
string$keyStringGlobal var key, eg. "HTTP_GET_VAR" or "HTTP_GET_VARS|id" to get the GET parameter "id" back.
array$sourceAlternative array than $GLOBAL to get variables from.
Returns
mixed Whatever value. If none, then blank string.
See also
getData()

Definition at line 5586 of file ContentObjectRenderer.php.

References $GLOBALS.

getImageSourceCollection (   $layoutKey,
  $conf,
  $file 
)

Render alternate sources for the image tag. If no source collection is given an empty string is returned.

Parameters
string$layoutKeyrendering key
array$confTypoScript configuration properties
string$file
Exceptions
UnexpectedValueException
Returns
string

Definition at line 1267 of file ContentObjectRenderer.php.

References $GLOBALS, ContentObjectRenderer\checkIf(), ContentObjectRenderer\getTypoScriptFrontendController(), GeneralUtility\getUserObj(), ContentObjectRenderer\stdWrap(), and ContentObjectRenderer\substituteMarkerArray().

Referenced by ContentObjectRenderer\cImage().

getImageTagTemplate (   $layoutKey,
  $conf 
)

Returns the html-template for rendering the image-Tag if no template is defined via typoscript the default tag template is returned

Parameters
string$layoutKeyrendering key
array$confTypoScript configuration properties
Returns
string

Definition at line 1248 of file ContentObjectRenderer.php.

References ContentObjectRenderer\stdWrap().

Referenced by ContentObjectRenderer\cImage().

getKey (   $key,
  $arr 
)

Processing of key values pointing to entries in $arr; Here negative values are converted to positive keys pointer to an entry in the array but from behind (based on the negative value). Example: entrylevel = -1 means that entryLevel ends up pointing at the outermost-level, -2 means the level before the outermost...

Parameters
int$keyThe integer to transform
array$arrarray in which the key should be found.
Returns
int The processed integer key value. private
See also
getData()

Definition at line 5619 of file ContentObjectRenderer.php.

getMailTo (   $mailAddress,
  $linktxt 
)

Creates a href attibute for given $mailAddress. The function uses spamProtectEmailAddresses for encoding the mailto statement. If spamProtectEmailAddresses is disabled, it'll just return a string like "mailto:user@example.tld".

Parameters
string$mailAddressEmail address
string$linktxtLink text, default will be the email address.
Returns
string Returns a numerical array with two elements: 1) $mailToUrl, string ready to be inserted into the href attribute of the tag, b) $linktxt: The string between starting and ending tag.

Definition at line 6538 of file ContentObjectRenderer.php.

getQuery (   $table,
  $conf,
  $returnQueryArray = false 
)

Creates and returns a SELECT query for records from $table and with conditions based on the configuration in the $conf array Implements the "select" function in TypoScript

Parameters
string$tableSee ->exec_getQuery()
array$confSee ->exec_getQuery()
bool$returnQueryArrayIf set, the function will return the query not as a string but array with the various parts. RECOMMENDED!
Returns
mixed A SELECT query if $returnQueryArray is FALSE, otherwise the SELECT query in an array as parts. private
See also
CONTENT(), numRows()

Definition at line 7426 of file ContentObjectRenderer.php.

getQueryArguments (   $conf,
  $overruleQueryArguments = [],
  $forceOverruleArguments = false 
)

Gets the query arguments and assembles them for URLs. Arguments may be removed or set, depending on configuration.

Parameters
string$confConfiguration
array$overruleQueryArgumentsMultidimensional key/value pairs that overrule incoming query arguments
bool$forceOverruleArgumentsIf set, key/value pairs not in the query but the overrule array will be set
Returns
string The URL query part (starting with a &)

Definition at line 6583 of file ContentObjectRenderer.php.

getQueryMarkers (   $table,
  $conf 
)

Builds list of marker values for handling PDO-like parameter markers in select parts. Marker values support stdWrap functionality thus allowing a way to use stdWrap functionality in various properties of 'select' AND prevents SQL-injection problems by quoting and escaping of numeric values, strings, NULL values and comma separated lists.

Parameters
string$tableTable to select records from
array$confSelect part of CONTENT definition
Returns
array List of values to replace markers with private
See also
getQuery()

Definition at line 7799 of file ContentObjectRenderer.php.

getRecords (   $tableName,
array  $queryConfiguration 
)

Executes a SELECT query for records from $table and with conditions based on the configuration in the $conf array and overlays with translation and version if available

Parameters
string$tableNamethe name of the TCA database table
array$queryConfigurationThe TypoScript configuration properties, see .select in TypoScript reference
Returns
array The records

Definition at line 7374 of file ContentObjectRenderer.php.

getResourceFactory ( )
protected

Get instance of FAL resource factory

Returns
ResourceFactory

Definition at line 7947 of file ContentObjectRenderer.php.

getSlidePids (   $pidList,
  $pidConf 
)

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

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

Definition at line 1131 of file ContentObjectRenderer.php.

References ContentObjectRenderer\checkPidArray(), ContentObjectRenderer\getTypoScriptFrontendController(), GeneralUtility\intExplode(), and ContentObjectRenderer\stdWrap().

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 ::getSubpart which behaves identical

Parameters
string$contentThe content stream, typically HTML template content.
string$markerThe marker string, typically on the form "###[the marker string]###
Returns
string The subpart found, if found.

Definition at line 1666 of file ContentObjectRenderer.php.

getTimeTracker ( )
protected
Returns
TimeTracker

Definition at line 8061 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\convertToUserIntObject().

getTypoLink (   $label,
  $params,
  $urlParameters = [],
  $target = '' 
)

Returns a linked string made from typoLink parameters.

This function takes $label as a string, wraps it in a link-tag based on the $params string, which should contain data like that you would normally pass to the popular <LINK>-tag in the TSFE. Optionally you can supply $urlParameters which is an array with key/value pairs that are rawurlencoded and appended to the resulting url.

Parameters
string$labelText string being wrapped by the link.
string$paramsLink parameter; eg. "123" for page id, "kasperYYYY@typo3.com" for email address, "http://...." for URL, "fileadmin/blabla.txt" for file.
array | string$urlParametersAs an array key/value pairs represent URL parameters to set. Values NOT URL-encoded yet, keys should be URL-encoded if needed. As a string the parameter is expected to be URL-encoded already.
string$targetSpecific target set, if any. (Default is using the current)
Returns
string The wrapped $label-text string
See also
getTypoLink_URL()

Definition at line 6343 of file ContentObjectRenderer.php.

getTypoLink_URL (   $params,
  $urlParameters = [],
  $target = '' 
)

Returns the URL of a "typolink" create from the input parameter string, url-parameters and target

Parameters
string$paramsLink parameter; eg. "123" for page id, "kasperYYYY@typo3.com" for email address, "http://...." for URL, "fileadmin/blabla.txt" for file.
array | string$urlParametersAs an array key/value pairs represent URL parameters to set. Values NOT URL-encoded yet, keys should be URL-encoded if needed. As a string the parameter is expected to be URL-encoded already.
string$targetSpecific target set, if any. (Default is using the current)
Returns
string The URL
See also
getTypoLink()

Definition at line 6396 of file ContentObjectRenderer.php.

getUrlToCurrentLocation (   $addQueryString = true)

Returns the canonical URL to the current "location", which include the current page ID and type and optionally the query string

Parameters
bool$addQueryStringWhether additional GET arguments in the query string should be included or not
Returns
string

Definition at line 6370 of file ContentObjectRenderer.php.

getUserObjectType ( )

Retrieves a type of object called as USER or USER_INT. Object can detect their type by using this call. It returns OBJECTTYPE_USER_INT or OBJECTTYPE_USER depending on the current object execution. In all other cases it will return FALSE to indicate a call out of context.

Returns
mixed One of OBJECTTYPE_ class constants or FALSE

Definition at line 1042 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$userObjectType.

getWhere (   $table,
  $conf,
  $returnQueryArray = false 
)

Helper function for getQuery(), creating the WHERE clause of the SELECT query

Parameters
string$tableThe table name
array$confThe TypoScript configuration properties
bool$returnQueryArrayIf set, the function will return the query not as a string but array with the various parts. RECOMMENDED!
Returns
mixed A WHERE clause based on the relevant parts of the TypoScript properties for a "select" function in TypoScript, see link. If $returnQueryArray is FALSE the where clause is returned as a string with WHERE, GROUP BY and ORDER BY parts, otherwise as an array with these parts. private
See also
getQuery()

Definition at line 7580 of file ContentObjectRenderer.php.

References $GLOBALS.

gifBuilderTextBox (   $gifbuilderConf,
  $conf,
  $text 
)

This function creates a number of TEXT-objects in a Gifbuilder configuration in order to create a text-field like thing.

Parameters
array$gifbuilderConfTypoScript properties for Gifbuilder - TEXT GIFBUILDER objects are added to this array and returned.
array$confTypoScript properties for this function
string$textThe text string to write onto the GIFBUILDER file
Returns
array The modified $gifbuilderConf array

Definition at line 7008 of file ContentObjectRenderer.php.

HTMLcaseshift (   $theValue,
  $case 
)

Shifts the case of characters outside of HTML tags in the input string

Parameters
string$theValueThe string to change case for.
string$caseThe direction; either "upper" or "lower
Returns
string
See also
caseshift()

Definition at line 6824 of file ContentObjectRenderer.php.

HTMLparser_TSbridge (   $theValue,
  $conf 
)

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

Parameters
string$theValueThe value to parse by the class
array$confTypoScript properties for the parser. See link.
Returns
string Return value.
See also
stdWrap(), ::HTMLparserConfig(), ::HTMLcleaner()

Definition at line 3747 of file ContentObjectRenderer.php.

References GeneralUtility\makeInstance().

http_makelinks (   $data,
  $conf 
)

Finds URLS in text and makes it to a real link. Will find all strings prefixed with "http://" and "https://" in the $data string and make them into a link, linking to the URL we should have found.

Parameters
string$dataThe string in which to search for "http://
array$confConfiguration for makeLinks, see link
Returns
string The processed input string, being returned.
See also
_parseFunc()

Definition at line 4991 of file ContentObjectRenderer.php.

References UrlProcessorInterface\CONTEXT_COMMON.

imageLinkWrap (   $string,
  $imageFile,
  $conf 
)

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

Parameters
string$stringString to wrap, probably an tag
string | File | FileReference$imageFileThe original image file
array$confTypoScript properties for the "imageLinkWrap" function
Returns
string The input string, $string, wrapped as configured.
See also
cImage()

Definition at line 1373 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$parameters, MathUtility\canBeInterpretedAsInteger(), ResourceFactory\getInstance(), ContentObjectRenderer\getTypoScriptFrontendController(), GeneralUtility\hmac(), GeneralUtility\intExplode(), GeneralUtility\quoteJSvalue(), and ContentObjectRenderer\stdWrap().

Referenced by ContentObjectRenderer\cImage().

includeLibs ( array  $config)

Includes resources if the config property 'includeLibs' is set.

Parameters
array$configTypoScript configuration
Returns
bool Whether a configuration for including libs was found and processed
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9, use proper class loading instead.

Definition at line 7086 of file ContentObjectRenderer.php.

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.

Parameters
string$strInput value
Returns
string Processed input value
See also
getData(), stdWrap(), dataWrap()

Definition at line 3775 of file ContentObjectRenderer.php.

isDisabled (   $table,
  $row 
)

Returns TRUE if the input table/row would be hidden in the frontend (according nto the current time and simulate user group)

Parameters
string$tableThe table name
array$rowThe data record
Returns
bool private
See also
editPanelPreviewBorder()

Definition at line 7932 of file ContentObjectRenderer.php.

References $GLOBALS.

keywords (   $content)

Cleans up a string of keywords. Keywords at splitted by "," (comma) ";" (semi colon) and linebreak

Parameters
string$contentString of keywords
Returns
string Cleaned up string, keywords will be separated by a comma only.

Definition at line 6769 of file ContentObjectRenderer.php.

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
int$tstampUnix timestamp (number of seconds since 1970)
Returns
void
See also
TypoScriptFrontendController::setSysLastChanged()

Definition at line 1517 of file ContentObjectRenderer.php.

linebreaks (   $string,
  $chars,
  $maxLines = 0 
)

Splits a text string into lines and returns an array with these lines but a max number of lines.

Parameters
string$stringThe string to break
int$charsMax number of characters per line.
int$maxLinesMax number of lines in all.
Returns
array array with lines. private
See also
gifBuilderTextBox()

Definition at line 7059 of file ContentObjectRenderer.php.

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$contentInput string
string$wrapA 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()

Definition at line 1535 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\cImage().

listNum (   $content,
  $listNum,
  $char 
)

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

Parameters
string$contentString to explode
string$listNumIndex-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$charEither 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.
Returns
string

Definition at line 3533 of file ContentObjectRenderer.php.

References MathUtility\canBeInterpretedAsInteger().

mailto_makelinks (   $data,
  $conf 
)

Will find all strings prefixed with "mailto:" in the $data string and make them into a link, linking to the email address they point to.

Parameters
string$dataThe string in which to search for "mailto:
array$confConfiguration for makeLinks, see link
Returns
string The processed input string, being returned.
See also
_parseFunc()

Definition at line 5067 of file ContentObjectRenderer.php.

mergeExceptionHandlerConfiguration (   $configuration)
protected

Merges global exception handler configuration with the one from the content object and returns the merged exception handler configuration

Parameters
array$configuration
Returns
array

Definition at line 1020 of file ContentObjectRenderer.php.

References ContentObjectRenderer\getTypoScriptFrontendController().

Referenced by ContentObjectRenderer\createExceptionHandler().

mergeTSRef (   $confArr,
  $prop 
)

Resolves a TypoScript reference value to the full set of properties BUT overridden with any local properties set. So the reference is resolved but overlaid with local TypoScript properties of the reference value.

Parameters
array$confArrThe TypoScript array
string$propThe property name: If this value is a reference (eg. " < plugins.tx_something") then the reference will be retrieved and inserted at that position (into the properties only, not the value...) AND overlaid with the old properties if any.
Returns
array The modified TypoScript array

Definition at line 6984 of file ContentObjectRenderer.php.

noTrimWrap (   $content,
  $wrap,
  $char = '|' 
)

Wrapping a string, preserving whitespace in wrap value. Notice that the wrap value uses part 1/2 to wrap (and not 0/1 which wrap() does)

Parameters
string$contentThe content to wrap, eg. "HELLO WORLD @param string $wrap The wrap value, eg. " | |
string$charThe char used to split the wrapping value, default is "|"
Returns
string Wrapped input string, eg. " HELLO WORD
See also
wrap()

Definition at line 6655 of file ContentObjectRenderer.php.

numberFormat (   $content,
  $conf 
)

Implements the stdWrap property "numberFormat" This is a Wrapper function for php's number_format()

Parameters
float$contentValue to process
array$confTypoScript Configuration for numberFormat
Returns
string The formatted number

Definition at line 4524 of file ContentObjectRenderer.php.

numRows (   $conf)

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

Parameters
array$confTypoScript properties for the property (see link to "numRows")
Returns
int|bool The number of rows found by the select (FALSE on error) private
See also
stdWrap()

Definition at line 3509 of file ContentObjectRenderer.php.

parseFallbackLinkTextIfLinkTextIsEmpty (   $originalLinkText,
  $fallbackLinkText 
)
protected

Helper method to a fallback method parsing HTML out of it

Parameters
string$originalLinkTextthe original string, if empty, the fallback link text
string$fallbackLinkTextthe string to be used.
Returns
string the final text

Definition at line 6264 of file ContentObjectRenderer.php.

parseFunc (   $theValue,
  $conf,
  $ref = '' 
)

Implements the stdWrap property, "parseFunc". This is a function with a lot of interesting uses. In classic TypoScript this is used to process text from the bodytext field; This included highlighting of search words, changing http:// and mailto: prefixed strings into etc. It is still a very important function for processing of bodytext which is normally stored in the database in a format which is not fully ready to be outputted. This situation has not become better by having a RTE around...

This function is actually just splitting the input content according to the configuration of "external blocks". This means that before the input string is actually "parsed" it will be splitted into the parts configured to BE parsed (while other parts/blocks should NOT be parsed). Therefore the actual processing of the parseFunc properties goes on in ->_parseFunc()

Parameters
string$theValueThe value to process.
array$confTypoScript configuration for parseFunc
string$refReference to get configuration from. Eg. "< lib.parseFunc" which means that the configuration of the object path "lib.parseFunc" will be retrieved and MERGED with what is in $conf!
Returns
string The processed value
See also
_parseFunc()

Definition at line 4551 of file ContentObjectRenderer.php.

References GeneralUtility\makeInstance(), and GeneralUtility\trimExplode().

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.

Parameters
string$strInput value
array$confTypoScript Configuration (not used at this point.)
string$contentThe content to wrap the comment around.
Returns
string Processed input value
See also
stdWrap()

Definition at line 3806 of file ContentObjectRenderer.php.

processParams (   $params)

Parses a set of text lines with "[parameters] = [values]" into an array with parameters as keys containing the value If lines are empty or begins with "/" or "#" then they are ignored.

Parameters
string$paramsText which the parameters
Returns
array array with the parameters as key/value pairs
Deprecated:
since TYPO3 CMS 8, will be removed in TYPO3 CMS 9.

Definition at line 6748 of file ContentObjectRenderer.php.

readFlexformIntoConf (   $flexData,
$conf,
  $recursive = false 
)

Converts a given config in Flexform to a conf-array

Parameters
string | array$flexDataFlexform data
array$confArray to write the data into, by reference
bool$recursiveIs set if called recursive. Don't call function with this parameter, it's used inside the function only
Returns
void

Definition at line 1085 of file ContentObjectRenderer.php.

References GeneralUtility\xml2array().

registerContentObjectClass (   $className,
  $contentObjectName 
)

Register a single content object name to class name

This method is private API, please use configuration $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] to add new content objects

Definition at line 649 of file ContentObjectRenderer.php.

removeBadHTML (   $text)

Function for removing malicious HTML code when you want to provide some HTML code user-editable. The purpose is to avoid XSS attacks and the code will be continously modified to remove such code. For a complete reference with javascript-on-events, see http://www.wdvl.com/Authoring/JavaScript/Events/events_target.html

Parameters
string$textInput string to be cleaned.
Returns
string Return string
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9

Definition at line 4038 of file ContentObjectRenderer.php.

References GeneralUtility\logDeprecatedFunction().

replacement (   $content,
array  $configuration 
)
protected

Processes ordered replacements on content data.

Parameters
string$contentThe content to be processed
array$configurationThe TypoScript configuration for stdWrap.replacement
Returns
string The processed content data

Definition at line 4405 of file ContentObjectRenderer.php.

References MathUtility\canBeInterpretedAsInteger().

replacementSingle (   $content,
array  $configuration 
)
protected

Processes a single search/replace on content data.

Parameters
string$contentThe content to be processed
array$configurationThe TypoScript of the search/replace action to be processed
Returns
string The processed content data

Definition at line 4425 of file ContentObjectRenderer.php.

resolveMixedLinkParameter (   $linkText,
  $mixedLinkParameter,
$configuration = [] 
)
protected

called from the typoLink() function

does the magic to split the full "typolink" string like "15,13 _blank myclass &more=1" into separate parts

Parameters
string$linkTextThe string (text) to link
string$mixedLinkParameterdestination data like "15,13 _blank myclass &more=1" used to create the link
array$configurationTypoScript configuration
Returns
array | string
See also
typoLink()

Definition at line 5685 of file ContentObjectRenderer.php.

References $GLOBALS.

rootLineValue (   $key,
  $field,
  $slideBack = false,
  $altRootLine = '' 
)

Returns a value from the current rootline (site) from $GLOBALS['TSFE']->tmpl->rootLine;

Parameters
string$keyWhich level in the root line
string$fieldThe field in the rootline record to return (a field from the pages table)
bool$slideBackIf set, then we will traverse through the rootline from outer level towards the root level until the value found is TRUE
mixed$altRootLineIf you supply an array for this it will be used as an alternative root line array
Returns
string The value from the field of the rootline. private
See also
getData()

Definition at line 5561 of file ContentObjectRenderer.php.

round (   $content,
array  $conf = [] 
)
protected

Implements the "round" property of stdWrap This is a Wrapper function for PHP's rounding functions (round,ceil,floor), defaults to round()

Parameters
string$contentValue to process
array$confTypoScript configuration for round
Returns
string The formatted number

Definition at line 4496 of file ContentObjectRenderer.php.

sanitizeSelectPart (   $selectPart,
  $table 
)
protected

Helper function for getQuery, sanitizing the select part

This functions checks if the necessary fields are part of the select and adds them if necessary.

Parameters
string$selectPartSelect part
string$tableTable to select from
Returns
string Sanitized select part private
See also
getQuery

Definition at line 7718 of file ContentObjectRenderer.php.

References $GLOBALS.

searchWhere (   $sw,
  $searchFieldList,
  $searchTable = '' 
)

Generates a search where clause based on the input search words (AND operation - all search words must be found in record.) Example: The $sw is "content management, system" (from an input form) and the $searchFieldList is "bodytext,header" then the output will be ' AND (bodytext LIKE "%content%" OR header LIKE "%content%") AND (bodytext LIKE "%management%" OR header LIKE "%management%") AND (bodytext LIKE "%system%" OR header LIKE "%system%")'

Parameters
string$swThe search words. These will be separated by space and comma.
string$searchFieldListThe fields to search in
string$searchTableThe table name you search in (recommended for DBAL compliance. Will be prepended field names as well)
Returns
string The WHERE clause.

Definition at line 7326 of file ContentObjectRenderer.php.

setContentObjectClassMap ( array  $contentObjectClassMap)

Allow injecting content object class map.

This method is private API, please use configuration $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] to add new content objects

Definition at line 634 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$contentObjectClassMap.

setCurrentFile (   $fileObject)

Sets the current file object during iterations over files.

Parameters
File$fileObjectThe file object.

Definition at line 1950 of file ContentObjectRenderer.php.

setCurrentVal (   $value)

Sets the "current" value.

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

Definition at line 770 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$currentValKey.

setParent (   $data,
  $currentRecord 
)

Sets the internal variable parentRecord with information about current record. If the ContentObjectRender 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$dataThe record array
string$currentRecordThis is set to the [table]:[uid] of the record delivered in the $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 737 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$currentRecord, and ContentObjectRenderer\$data.

setUserObjectType (   $userObjectType)

Sets the user object type

Parameters
mixed$userObjectType
Returns
void

Definition at line 1053 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$userObjectType.

splitObj (   $value,
  $conf 
)

Implements the "split" property of stdWrap; Splits a string based on a token (given in TypoScript properties), sets the "current" value to each part and then renders a content object pointer to by a number. In classic TypoScript (like 'content (default)'/'styles.content (default)') this is used to render tables, splitting rows and cells by tokens and putting them together again wrapped in

tags etc. Implements the "optionSplit" processing of the TypoScript options for each splitted value to parse.

Parameters
string$valueThe string value to explode by $conf[token] and process each part
array$confTypoScript properties for "split
Returns
string Compiled result private
See also
stdWrap(), ::procesItemStates()

Definition at line 4340 of file ContentObjectRenderer.php.

References $GLOBALS, and MathUtility\canBeInterpretedAsInteger().

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$dataThe record data that is rendered.
string$tableThe table that the data record is from.
Returns
void

Definition at line 663 of file ContentObjectRenderer.php.

References ContentObjectRenderer\$data, $GLOBALS, ContentObjectRenderer\$table, and GeneralUtility\getUserObj().

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$contentInput value undergoing processing in this function. Possibly substituted by other values fetched from another source.
array$confTypoScript "stdWrap properties".
Returns
string The processed input value

Definition at line 1981 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\cImage(), ContentObjectRenderer\getImageSourceCollection(), ContentObjectRenderer\getImageTagTemplate(), ContentObjectRenderer\getSlidePids(), and ContentObjectRenderer\imageLinkWrap().

stdWrap_addPageCacheTags (   $content = '',
  $conf = [] 
)

Add tags to page cache (comma-separated list)

Parameters
string$contentInput value undergoing processing in these functions.
array$confAll stdWrap properties, not just the ones for a particular function.
Returns
string The processed input value

Definition at line 2127 of file ContentObjectRenderer.php.

References GeneralUtility\trimExplode().

stdWrap_addParams (   $content = '',
  $conf = [] 
)

addParams Adds tag attributes to any content that is a tag

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for addParams.
Returns
string The processed input value

Definition at line 3029 of file ContentObjectRenderer.php.

stdWrap_age (   $content = '',
  $conf = [] 
)

age Will return the age of a given timestamp based on configuration given by stdWrap properties

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for age.
Returns
string The processed input value

Definition at line 2767 of file ContentObjectRenderer.php.

References $GLOBALS.

stdWrap_append (   $content = '',
  $conf = [] 
)

append A content object that will be appended to the current content after most of the wraps have already been applied

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for append.
Returns
string The processed input value

Definition at line 3257 of file ContentObjectRenderer.php.

stdWrap_br (   $content = '')

br Searches for single line breaks and replaces them with a
/
tag according to the doctype

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for br.
Returns
string The processed input value

Definition at line 2933 of file ContentObjectRenderer.php.

stdWrap_brTag (   $content = '',
  $conf = [] 
)

brTag Searches for single line feeds and replaces them with the given value

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for brTag.
Returns
string The processed input value

Definition at line 2946 of file ContentObjectRenderer.php.

stdWrap_bytes (   $content = '',
  $conf = [] 
)

bytes Will return the size of a given number in Bytes *

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for bytes.
Returns
string The processed input value

Definition at line 2794 of file ContentObjectRenderer.php.

References GeneralUtility\formatSize().

stdWrap_cacheRead (   $content = '',
  $conf = [] 
)

Check if content was cached before (depending on the given cache key)

Parameters
string$contentInput value undergoing processing in these functions.
array$confAll stdWrap properties, not just the ones for a particular function.
Returns
string The processed input value

Definition at line 2111 of file ContentObjectRenderer.php.

stdWrap_case (   $content = '',
  $conf = [] 
)

case Will transform the content to be upper or lower case only Leaves HTML tags untouched

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for case.
Returns
string The processed input value

Definition at line 2781 of file ContentObjectRenderer.php.

stdWrap_char (   $content = '',
  $conf = [] 
)

char Returns a one-character string containing the character specified by ascii code.

Reliable results only for character codes in the integer range 0 - 127.

See also
http://php.net/manual/en/function.chr.php
Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for char.
Returns
string The processed input value

Definition at line 2630 of file ContentObjectRenderer.php.

stdWrap_cObject (   $content = '',
  $conf = [] 
)

cObject Will replace the content with the value of an official TypoScript cObject like TEXT, COA, HMENU

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for cObject.
Returns
string The processed input value

Definition at line 2235 of file ContentObjectRenderer.php.

stdWrap_crop (   $content = '',
  $conf = [] 
)

crop Crops content to a given size without caring about HTML tags

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for crop.
Returns
string The processed input value

Definition at line 2858 of file ContentObjectRenderer.php.

stdWrap_cropHTML (   $content = '',
  $conf = [] 
)

cropHTML Crops content to a given size while leaving HTML tags untouched

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for cropHTML.
Returns
string The processed input value

Definition at line 2833 of file ContentObjectRenderer.php.

stdWrap_current (   $content = '',
  $conf = [] 
)

current Gets content that has been perviously set as 'current' Can be set via setContentToCurrent or setCurrent or will be set automatically i.e. inside the split function

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for current.
Returns
string The processed input value

Definition at line 2221 of file ContentObjectRenderer.php.

stdWrap_data (   $content = '',
  $conf = [] 
)

data Gets content from different sources based on getText functions, makes use of alternativeData, when set

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for data.
Returns
string The processed input value

Definition at line 2191 of file ContentObjectRenderer.php.

stdWrap_dataWrap (   $content = '',
  $conf = [] 
)

dataWrap Sixth of a set of different wraps which will be applied in a certain order before or after other functions that modify the content Can fetch additional content the same way data does (i.e. {field:whatever}) and apply it to the wrap before that is applied to the content

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for dataWrap.
Returns
string The processed input value

Definition at line 3231 of file ContentObjectRenderer.php.

stdWrap_date (   $content = '',
  $conf = [] 
)

date Will return a formatted date based on configuration given according to PHP date/gmdate properties Will return gmdate when the property GMT returns TRUE

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for date.
Returns
string The processed input value

Definition at line 2712 of file ContentObjectRenderer.php.

References $GLOBALS.

stdWrap_debug (   $content = '')

debug Will output the content as readable HTML code

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 3465 of file ContentObjectRenderer.php.

stdWrap_debugData (   $content = '')

debugData Will output the data used by the current record in a debug table

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 3491 of file ContentObjectRenderer.php.

References debug().

stdWrap_debugFunc (   $content = '',
  $conf = [] 
)

debugFunc Will output the content in a debug table

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for debugFunc.
Returns
string The processed input value

Definition at line 3478 of file ContentObjectRenderer.php.

References debug().

stdWrap_doubleBrTag (   $content = '',
  $conf = [] 
)

doubleBrTag Searches for double line breaks and replaces them with the given value

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for doubleBrTag.
Returns
string The processed input value

Definition at line 2915 of file ContentObjectRenderer.php.

stdWrap_editIcons (   $content = '',
  $conf = [] 
)

editIcons Will render icons for frontend editing as long as there is a BE user logged in

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for editIcons.
Returns
string The processed input value

Definition at line 3378 of file ContentObjectRenderer.php.

stdWrap_editPanel (   $content = '',
  $conf = [] 
)

editPanel Will render the edit panel for frontend editing as long as there is a BE user logged in

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for editPanel.
Returns
string The processed input value

Definition at line 3397 of file ContentObjectRenderer.php.

stdWrap_encapsLines (   $content = '',
  $conf = [] 
)

encapsLines Modifies text blocks by searching for lines which are not surrounded by HTML tags yet and wrapping them with values given by stdWrap properties

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for erncapsLines.
Returns
string The processed input value

Definition at line 2960 of file ContentObjectRenderer.php.

stdWrap_encodeForJavaScriptValue (   $content = '')

encodeForJavaScriptValue Escapes content to be used inside JavaScript strings. No quotes are added around the value as this can easily be done in TypoScript

Parameters
string$contentInput value undergoing processing in this function
Returns
string The processed input value

Definition at line 2902 of file ContentObjectRenderer.php.

References GeneralUtility\quoteJSvalue().

stdWrap_expandList (   $content = '')

expandList Will return a formatted number based on configuration given as stdWrap properties

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2698 of file ContentObjectRenderer.php.

References GeneralUtility\expandList().

stdWrap_field (   $content = '',
  $conf = [] 
)

field Gets content from a DB field

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for field.
Returns
string The processed input value

Definition at line 2207 of file ContentObjectRenderer.php.

stdWrap_fieldRequired (   $content = '',
  $conf = [] 
)

fieldRequired Will immediately stop rendering and return an empty value when there is no content in the field given by fieldRequired

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for fieldRequired.
Returns
string The processed input value

Definition at line 2514 of file ContentObjectRenderer.php.

stdWrap_filelink (   $content = '',
  $conf = [] 
)

filelink Used to make lists of links to files See wrap

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for filelink.
Returns
string The processed input value

Definition at line 3043 of file ContentObjectRenderer.php.

stdWrap_filelist (   $content = '',
  $conf = [] 
)

filelist Will create a list of files based on some additional parameters

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for filelist.
Returns
string The processed input value

Definition at line 2262 of file ContentObjectRenderer.php.

stdWrap_fontTag (   $content = '',
  $conf = [] 
)

fontTag A wrap formerly used to apply font tags to format the content See wrap

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for fontTag.
Returns
string The processed input value
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9

Definition at line 3015 of file ContentObjectRenderer.php.

References GeneralUtility\logDeprecatedFunction().

stdWrap_hash (   $content = '',
array  $conf = [] 
)

Will return a hashed value of the current content

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for hash.
Returns
string The processed input value for a list of supported hash algorithms

Definition at line 2655 of file ContentObjectRenderer.php.

stdWrap_HTMLparser (   $content = '',
  $conf = [] 
)

HTMLparser Will parse HTML content based on functions given as stdWrap properties Heavily used together with RTE based content

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for HTMLparser.
Returns
string The processed input value

Definition at line 2566 of file ContentObjectRenderer.php.

stdWrap_htmlSpecialChars (   $content = '',
  $conf = [] 
)

htmlSpecialChars Transforms HTML tags to readable text by replacing special characters with their HTML entity When preserveEntities returns TRUE, existing entities will be left untouched

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for htmlSpecalChars.
Returns
string The processed input value

Definition at line 2884 of file ContentObjectRenderer.php.

stdWrap_if (   $content = '',
  $conf = [] 
)

if Will immediately stop rendering and return an empty value when the result of the checks returns FALSE

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for if.
Returns
string The processed input value

Definition at line 2496 of file ContentObjectRenderer.php.

stdWrap_ifBlank (   $content = '',
  $conf = [] 
)

ifBlank Will set content to a replacement value in case the trimmed value of content has no length 0 (zero) will not be replaced

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for ifBlank.
Returns
string The processed input value

Definition at line 2367 of file ContentObjectRenderer.php.

stdWrap_ifEmpty (   $content = '',
  $conf = [] 
)

ifEmpty Will set content to a replacement value in case the trimmed value of content returns FALSE 0 (zero) will be replaced as well

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for ifEmpty.
Returns
string The processed input value

Definition at line 2350 of file ContentObjectRenderer.php.

stdWrap_ifNull (   $content = '',
  $conf = [] 
)

ifNull Will set content to a replacement value in case the value of content is NULL

Parameters
string | NULL$contentInput value undergoing processing in this function.
array$confstdWrap properties for ifNull.
Returns
string The processed input value

Definition at line 2336 of file ContentObjectRenderer.php.

stdWrap_innerWrap (   $content = '',
  $conf = [] 
)

innerWrap First of a set of different wraps which will be applied in a certain order before or after other functions that modify the content See wrap

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for innerWrap.
Returns
string The processed input value

Definition at line 2986 of file ContentObjectRenderer.php.

stdWrap_innerWrap2 (   $content = '',
  $conf = [] 
)

innerWrap2 Second of a set of different wraps which will be applied in a certain order before or after other functions that modify the content See wrap

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for innerWrap2.
Returns
string The processed input value

Definition at line 3000 of file ContentObjectRenderer.php.

stdWrap_insertData (   $content = '')

insertData Can fetch additional content the same way data does and replaces any occurrence of {field:whatever} with this content

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 3313 of file ContentObjectRenderer.php.

stdWrap_intval (   $content = '')

intval Will return an integer value of the current content

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2642 of file ContentObjectRenderer.php.

stdWrap_keywords (   $content = '')

keywords Transforms content into a CSV list to be used i.e. as keywords within a meta tag

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2972 of file ContentObjectRenderer.php.

stdWrap_lang (   $content = '',
  $conf = [] 
)

lang Translates content based on the language currently used by the FE

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for lang.
Returns
string The processed input value

Definition at line 2174 of file ContentObjectRenderer.php.

stdWrap_listNum (   $content = '',
  $conf = [] 
)

listNum Gets a value off a CSV list after ifEmpty check Might return an empty value in case the CSV does not contain a value at the position given by listNum Use preIfEmptyListNum to avoid that behaviour

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for listNum.
Returns
string The processed input value

Definition at line 2385 of file ContentObjectRenderer.php.

stdWrap_noTrimWrap (   $content = '',
  $conf = [] 
)

noTrimWrap Fourth of a set of different wraps which will be applied in a certain order before or after other functions that modify the content The major difference to any other wrap is, that this one can make use of whitespace without trimming *

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for noTrimWrap.
Returns
string The processed input value

Definition at line 3192 of file ContentObjectRenderer.php.

stdWrap_numberFormat (   $content = '',
  $conf = [] 
)

numberFormat Will return a formatted number based on configuration given as stdWrap properties

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for numberFormat.
Returns
string The processed input value

Definition at line 2686 of file ContentObjectRenderer.php.

stdWrap_numRows (   $content = '',
  $conf = [] 
)

numRows Counts the number of returned records of a DB operation makes use of select internally

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for numRows.
Returns
string The processed input value

Definition at line 2249 of file ContentObjectRenderer.php.

stdWrap_orderedStdWrap (   $content = '',
  $conf = [] 
)

orderedStdWrap Calls stdWrap for each entry in the provided array

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for orderedStdWrap.
Returns
string The processed input value

Definition at line 3284 of file ContentObjectRenderer.php.

References ArrayUtility\filterAndSortByNumericKeys().

stdWrap_outerWrap (   $content = '',
  $conf = [] 
)

outerWrap Eighth of a set of different wraps which will be applied in a certain order before or after other functions that modify the content

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for outerWrap.
Returns
string The processed input value

Definition at line 3301 of file ContentObjectRenderer.php.

stdWrap_override (   $content = '',
  $conf = [] 
)

override Will override the current value of content with its own value'

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for override.
Returns
string The processed input value

Definition at line 2306 of file ContentObjectRenderer.php.

stdWrap_parseFunc (   $content = '',
  $conf = [] 
)

parseFunc Will parse the content based on functions given as stdWrap properties Heavily used together with RTE based content

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for parseFunc.
Returns
string The processed input value

Definition at line 2552 of file ContentObjectRenderer.php.

stdWrap_postCObject (   $content = '',
  $conf = [] 
)

postCObject A content object that is appended to the current content but between the innerWraps and the rest of the wraps

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for postCObject.
Returns
string The processed input value

Definition at line 3069 of file ContentObjectRenderer.php.

stdWrap_postUserFunc (   $content = '',
  $conf = [] 
)

postUserFunc Will execute a user function after the content has been modified by any other stdWrap function

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for postUserFunc.
Returns
string The processed input value

Definition at line 3326 of file ContentObjectRenderer.php.

stdWrap_postUserFuncInt (   $content = '',
  $conf = [] 
)

postUserFuncInt Will execute a user function after the content has been created and each time it is fetched from Cache The result of this function itself will not be cached

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for postUserFuncInt.
Returns
string The processed input value

Definition at line 3340 of file ContentObjectRenderer.php.

stdWrap_preCObject (   $content = '',
  $conf = [] 
)

preCObject A content object that is prepended to the current content but between the innerWraps and the rest of the wraps

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for preCObject.
Returns
string The processed input value

Definition at line 3056 of file ContentObjectRenderer.php.

stdWrap_prefixComment (   $content = '',
  $conf = [] 
)

prefixComment Will add HTML comments to the content to make it easier to identify certain content elements within the HTML output later on

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for prefixComment.
Returns
string The processed input value

Definition at line 3362 of file ContentObjectRenderer.php.

stdWrap_preIfEmptyListNum (   $content = '',
  $conf = [] 
)

preIfEmptyListNum Gets a value off a CSV list before the following ifEmpty check Makes sure that the result of ifEmpty will be TRUE in case the CSV does not contain a value at the position given by preIfEmptyListNum

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for preIfEmptyListNum.
Returns
string The processed input value

Definition at line 2323 of file ContentObjectRenderer.php.

stdWrap_prepend (   $content = '',
  $conf = [] 
)

prepend A content object that will be prepended to the current content after most of the wraps have already been applied

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for prepend.
Returns
string The processed input value

Definition at line 3244 of file ContentObjectRenderer.php.

stdWrap_preUserFunc (   $content = '',
  $conf = [] 
)

preUserFunc Will execute a user public function before the content will be modified by any other stdWrap function

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for preUserFunc.
Returns
string The processed input value

Definition at line 2275 of file ContentObjectRenderer.php.

stdWrap_prioriCalc (   $content = '',
  $conf = [] 
)

prioriCalc Will use the content as a mathematical term and calculate the result Can be set to 1 to just get a calculated value or 'intval' to get the integer of the result

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for prioriCalc.
Returns
string The processed input value

Definition at line 2610 of file ContentObjectRenderer.php.

References MathUtility\calculateWithParentheses().

stdWrap_rawUrlEncode (   $content = '')

rawUrlEncode Encodes content to be used within URLs

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2870 of file ContentObjectRenderer.php.

stdWrap_removeBadHTML (   $content = '')

removeBadHTML Removes HTML tags based on stdWrap properties

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9

Definition at line 2820 of file ContentObjectRenderer.php.

stdWrap_replacement (   $content = '',
  $conf = [] 
)

replacement Will execute replacements on the content (optionally with preg-regex)

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for replacement.
Returns
string The processed input value

Definition at line 2596 of file ContentObjectRenderer.php.

stdWrap_required (   $content = '')

required Will immediately stop rendering and return an empty value when there is no content at this point

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2478 of file ContentObjectRenderer.php.

stdWrap_round (   $content = '',
  $conf = [] 
)

stdWrap_round will return a rounded number with ceil(), floor() or round(), defaults to round() Only the english number format is supported . (dot) as decimal point

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for round.
Returns
string The processed input value

Definition at line 2673 of file ContentObjectRenderer.php.

stdWrap_setContentToCurrent (   $content = '')

setContentToCurrent actually it just does the contrary: Sets the value of 'current' based on current content

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2146 of file ContentObjectRenderer.php.

stdWrap_setCurrent (   $content = '',
  $conf = [] 
)

setCurrent Sets the value of 'current' based on the outcome of stdWrap operations

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for setCurrent.
Returns
string The processed input value

Definition at line 2160 of file ContentObjectRenderer.php.

stdWrap_space (   $content = '',
  $conf = [] 
)

space Will add space before or after the current content By default this is done with a clear.gif but it can be done with CSS margins by setting the property space.useDiv to TRUE See wrap

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for space.
Returns
string The processed input value

Definition at line 3161 of file ContentObjectRenderer.php.

stdWrap_spaceAfter (   $content = '',
  $conf = [] 
)

spaceAfter Will add space after the current content By default this is done with a clear.gif but it can be done with CSS margins by setting the property space.useDiv to TRUE

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for spaceAfter and space.
Returns
string The processed input value

Definition at line 3146 of file ContentObjectRenderer.php.

stdWrap_spaceBefore (   $content = '',
  $conf = [] 
)

spaceBefore Will add space before the current content By default this is done with a clear.gif but it can be done with CSS margins by setting the property space.useDiv to TRUE

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for spaceBefore and space.
Returns
string The processed input value

Definition at line 3132 of file ContentObjectRenderer.php.

stdWrap_split (   $content = '',
  $conf = [] 
)

split Will split the content by a given token and treat the results separately Automatically fills 'current' with a single result

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for split.
Returns
string The processed input value

Definition at line 2583 of file ContentObjectRenderer.php.

stdWrap_stdWrap (   $content = '',
  $conf = [] 
)

stdWrap A recursive call of the stdWrap function set This enables the user to execute stdWrap functions in another than the predefined order It modifies the content, not the property while the new feature of chained stdWrap functions modifies the property and not the content

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for stdWrap.
Returns
string The processed input value

Definition at line 2447 of file ContentObjectRenderer.php.

stdWrap_stripHtml (   $content = '')

stripHtml Copmletely removes HTML tags from content

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2845 of file ContentObjectRenderer.php.

stdWrap_strPad (   $content = '',
  $conf = [] 
)

strPad Will return a string padded left/right/on both sides, based on configuration given as stdWrap properties

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for strPad.
Returns
string The processed input value

Definition at line 2410 of file ContentObjectRenderer.php.

stdWrap_strtotime (   $content = '',
  $conf = [] 
)

strtotime Will return a timestamp based on configuration given according to PHP strtotime

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for strtotime.
Returns
string The processed input value

Definition at line 2751 of file ContentObjectRenderer.php.

References $GLOBALS.

stdWrap_substring (   $content = '',
  $conf = [] 
)

substring Will return a substring based on position information given by stdWrap properties

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for substring.
Returns
string The processed input value

Definition at line 2807 of file ContentObjectRenderer.php.

stdWrap_TCAselectItem (   $content = '',
  $conf = [] 
)

TCAselectItem Returns a list of options available for a given field in the DB which has to be of the type select

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for TCAselectItem.
Returns
string The processed input value

Definition at line 3115 of file ContentObjectRenderer.php.

stdWrap_trim (   $content = '')

trim Cuts off any whitespace at the beginning and the end of the content

Parameters
string$contentInput value undergoing processing in this function.
Returns
string The processed input value

Definition at line 2397 of file ContentObjectRenderer.php.

stdWrap_typolink (   $content = '',
  $conf = [] 
)

typolink Wraps the content with a link tag URLs and other attributes are created automatically by the values given in the stdWrap properties See wrap

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for typolink.
Returns
string The processed input value

Definition at line 3102 of file ContentObjectRenderer.php.

stdWrap_wrap (   $content = '',
  $conf = [] 
)

wrap This is the "mother" of all wraps Third of a set of different wraps which will be applied in a certain order before or after other functions that modify the content Basically it will put additional content before and after the current content using a split character as a placeholder for the current content The default split character is | but it can be replaced with other characters by the property splitChar Any other wrap that does not have own splitChar settings will be using the default split char though

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for wrap.
Returns
string The processed input value

Definition at line 3178 of file ContentObjectRenderer.php.

stdWrap_wrap2 (   $content = '',
  $conf = [] 
)

wrap2 Fifth of a set of different wraps which will be applied in a certain order before or after other functions that modify the content The default split character is | but it can be replaced with other characters by the property splitChar

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for wrap2.
Returns
string The processed input value

Definition at line 3217 of file ContentObjectRenderer.php.

stdWrap_wrap3 (   $content = '',
  $conf = [] 
)

wrap3 Seventh of a set of different wraps which will be applied in a certain order before or after other functions that modify the content The default split character is | but it can be replaced with other characters by the property splitChar

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for wrap3.
Returns
string The processed input value

Definition at line 3271 of file ContentObjectRenderer.php.

stdWrap_wrapAlign (   $content = '',
  $conf = [] 
)

wrapAlign Wraps content with a div container having the style attribute text-align set to the given value See wrap

Parameters
string$contentInput value undergoing processing in this function.
array$confstdWrap properties for wrapAlign.
Returns
string The processed input value

Definition at line 3083 of file ContentObjectRenderer.php.

stdWrapValue (   $key,
array  $config,
  $defaultValue = '' 
)

Gets a configuration value by passing them through stdWrap first and taking a default value if stdWrap doesn't yield a result.

Parameters
string$keyThe config variable key (from TS array).
array$configThe TypoScript array.
string$defaultValueOptional default value.
Returns
string Value of the config variable

Definition at line 2071 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\cImage(), SplitProcessor\process(), CommaSeparatedValueProcessor\process(), and GalleryProcessor\process().

substituteMarker (   $content,
  $marker,
  $markContent 
)

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

Parameters
string$contentThe content stream, typically HTML template content.
string$markerThe marker string, typically on the form "###[the marker string]###
mixed$markContentThe content to insert instead of the marker string found.
Returns
string The processed HTML content string.
See also
substituteSubpart()

Definition at line 1710 of file ContentObjectRenderer.php.

substituteMarkerAndSubpartArrayRecursive (   $content,
array  $markersAndSubparts,
  $wrap = '',
  $uppercase = false,
  $deleteUnused = false 
)

Replaces all markers and subparts in a template with the content provided in the structured array.

Parameters
string$content
array$markersAndSubparts
string$wrap
bool$uppercase
bool$deleteUnused
Returns
string

Definition at line 1905 of file ContentObjectRenderer.php.

substituteMarkerArray (   $content,
array  $markContentArray,
  $wrap = '',
  $uppercase = false,
  $deleteUnused = false 
)

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$contentThe content stream, typically HTML template content.
array$markContentArrayThe 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$wrapA wrap value - [part 1] | [part 2] - for the markers before substitution
bool$uppercaseIf set, all marker string substitution is done with upper-case markers.
bool$deleteUnusedIf set, all unused marker are deleted.
Returns
string The processed output stream
See also
substituteMarker(), substituteMarkerInObject(), TEMPLATE()

Definition at line 1870 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\cImage(), and ContentObjectRenderer\getImageSourceCollection().

substituteMarkerArrayCached (   $content,
array  $markContentArray = null,
array  $subpartContentArray = null,
array  $wrappedSubpartContentArray = null 
)

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.

Note that the "caching" won't cache the content of the substition, but only the splitting of the template in various parts. So if you want only one cache-entry per template, make sure you always pass the exact same set of marker/subpart keys. Else you will be flooding the user's cache table.

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$contentThe content stream, typically HTML template content.
array$markContentArrayRegular marker-array where the 'keys' are substituted in $content with their values
array$subpartContentArrayExactly like markContentArray only is whole subparts substituted and not only a single marker.
array$wrappedSubpartContentArrayAn 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 1747 of file ContentObjectRenderer.php.

substituteMarkerInObject ( $tree,
array  $markContentArray 
)

Substitute marker array in an array of values

Parameters
mixed$treeIf 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$markContentArrayThe 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 1883 of file ContentObjectRenderer.php.

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 ::substituteSubpart which behaves identical

Parameters
string$contentThe content stream, typically HTML template content.
string$markerThe marker string, typically on the form "###[the marker string]###
mixed$subpartContentThe 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.
bool | int$recursiveIf $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.

Definition at line 1683 of file ContentObjectRenderer.php.

substituteSubpartArray (   $content,
array  $subpartsContent 
)

Substitues multiple subparts at once

Parameters
string$contentThe content stream, typically HTML template content.
array$subpartsContentThe array of key/value pairs being subpart/content values used in the substitution. For each element in this array the function will substitute a subpart in the content stream with the content.
Returns
string The processed HTML content string.

Definition at line 1695 of file ContentObjectRenderer.php.

TCAlookup (   $inputValue,
  $conf 
)

Looks up the incoming value in the defined TCA configuration Works only with TCA-type 'select' and options defined in 'items'

Parameters
mixed$inputValueComma-separated list of values to look up
array$confTS-configuration array, see TSref for details
Returns
string String of translated values, separated by $delimiter. If no matches were found, the input value is simply returned.
Todo:
It would be nice it this function basically looked up any type of value, db-relations etc.

Definition at line 5642 of file ContentObjectRenderer.php.

References $GLOBALS.

typoLink_URL (   $conf)

Based on the input "TypoLink" TypoScript configuration this will return the generated URL

Parameters
array$confTypoScript properties for "typolink
Returns
string The URL of the link-tag that typolink() would by itself return
See also
typoLink()

Definition at line 6324 of file ContentObjectRenderer.php.

typolinkWrap (   $conf)

Generates a typolink and returns the two link tags - start and stop - in an array

Parameters
array$conf"typolink" TypoScript properties
Returns
array An array with two values in key 0+1, each value being the start and close -tag of the typolink properties being inputted in $conf
See also
typolink()

Definition at line 6409 of file ContentObjectRenderer.php.

URLqMark (   $url,
  $params 
)

Checks if $url has a '?' in it and if not, a '?' is inserted between $url and $params, which are anyway concatenated and returned

Parameters
string$urlInput URL
string$paramsURL parameters
Returns
string

Definition at line 6948 of file ContentObjectRenderer.php.

wrap (   $content,
  $wrap,
  $char = '|' 
)

Wrapping a string. Implements the TypoScript "wrap" property. Example: $content = "HELLO WORLD" and $wrap = "<strong> | </strong>", result: "<strong>HELLO WORLD</strong>"

Parameters
string$contentThe content to wrap
string$wrapThe wrap value, eg. "<strong> | </strong> @param string $char The char used to split the wrapping value, default is "|
Returns
string Wrapped input string
See also
noTrimWrap()

Definition at line 6636 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\cImage().

wrapSpace (   $content,
  $wrap,
array  $conf = null 
)

Adds space above/below the input HTML string. It is done by adding a clear-gif and
tag before and/or after the content.

Parameters
string$contentThe content to add space above/below to.
string$wrapA value like "10 | 20" where the first part denotes the space BEFORE and the second part denotes the space AFTER (in pixels)
array$confConfiguration from TypoScript
Returns
string Wrapped string

Definition at line 6674 of file ContentObjectRenderer.php.

Member Data Documentation

$align
Initial value:
= [
'center',
'right',
'left'
]

Definition at line 68 of file ContentObjectRenderer.php.

$alternativeData = ''

Definition at line 399 of file ContentObjectRenderer.php.

$checkPid_badDoktypeList = '255'

Definition at line 459 of file ContentObjectRenderer.php.

$checkPid_cache = []

Definition at line 454 of file ContentObjectRenderer.php.

$cObjHookObjectsArr = []

Definition at line 504 of file ContentObjectRenderer.php.

$cObjHookObjectsRegistry = []
protected

Definition at line 499 of file ContentObjectRenderer.php.

$contentObjectClassMap = []
protected
$currentFile = null
protected

Definition at line 523 of file ContentObjectRenderer.php.

$currentRecord = ''

Definition at line 419 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\setParent().

$currentRecordNumber = 0

Definition at line 433 of file ContentObjectRenderer.php.

$currentRecordTotal = 0

Definition at line 426 of file ContentObjectRenderer.php.

$currentValKey = 'currentValue_kidjls9dksoje'
$data = []
$doConvertToUserIntObject = false

Set to TRUE by doConvertToUserIntObject() if USER object wants to become USER_INT

Definition at line 528 of file ContentObjectRenderer.php.

$getImgResourceHookObjects
protected
$image_compression
Initial value:
= [
10 => [
'params' => ''

Definition at line 262 of file ContentObjectRenderer.php.

$image_effects
Initial value:
= [
1 => '-rotate 90'

Definition at line 359 of file ContentObjectRenderer.php.

$lastTypoLinkLD = []

Definition at line 478 of file ContentObjectRenderer.php.

$lastTypoLinkTarget = ''

Definition at line 473 of file ContentObjectRenderer.php.

$lastTypoLinkUrl = ''

Definition at line 466 of file ContentObjectRenderer.php.

$oldData = []

Definition at line 392 of file ContentObjectRenderer.php.

$parameters = []

Definition at line 406 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\imageLinkWrap().

$parentRecord = []

Definition at line 447 of file ContentObjectRenderer.php.

$parentRecordNumber = 0

Definition at line 440 of file ContentObjectRenderer.php.

$recordRegister = []

Definition at line 492 of file ContentObjectRenderer.php.

$stdWrapHookObjects = []
protected

Definition at line 511 of file ContentObjectRenderer.php.

$stdWrapOrder
Initial value:
= [
'stdWrapPreProcess' => 'hook'

stdWrap functions in their correct order

See also
stdWrap()

Definition at line 79 of file ContentObjectRenderer.php.

$stdWrapRecursionLevel = 0
protected

Definition at line 545 of file ContentObjectRenderer.php.

$stopRendering = []
protected

Definition at line 540 of file ContentObjectRenderer.php.

$substMarkerCache = []

Definition at line 485 of file ContentObjectRenderer.php.

$table = ''
protected
$templateService
protected

Definition at line 555 of file ContentObjectRenderer.php.

$typoScriptFrontendController
protected

Definition at line 550 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\__construct().

$userObjectType = false
protected

Indicates current object type. Can hold one of OBJECTTYPE_ constants or FALSE. The value is set and reset inside USER() function. Any time outside of USER() it is FALSE.

Definition at line 535 of file ContentObjectRenderer.php.

Referenced by ContentObjectRenderer\getUserObjectType(), and ContentObjectRenderer\setUserObjectType().

const OBJECTTYPE_USER = 2

Indicates that object type is USER.

See also
ContentObjectRender::$userObjectType

Definition at line 568 of file ContentObjectRenderer.php.

Referenced by UserContentObject\render().

const OBJECTTYPE_USER_INT = 1

Indicates that object type is USER.

See also
ContentObjectRender::$userObjectType

Definition at line 562 of file ContentObjectRenderer.php.

Referenced by FormContentObject\prepareNonCacheableUserFunction(), and UserInternalContentObject\render().