‪TYPO3CMS  10.4
TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer:

Public Member Functions

 __construct (TypoScriptFrontendController $typoScriptFrontendController=null, ContainerInterface $container=null)
 
array __sleep ()
 
 __wakeup ()
 
 setContentObjectClassMap (array $contentObjectClassMap)
 
 registerContentObjectClass ($className, $contentObjectName)
 
 start ($data, $table='')
 
string getCurrentTable ()
 
 setParent ($data, $currentRecord)
 
mixed getCurrentVal ()
 
 setCurrentVal ($value)
 
string cObjGet ($setup, $addKey='')
 
string cObjGetSingle ($name, $conf, $TSkey='__')
 
AbstractContentObject null getContentObject ($name)
 
string render (AbstractContentObject $contentObject, $configuration=[])
 
mixed getUserObjectType ()
 
 setUserObjectType ($userObjectType)
 
 convertToUserIntObject ()
 
 readFlexformIntoConf ($flexData, &$conf, $recursive=false)
 
string getSlidePids ($pidList, $pidConf)
 
string cImage ($file, $conf)
 
string getBorderAttr ($borderAttr)
 
string getImageTagTemplate ($layoutKey, $conf)
 
string getImageSourceCollection ($layoutKey, $conf, $file)
 
string imageLinkWrap ($string, $imageFile, $conf)
 
 lastChanged ($tstamp)
 
string linkWrap ($content, $wrap)
 
string getAltParam ($conf, $longDesc=true)
 
string getATagParams ($conf, $addGlobal=1)
 
string extLinkATagParams ($URL, $TYPE)
 
 setCurrentFile ($fileObject)
 
File getCurrentFile ()
 
string stdWrap ($content='', $conf=[])
 
string stdWrapValue ($key, array $config, $defaultValue='')
 
string stdWrap_stdWrapPreProcess ($content='', $conf=[])
 
string stdWrap_cacheRead ($content='', $conf=[])
 
string stdWrap_addPageCacheTags ($content='', $conf=[])
 
string stdWrap_setContentToCurrent ($content='')
 
string stdWrap_setCurrent ($content='', $conf=[])
 
string stdWrap_lang ($content='', $conf=[])
 
string stdWrap_data ($content='', $conf=[])
 
string stdWrap_field ($content='', $conf=[])
 
string stdWrap_current ($content='', $conf=[])
 
string stdWrap_cObject ($content='', $conf=[])
 
string stdWrap_numRows ($content='', $conf=[])
 
string stdWrap_preUserFunc ($content='', $conf=[])
 
string stdWrap_stdWrapOverride ($content='', $conf=[])
 
string stdWrap_override ($content='', $conf=[])
 
string stdWrap_preIfEmptyListNum ($content='', $conf=[])
 
string stdWrap_ifNull ($content='', $conf=[])
 
string stdWrap_ifEmpty ($content='', $conf=[])
 
string stdWrap_ifBlank ($content='', $conf=[])
 
string stdWrap_listNum ($content='', $conf=[])
 
string stdWrap_trim ($content='')
 
string stdWrap_strPad ($content='', $conf=[])
 
string stdWrap_stdWrap ($content='', $conf=[])
 
string stdWrap_stdWrapProcess ($content='', $conf=[])
 
string stdWrap_required ($content='')
 
string stdWrap_if ($content='', $conf=[])
 
string stdWrap_fieldRequired ($content='', $conf=[])
 
string stdWrap_csConv ($content='', $conf=[])
 
string stdWrap_parseFunc ($content='', $conf=[])
 
string stdWrap_HTMLparser ($content='', $conf=[])
 
string stdWrap_split ($content='', $conf=[])
 
string stdWrap_replacement ($content='', $conf=[])
 
string stdWrap_prioriCalc ($content='', $conf=[])
 
string stdWrap_char ($content='', $conf=[])
 
string stdWrap_intval ($content='')
 
string stdWrap_hash ($content='', array $conf=[])
 
string stdWrap_round ($content='', $conf=[])
 
string stdWrap_numberFormat ($content='', $conf=[])
 
string stdWrap_expandList ($content='')
 
string stdWrap_date ($content='', $conf=[])
 
string stdWrap_strftime ($content='', $conf=[])
 
string stdWrap_strtotime ($content='', $conf=[])
 
string stdWrap_age ($content='', $conf=[])
 
string stdWrap_case ($content='', $conf=[])
 
string stdWrap_bytes ($content='', $conf=[])
 
string stdWrap_substring ($content='', $conf=[])
 
string stdWrap_cropHTML ($content='', $conf=[])
 
string stdWrap_stripHtml ($content='')
 
string stdWrap_crop ($content='', $conf=[])
 
string stdWrap_rawUrlEncode ($content='')
 
string stdWrap_htmlSpecialChars ($content='', $conf=[])
 
string stdWrap_encodeForJavaScriptValue ($content='')
 
string stdWrap_doubleBrTag ($content='', $conf=[])
 
string stdWrap_br ($content='')
 
string stdWrap_brTag ($content='', $conf=[])
 
string stdWrap_encapsLines ($content='', $conf=[])
 
string stdWrap_keywords ($content='')
 
string stdWrap_innerWrap ($content='', $conf=[])
 
string stdWrap_innerWrap2 ($content='', $conf=[])
 
string stdWrap_preCObject ($content='', $conf=[])
 
string stdWrap_postCObject ($content='', $conf=[])
 
string stdWrap_wrapAlign ($content='', $conf=[])
 
string stdWrap_typolink ($content='', $conf=[])
 
string stdWrap_wrap ($content='', $conf=[])
 
string stdWrap_noTrimWrap ($content='', $conf=[])
 
string stdWrap_wrap2 ($content='', $conf=[])
 
string stdWrap_dataWrap ($content='', $conf=[])
 
string stdWrap_prepend ($content='', $conf=[])
 
string stdWrap_append ($content='', $conf=[])
 
string stdWrap_wrap3 ($content='', $conf=[])
 
string stdWrap_orderedStdWrap ($content='', $conf=[])
 
string stdWrap_outerWrap ($content='', $conf=[])
 
string stdWrap_insertData ($content='')
 
string stdWrap_postUserFunc ($content='', $conf=[])
 
string stdWrap_postUserFuncInt ($content='', $conf=[])
 
string stdWrap_prefixComment ($content='', $conf=[])
 
string stdWrap_editIcons ($content='', $conf=[])
 
string stdWrap_editPanel ($content='', $conf=[])
 
 stdWrap_htmlSanitize (string $content='', array $conf=[])
 
string stdWrap_cacheStore ($content='', $conf=[])
 
string stdWrap_stdWrapPostProcess ($content='', $conf=[])
 
string stdWrap_debug ($content='')
 
string stdWrap_debugFunc ($content='', $conf=[])
 
string stdWrap_debugData ($content='')
 
int numRows ($conf)
 
string listNum ($content, $listNum, $char)
 
bool checkIf ($conf)
 
string HTMLparser_TSbridge ($theValue, $conf)
 
string dataWrap ($content, $wrap)
 
string insertData ($str)
 
string prefixComment ($str, $conf, $content)
 
string substring ($content, $options)
 
string crop ($content, $options)
 
string cropHTML ($content, $options)
 
int calc ($val)
 
string splitObj ($value, $conf)
 
string numberFormat ($content, $conf)
 
string parseFunc ($theValue, $conf, $ref='')
 
string _parseFunc ($theValue, $conf)
 
string encaps_lineSplit ($theValue, $conf)
 
string http_makelinks ($data, $conf)
 
string mailto_makelinks ($data, $conf)
 
array null getImgResource ($file, $fileArray)
 
string null getFieldVal ($field)
 
string getData ($string, $fieldArray=null)
 
string rootLineValue ($key, $field, $slideBack=false, $altRootLine='')
 
mixed getGlobal ($keyString, $source=null)
 
int getKey ($key, $arr)
 
string typoLink ($linkText, $conf)
 
string typoLink_URL ($conf)
 
string getTypoLink ($label, $params, $urlParameters=[], $target='')
 
string getUrlToCurrentLocation ($addQueryString=true)
 
string getTypoLink_URL ($params, $urlParameters=[], $target='')
 
array getMailTo ($mailAddress, $linktxt)
 
string getQueryArguments ($conf, $overruleQueryArguments=[], $forceOverruleArguments=false)
 
string wrap ($content, $wrap, $char='|')
 
string noTrimWrap ($content, $wrap, $char='|')
 
mixed callUserFunction ($funcName, $conf, $content)
 
string keywords ($content)
 
string caseshift ($theValue, $case)
 
string HTMLcaseshift ($theValue, $case)
 
string calcAge ($seconds, $labels)
 
bool sendNotifyEmail ($message, $recipients, $cc, $senderAddress, $senderName='', $replyTo='')
 
array mergeTSRef ($confArr, $prop)
 
string getTreeList ($id, $depth, $begin=0, $dontCheckEnableFields=false, $addSelectFields='', $moreWhereClauses='', array $prevId_array=[], $recursionLevel=0)
 
string searchWhere ($searchWords, $searchFieldList, $searchTable)
 
Statement exec_getQuery ($table, $conf)
 
array getRecords ($tableName, array $queryConfiguration)
 
mixed getQuery ($table, $conf, $returnQueryArray=false)
 
array checkPidArray ($pageIds)
 
array getQueryMarkers ($table, $conf)
 
string editPanel ($content, $conf, $currentRecord='', $dataArray=[])
 
string editIcons ($content, $params, array $conf=[], $currentRecord='', $dataArray=[], $addUrlParamStr='')
 
bool isDisabled ($table, $row)
 

Public Attributes

array $align
 
string[] $stdWrapOrder
 
array $data = array( )
 
array $oldData = array( )
 
string $alternativeData = ''
 
array $parameters = array( )
 
string $currentValKey = 'currentValue_kidjls9dksoje'
 
string $currentRecord = ''
 
int $currentRecordTotal = 0
 
int $currentRecordNumber = 0
 
int $parentRecordNumber = 0
 
array $parentRecord = array( )
 
string int $checkPid_badDoktypeList = PageRepository::DOKTYPE_RECYCLER
 
string $lastTypoLinkUrl = ''
 
string $lastTypoLinkTarget = ''
 
array $lastTypoLinkLD = array( )
 
array $recordRegister = array( )
 
array $cObjHookObjectsArr = array( )
 
bool $doConvertToUserIntObject = false
 
const OBJECTTYPE_USER_INT = 1
 
const OBJECTTYPE_USER = 2
 

Protected Member Functions

array getGetImgResourceHookObjects ()
 
ExceptionHandlerInterface null createExceptionHandler ($configuration=[])
 
string null determineExceptionHandlerClassName ($configuration)
 
array mergeExceptionHandlerConfiguration ($configuration)
 
string replacement ($content, array $configuration)
 
string replacementSingle ($content, array $configuration)
 
string round ($content, array $conf=[])
 
Area null getCropAreaFromFileReference (FileReference $fileReference, array $fileArray)
 
Area null getCropAreaFromFromTypoScriptSettings (FileInterface $file, array $fileArray)
 
Area createCropAreaFromJsonString (string $cropSettings, string $cropVariant)
 
string int getFileDataKey ($key)
 
array string resolveMixedLinkParameter ($linkText, $mixedLinkParameter, &$configuration=[])
 
 addSecurityRelValues (array $tagAttributes, ?string $target, string $url)
 
bool isInternalUrl (string $url)
 
string null processUrl ($context, $url, $typolinkConfiguration=[])
 
string encryptEmail (string $string, $type)
 
string encryptCharcode ($n, $start, $end, $offset)
 
array getQueryArray (QueryBuilder $queryBuilder)
 
string getQueryArrayJoinHelper (string $fromAlias, array $joinParts, array &$knownAliases)
 
array getQueryConstraints (string $table, array $conf)
 
string TYPO3 CMS Core Database Query Expression CompositeExpression null getLanguageRestriction (ExpressionBuilder $expressionBuilder, string $table, array $conf, Context $context)
 
string sanitizeSelectPart ($selectPart, $table)
 
ResourceFactory getResourceFactory ()
 
string getEnvironmentVariable ($key)
 
string bool getFromCache (array $configuration)
 
int null calculateCacheLifetime (array $configuration)
 
array calculateCacheTags (array $configuration)
 
string calculateCacheKey (array $configuration)
 
TYPO3 CMS Backend FrontendBackendUserAuthentication getFrontendBackendUser ()
 
TimeTracker getTimeTracker ()
 
TYPO3 CMS Frontend Controller TypoScriptFrontendController getTypoScriptFrontendController ()
 
string resolveAnchorLink (string $linkText, array $conf)
 
int getContentLengthOfCurrentTag (string $theValue, int $pointer, string $currentTag)
 
 shallDebug ()
 

Protected Attributes

ContainerInterface $container
 
array $contentObjectClassMap = array( )
 
string $table = ''
 
array $cObjHookObjectsRegistry = array( )
 
array $stdWrapHookObjects = array( )
 
array $getImgResourceHookObjects
 
File FileReference Folder null $currentFile
 
bool $userObjectType = false
 
array $stopRendering = array( )
 
int $stdWrapRecursionLevel = 0
 
TypoScriptFrontendController null $typoScriptFrontendController
 

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

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::__construct ( TypoScriptFrontendController  $typoScriptFrontendController = null,
ContainerInterface  $container = null 
)
Parameters
TypoScriptFrontendController$typoScriptFrontendController
ContainerInterface$container

Definition at line 442 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$container, $GLOBALS, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$typoScriptFrontendController.

Member Function Documentation

◆ __sleep()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::__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 456 of file ContentObjectRenderer.php.

◆ __wakeup()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::__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 475 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ _parseFunc()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::_parseFunc (   $theValue,
  $conf 
)

Helper function for parseFunc()

Parameters
string$theValue‪The value to process.
array$conf‪TypoScript configuration for parseFunc
Returns
‪string The processed value
See also
parseFunc()

Definition at line 3875 of file ContentObjectRenderer.php.

◆ addSecurityRelValues()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::addSecurityRelValues ( array  $tagAttributes,
?string  $target,
string  $url 
)
protected

Definition at line 5284 of file ContentObjectRenderer.php.

◆ calc()

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calc (   $val)

Performs basic mathematical evaluation of the input string. Does NOT take parenthesis and operator precedence into account! (for that, see \TYPO3\CMS\Core\Utility\MathUtility::calculateWithPriorityToAdditionAndSubtraction())

Parameters
string$val‪The 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
‪\TYPO3\CMS\Core\Utility\MathUtility::calculateWithPriorityToAdditionAndSubtraction()

Definition at line 3476 of file ContentObjectRenderer.php.

◆ calcAge()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calcAge (   $seconds,
  $labels 
)

Returns the 'age' of the tstamp $seconds

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

Definition at line 5802 of file ContentObjectRenderer.php.

◆ calculateCacheKey()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calculateCacheKey ( array  $configuration)
protected

Applies stdWrap to the cache key

Parameters
array$configuration
Returns
‪string

Definition at line 7128 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\render().

◆ calculateCacheLifetime()

int null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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 7091 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\render().

◆ calculateCacheTags()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::calculateCacheTags ( array  $configuration)
protected

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

Parameters
array$configuration
Returns
‪array

Definition at line 7113 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\render().

◆ callUserFunction()

mixed TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$funcName‪The 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$conf‪The TypoScript configuration to pass the function
mixed$content‪The content payload to pass the function
Returns
‪mixed The return content from the function call. Should probably be a string.
See also
stdWrap()
typoLink()
_parseFunc()

Definition at line 5672 of file ContentObjectRenderer.php.

◆ caseshift()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::caseshift (   $theValue,
  $case 
)

Changing character case of a string, converting typically used western charset characters as well.

Parameters
string$theValue‪The string to change case for.
string$case‪The direction; either "upper" or "lower
Returns
‪string
See also
HTMLcaseshift()

Definition at line 5732 of file ContentObjectRenderer.php.

◆ checkIf()

bool TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::checkIf (   $conf)

◆ checkPidArray()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::checkPidArray (   $pageIds)

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
int[]$pageIds‪Array 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

Definition at line 6811 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getSlidePids().

◆ cImage()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cImage (   $file,
  $conf 
)

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

Parameters
string$file‪File TypoScript resource
array$conf‪TypoScript configuration properties
Returns
‪string HTML tag, (possibly wrapped in links and other HTML) if any image found.
Deprecated:
‪will be removed in TYPO3 v11.0
See also
‪IMAGE()

Definition at line 1030 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getAltParam(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getBorderAttr(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getImageSourceCollection(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getImageTagTemplate(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getImgResource(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getTypoScriptFrontendController(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\imageLinkWrap(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\linkWrap(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrapValue(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\wrap().

◆ cObjGet()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cObjGet (   $setup,
  $addKey = '' 
)

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

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

Definition at line 647 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cObjGetSingle(), and TYPO3\CMS\Core\Utility\ArrayUtility\filterAndSortByNumericKeys().

◆ cObjGetSingle()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cObjGetSingle (   $name,
  $conf,
  $TSkey = '__' 
)

◆ convertToUserIntObject()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::convertToUserIntObject ( )

Requests the current USER object to be converted to USER_INT.

Definition at line 925 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getTimeTracker(), and TYPO3\CMS\Core\TimeTracker\TimeTracker\setTSlogMessage().

◆ createCropAreaFromJsonString()

Area TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::createCropAreaFromJsonString ( string  $cropSettings,
string  $cropVariant 
)
protected

Takes a JSON string and creates CropVariantCollection and fetches the corresponding CropArea for that.

Parameters
string$cropSettings
string$cropVariant
Returns
‪Area

Definition at line 4598 of file ContentObjectRenderer.php.

◆ createExceptionHandler()

ExceptionHandlerInterface null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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
‪ExceptionHandlerInterface|null
Exceptions
ContentRenderingException

Definition at line 835 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\determineExceptionHandlerClassName(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\mergeExceptionHandlerConfiguration().

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\render().

◆ crop()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::crop (   $content,
  $options 
)

Implements the stdWrap property "crop" which is a modified "substr" function allowing to limit a string length to a certain number of chars (from either start or end of string) and having a pre/postfix applied if the string really was cropped.

Parameters
string$content‪The string to perform the operation on
string$options‪The parameters splitted by "|": First parameter is the max number of chars of the string. Negative value means cropping from end of string. Second parameter is the pre/postfix string to apply if cropping occurs. Third parameter is a boolean value. If set then crop will be applied at nearest space.
Returns
‪string The processed input value.
See also
stdWrap()

Definition at line 3276 of file ContentObjectRenderer.php.

◆ cropHTML()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cropHTML (   $content,
  $options 
)

Implements the stdWrap property "cropHTML" which is a modified "substr" function allowing to limit a string length to a certain number of chars (from either start or end of string) and having a pre/postfix applied if the string really was cropped.

Compared to stdWrap.crop it respects HTML tags and entities.

Parameters
string$content‪The string to perform the operation on
string$options‪The parameters splitted by "|": First parameter is the max number of chars of the string. Negative value means cropping from end of string. Second parameter is the pre/postfix string to apply if cropping occurs. Third parameter is a boolean value. If set then crop will be applied at nearest space.
Returns
‪string The processed input value.
See also
stdWrap()

Definition at line 3316 of file ContentObjectRenderer.php.

◆ dataWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::dataWrap (   $content,
  $wrap 
)

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

Parameters
string$content‪Input string being wrapped
string$wrap‪The 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 3176 of file ContentObjectRenderer.php.

◆ determineExceptionHandlerClassName()

string null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::determineExceptionHandlerClassName (   $configuration)
protected

Determine exception handler class name from global and content object configuration

Parameters
array$configuration
Returns
‪string|null

Definition at line 855 of file ContentObjectRenderer.php.

References TYPO3\CMS\Core\Core\Environment\getContext(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\createExceptionHandler().

◆ editIcons()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::editIcons (   $content,
  $params,
array  $conf = [],
  $currentRecord = '',
  $dataArray = [],
  $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$content‪The content to which the edit icons should be appended
string$params‪The 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$conf‪TypoScript properties for configuring the edit icons.
string$currentRecord‪The "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$dataArray‪Alternative data array to use. Default is $this->data
string$addUrlParamStr‪Additional 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 6980 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ editPanel()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::editPanel (   $content,
  $conf,
  $currentRecord = '',
  $dataArray = [] 
)

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$content‪A 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$conf‪TypoScript configuration properties for the editPanel
string$currentRecord‪The "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$dataArray‪Alternative 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 6916 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ encaps_lineSplit()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::encaps_lineSplit (   $theValue,
  $conf 
)

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

Parameters
string$theValue‪The input value
array$conf‪TypoScript options
Returns
‪string The processed input value being returned; Splitted lines imploded by LF again.

Definition at line 4126 of file ContentObjectRenderer.php.

◆ encryptCharcode()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::encryptCharcode (   $n,
  $start,
  $end,
  $offset 
)
protected

Encryption (or decryption) of a single character. Within the given range the character is shifted with the supplied offset.

Parameters
int$n‪Ordinal of input character
int$start‪Start of range
int$end‪End of range
int$offset‪Offset
Returns
‪string encoded/decoded version of character

Definition at line 5562 of file ContentObjectRenderer.php.

◆ encryptEmail()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::encryptEmail ( string  $string,
  $type 
)
protected

Encryption of email addresses for -tags See the spam protection setup in TS 'config.'

Parameters
string$string‪Input string to en/decode: "mailto:some@example.com @param mixed $type - either "ascii" or a number between -10 and 10, taken from config.spamProtectEmailAddresses
Returns
‪string encoded version of $string

Definition at line 5521 of file ContentObjectRenderer.php.

◆ exec_getQuery()

Statement TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$table‪The table name
array$conf‪The TypoScript configuration properties
Returns
‪Statement
See also
getQuery()

Definition at line 6229 of file ContentObjectRenderer.php.

◆ extLinkATagParams()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$URL‪URL of the website
string$TYPE
Returns
‪string The additional tag properties

This method will be removed as it serves no purpose anymore in TYPO3 v11.0

Definition at line 1535 of file ContentObjectRenderer.php.

◆ getAltParam()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$conf‪TypoScript configuration properties
bool$longDesc‪If set, the longdesc attribute will be generated - must only be used for img elements!
Returns
‪string Parameter string containing alt and title parameters (if any)
Deprecated:
‪will be removed in TYPO3 v11.0.

Definition at line 1459 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage().

◆ getATagParams()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getATagParams (   $conf,
  $addGlobal = 1 
)

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

Parameters
array$conf‪TypoScript configuration properties
bool | int$addGlobal‪If set, will add the global config.ATagParams to the link
Returns
‪string String containing the parameters to the A tag (if non empty, with a leading space)
See also
‪typolink()

Definition at line 1497 of file ContentObjectRenderer.php.

◆ getBorderAttr()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$borderAttr‪The border attribute
Returns
‪string The border attribute
Deprecated:
‪will be removed in TYPO3 v11.0.

Definition at line 1099 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage().

◆ getContentLengthOfCurrentTag()

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getContentLengthOfCurrentTag ( string  $theValue,
int  $pointer,
string  $currentTag 
)
protected

Get content length of the current tag that could also contain nested tag contents

Parameters
string$theValue
int$pointer
string$currentTag
Returns
‪int

Definition at line 7191 of file ContentObjectRenderer.php.

◆ getContentObject()

AbstractContentObject null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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
‪AbstractContentObject|null
Exceptions
ContentRenderingException

Definition at line 754 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cObjGetSingle(), TYPO3\CMS\Extbase\Configuration\ConfigurationManager\getContentObject(), TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor\process(), and TYPO3\CMS\Frontend\DataProcessing\MenuProcessor\process().

◆ getCropAreaFromFileReference()

Area null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getCropAreaFromFileReference ( FileReference  $fileReference,
array  $fileArray 
)
protected

Returns an ImageManipulation\Area object for the given cropVariant (or 'default') or null if the crop settings or crop area is empty.

The cropArea from file reference is used, if not set in TypoScript.

Example TypoScript settings: file.crop = OR file.crop = 50,50,100,100 OR file.crop.data = file:current:crop

Parameters
FileReference$fileReference
array$fileArray‪TypoScript properties for the imgResource type
Returns
‪Area|null

Definition at line 4536 of file ContentObjectRenderer.php.

References TYPO3\CMS\Core\Resource\FileReference\getProperty().

◆ getCropAreaFromFromTypoScriptSettings()

Area null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getCropAreaFromFromTypoScriptSettings ( FileInterface  $file,
array  $fileArray 
)
protected

Returns an ImageManipulation\Area object for the given cropVariant (or 'default') or null if the crop settings or crop area is empty.

Parameters
FileInterface$file
array$fileArray
Returns
‪Area|null

Definition at line 4557 of file ContentObjectRenderer.php.

◆ getCurrentFile()

File TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getCurrentFile ( )

Gets the current file object during iterations over files.

Returns
‪File The current file object.

Definition at line 1569 of file ContentObjectRenderer.php.

◆ getCurrentTable()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getCurrentTable ( )

Returns the current table

Returns
‪string

Definition at line 567 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$table.

Referenced by TYPO3\CMS\Frontend\DataProcessing\FilesProcessor\process().

◆ getCurrentVal()

mixed TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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 622 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$currentValKey.

◆ getData()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$string‪The 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)
array | null$fieldArray‪Alternative 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 4637 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ getEnvironmentVariable()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getEnvironmentVariable (   $key)
protected

Wrapper function for GeneralUtility::getIndpEnv()

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

Definition at line 7056 of file ContentObjectRenderer.php.

◆ getFieldVal()

string null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$field‪The 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|null

Definition at line 4614 of file ContentObjectRenderer.php.

◆ getFileDataKey()

string int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getFileDataKey (   $key)
protected

Gets file information. This is a helper function for the getData() method above, which resolves e.g. page.10.data = file:current:title or page.10.data = file:17:title

Parameters
string$key‪A colon-separated key, e.g. 17:name or current:sha1, with the first part being a sys_file uid or the keyword "current" and the second part being the key of information to get from file (e.g. "title", "size", "description", etc.)
Returns
‪string|int The value as retrieved from the file object.

Definition at line 4874 of file ContentObjectRenderer.php.

◆ getFromCache()

string bool TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getFromCache ( array  $configuration)
protected

Fetches content from cache

Parameters
array$configuration‪Array
Returns
‪string|bool FALSE on cache miss
Exceptions

Definition at line 7068 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\render().

◆ getFrontendBackendUser()

TYPO3 CMS Backend FrontendBackendUserAuthentication TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getFrontendBackendUser ( )
protected

Returns the current BE user.

Returns
‪\TYPO3\CMS\Backend\FrontendBackendUserAuthentication

Definition at line 7141 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ getGetImgResourceHookObjects()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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 578 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$getImgResourceHookObjects, and $GLOBALS.

◆ getGlobal()

mixed TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$keyString‪Global var key, eg. "HTTP_GET_VAR" or "HTTP_GET_VARS|id" to get the GET parameter "id" back.
array$source‪Alternative array than $GLOBAL to get variables from.
Returns
‪mixed Whatever value. If none, then blank string.
See also
getData()

Definition at line 4965 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ getImageSourceCollection()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getImageSourceCollection (   $layoutKey,
  $conf,
  $file 
)

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

Parameters
string$layoutKey‪rendering key
array$conf‪TypoScript configuration properties
string$file
Exceptions

Definition at line 1147 of file ContentObjectRenderer.php.

References $GLOBALS, TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\checkIf(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getImgResource(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getTypoScriptFrontendController(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap().

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage().

◆ getImageTagTemplate()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$layoutKey‪rendering key
array$conf‪TypoScript configuration properties
Returns
‪string
Deprecated:
‪will be removed in TYPO3 v11.0.

Definition at line 1123 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap().

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage().

◆ getImgResource()

array null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getImgResource (   $file,
  $fileArray 
)

Creates and returns a TypoScript "imgResource". The value ($file) can either be a file reference (TypoScript resource) or the string "GIFBUILDER". In the first case a current image is returned, possibly scaled down or otherwise processed. In the latter case a GIFBUILDER image is returned; This means an image is made by TYPO3 from layers of elements as GIFBUILDER defines. In the function IMG_RESOURCE() this function is called like $this->getImgResource($conf['file'], $conf['file.']);

Structure of the returned info array: 0 => width 1 => height 2 => file extension 3 => file name origFile => original file name origFile_mtime => original file mtime – only available if processed via FAL: – originalFile => original file object processedFile => processed file object fileCacheHash => checksum of processed file

Parameters
string | File | FileReference$file‪A "imgResource" TypoScript data type. Either a TypoScript file resource, a file or a file reference object or the string GIFBUILDER. See description above.
array$fileArray‪TypoScript properties for the imgResource type
Returns
‪array|null Returns info-array
See also
cImage()
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder

Definition at line 4384 of file ContentObjectRenderer.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getImageSourceCollection(), and TYPO3\CMS\Frontend\Imaging\GifBuilder\getResource().

◆ getKey()

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$key‪The integer to transform
array$arr‪array in which the key should be found.
Returns
‪int The processed integer key value.
See also
getData()

Definition at line 4998 of file ContentObjectRenderer.php.

◆ getLanguageRestriction()

string TYPO3 CMS Core Database Query Expression CompositeExpression null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getLanguageRestriction ( ExpressionBuilder  $expressionBuilder,
string  $table,
array  $conf,
Context  $context 
)
protected

Adds parts to the WHERE clause that are related to language. This only works on TCA tables which have the [ctrl][languageField] field set or if they have select.languageField = my_language_field set explicitly.

It is also possible to disable the language restriction for a query by using select.languageField = 0, if select.languageField is not explicitly set, the TCA default values are taken.

If the table is "localizeable" (= any of the criteria above is met), then the DB query is restricted:

If the current language aspect has overlays enabled, then the only records with language "0" or "-1" are fetched (the overlays are taken care of later-on). if the current language has overlays but also records without localization-parent (free mode) available, then these are fetched as well. This can explicitly set via select.includeRecordsWithoutDefaultTranslation = 1 which overrules the overlayType within the language aspect.

If the language aspect has NO overlays enabled, it behaves as in "free mode" (= only fetch the records for the current language.

Parameters
ExpressionBuilder$expressionBuilder
string$table
array$conf
Context$context
Returns
‪string|\TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression|null
Exceptions

Definition at line 6715 of file ContentObjectRenderer.php.

References $GLOBALS, TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\andX(), TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\eq(), TYPO3\CMS\Core\Context\Context\getAspect(), TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\in(), and TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder\orX().

◆ getMailTo()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$mailAddress‪Email address
string$linktxt‪Link text, default will be the email address.
Returns
‪array 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 5477 of file ContentObjectRenderer.php.

◆ getQuery()

mixed TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$table‪See ->exec_getQuery()
array$conf‪See ->exec_getQuery()
bool$returnQueryArray‪If 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.
Exceptions

Definition at line 6284 of file ContentObjectRenderer.php.

◆ getQueryArguments()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getQueryArguments (   $conf,
  $overruleQueryArguments = [],
  $forceOverruleArguments = false 
)

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

Parameters
array$confConfiguration
array$overruleQueryArguments‪Multidimensional key/value pairs that overrule incoming query arguments
bool$forceOverruleArguments‪If 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 5582 of file ContentObjectRenderer.php.

◆ getQueryArray()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getQueryArray ( QueryBuilder  $queryBuilder)
protected

Helper to transform a QueryBuilder object into a queryParts array that can be used with exec_SELECT_queryArray

Parameters
\TYPO3\CMS\Core\Database\Query\QueryBuilder$queryBuilder
Returns
‪array
Exceptions

Definition at line 6490 of file ContentObjectRenderer.php.

References TYPO3\CMS\Core\Database\Query\QueryBuilder\getFirstResult(), TYPO3\CMS\Core\Database\Query\QueryBuilder\getMaxResults(), and TYPO3\CMS\Core\Database\Query\QueryBuilder\getQueryPart().

◆ getQueryArrayJoinHelper()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getQueryArrayJoinHelper ( string  $fromAlias,
array  $joinParts,
array &  $knownAliases 
)
protected

Helper to transform the QueryBuilder join part into a SQL fragment.

Parameters
string$fromAlias
array$joinParts
array$knownAliases
Returns
‪string
Exceptions

Definition at line 6538 of file ContentObjectRenderer.php.

◆ getQueryConstraints()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getQueryConstraints ( string  $table,
array  $conf 
)
protected

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

Parameters
string$table‪The table name
array$conf‪The TypoScript configuration properties
Returns
‪array Associative array containing the prepared data for WHERE, ORDER BY and GROUP BY fragments
Exceptions

Definition at line 6572 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ getQueryMarkers()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$table‪Table to select records from
array$conf‪Select part of CONTENT definition
Returns
‪array List of values to replace markers with
See also
getQuery()

Definition at line 6834 of file ContentObjectRenderer.php.

◆ getRecords()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$tableName‪the name of the TCA database table
array$queryConfiguration‪The TypoScript configuration properties, see .select in TypoScript reference
Returns
‪array The records
Exceptions

Definition at line 6246 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor\process().

◆ getResourceFactory()

ResourceFactory TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getResourceFactory ( )
protected

Get instance of FAL resource factory

Returns
‪ResourceFactory

Definition at line 7044 of file ContentObjectRenderer.php.

◆ getSlidePids()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getSlidePids (   $pidList,
  $pidConf 
)

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

Parameters
string$pidList‪A list of page Content-Element PIDs (Page UIDs) / stdWrap
array$pidConf‪stdWrap array for the list
Returns
‪string A list of PIDs

Definition at line 992 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\checkPidArray(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getTypoScriptFrontendController(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap().

◆ getTimeTracker()

TimeTracker TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTimeTracker ( )
protected

◆ getTreeList()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList (   $id,
  $depth,
  $begin = 0,
  $dontCheckEnableFields = false,
  $addSelectFields = '',
  $moreWhereClauses = '',
array  $prevId_array = [],
  $recursionLevel = 0 
)

Generates a list of Page-uid's from $id. List does not include $id itself (unless the id specified is negative in which case it does!) The only pages WHICH PREVENTS DECENDING in a branch are

  • ‪deleted pages,
  • ‪pages in a recycler (doktype = 255) or of the Backend User Section (doktpe = 6) type
  • ‪pages that has the extendToSubpages set, WHERE start/endtime, hidden and fe_users would hide the records. Apart from that, pages with enable-fields excluding them, will also be removed. HOWEVER $dontCheckEnableFields set will allow enableFields-excluded pages to be included anyway - including extendToSubpages sections! Mount Pages are also descended but notice that these ID numbers are not useful for links unless the correct MPvar is set.
Parameters
int$id‪The id of the start page from which point in the page tree to descend. IF NEGATIVE the id itself is included in the end of the list (only if $begin is 0) AND the output does NOT contain a last comma. Recommended since it will resolve the input ID for mount pages correctly and also check if the start ID actually exists!
int$depth‪The number of levels to descend. If you want to descend infinitely, just set this to 100 or so. Should be at least "1" since zero will just make the function return (no descend...)
int$begin‪Is an optional integer that determines at which level in the tree to start collecting uid's. Zero means 'start right away', 1 = 'next level and out'
bool$dontCheckEnableFields‪See function description
string$addSelectFields‪Additional fields to select. Syntax: ",[fieldname],[fieldname],... @param string $moreWhereClauses Additional where clauses. Syntax: " AND [fieldname]=[value] AND ...
array$prevId_array‪array of IDs from previous recursions. In order to prevent infinite loops with mount pages.
int$recursionLevel‪Internal: Zero for the first recursion, incremented for each recursive call.
Returns
‪string Returns the list of ids as a comma separated string
See also
TypoScriptFrontendController::checkEnableFields()
TypoScriptFrontendController::checkPagerecordForIncludeSection()

Definition at line 5945 of file ContentObjectRenderer.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Seo\XmlSitemap\PagesXmlSitemapDataProvider\getPages(), and TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager\getRecursiveStoragePids().

◆ getTypoLink()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$label‪Text string being wrapped by the link.
string$params‪Link parameter; eg. "123" for page id, "kasperYYYY@typo3.com" for email address, "http://...." for URL, "fileadmin/example.txt" for file.
array | string$urlParameters‪As 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$target‪Specific target set, if any. (Default is using the current)
Returns
‪string The wrapped $label-text string
See also
getTypoLink_URL()

Definition at line 5370 of file ContentObjectRenderer.php.

◆ getTypoLink_URL()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTypoLink_URL (   $params,
  $urlParameters = [],
  $target = '' 
)

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

Parameters
string$params‪Link parameter; eg. "123" for page id, "kasperYYYY@typo3.com" for email address, "http://...." for URL, "fileadmin/example.txt" for file.
array | string$urlParameters‪As 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$target‪Specific target set, if any. (Default is using the current)
Returns
‪string The URL
See also
getTypoLink()

Definition at line 5422 of file ContentObjectRenderer.php.

◆ getTypoScriptFrontendController()

◆ getUrlToCurrentLocation()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$addQueryString‪Whether additional GET arguments in the query string should be included or not
Returns
‪string

Definition at line 5397 of file ContentObjectRenderer.php.

◆ getUserObjectType()

mixed TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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 907 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$userObjectType.

◆ HTMLcaseshift()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::HTMLcaseshift (   $theValue,
  $case 
)

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

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

Definition at line 5774 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\HTMLcaseshift().

◆ HTMLparser_TSbridge()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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 \TYPO3\CMS\Core\Html\HtmlParser class.

Parameters
string$theValue‪The value to parse by the class \TYPO3\CMS\Core\Html\HtmlParser
array$conf‪TypoScript properties for the parser. See link.
Returns
‪string Return value.
See also
stdWrap()
‪\TYPO3\CMS\Core\Html\HtmlParser::HTMLparserConfig()
‪\TYPO3\CMS\Core\Html\HtmlParser::HTMLcleaner()

Definition at line 3160 of file ContentObjectRenderer.php.

◆ http_makelinks()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$data‪The 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 4245 of file ContentObjectRenderer.php.

◆ imageLinkWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::imageLinkWrap (   $string,
  $imageFile,
  $conf 
)

◆ insertData()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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. If the content inside the curly braces starts with a hash sign {#...} it is a field name that must be quoted by Doctrine DBAL and is skipped here for later processing.

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$str‪Input value
Returns
‪string Processed input value
See also
getData()
stdWrap()
dataWrap()

Definition at line 3196 of file ContentObjectRenderer.php.

◆ isDisabled()

bool TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$table‪The table name
array$row‪The data record
Returns
‪bool
See also
‪editPanelPreviewBorder()

Definition at line 7029 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ isInternalUrl()

bool TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::isInternalUrl ( string  $url)
protected

Checks whether the given url is an internal url.

It will check the host part only, against all configured sites whether the given host is any. If so, the url is considered internal

Parameters
string$url‪The url to check.
Returns
‪bool
Exceptions

Definition at line 5314 of file ContentObjectRenderer.php.

◆ keywords()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::keywords (   $content)

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

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

Definition at line 5712 of file ContentObjectRenderer.php.

◆ lastChanged()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$tstamp‪Unix timestamp (number of seconds since 1970)
See also
TypoScriptFrontendController::setSysLastChanged()

Definition at line 1417 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentContentObject\render().

◆ linkWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input string
string$wrap‪A string where the first two parts separated by "|" (vertical line) will be wrapped around the input string
Returns
‪string Wrapped output string
See also
wrap()
cImage()
Deprecated:
‪will be removed in TYPO3 v11.0.

Definition at line 1437 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage().

◆ listNum()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::listNum (   $content,
  $listNum,
  $char 
)

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

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

Definition at line 3046 of file ContentObjectRenderer.php.

◆ mailto_makelinks()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$data‪The 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 4322 of file ContentObjectRenderer.php.

◆ mergeExceptionHandlerConfiguration()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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 885 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\createExceptionHandler().

◆ mergeTSRef()

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$confArr‪The TypoScript array
string$prop‪The 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 5897 of file ContentObjectRenderer.php.

◆ noTrimWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪The content to wrap, eg. "HELLO WORLD @param string $wrap The wrap value, eg. " | |
string$char‪The char used to split the wrapping value, default is "|"
Returns
‪string Wrapped input string, eg. " HELLO WORD
See also
wrap()

Definition at line 5649 of file ContentObjectRenderer.php.

◆ numberFormat()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::numberFormat (   $content,
  $conf 
)

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

Parameters
float$content‪Value to process
array$conf‪TypoScript Configuration for numberFormat
Returns
‪string The formatted number

Definition at line 3714 of file ContentObjectRenderer.php.

◆ numRows()

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::numRows (   $conf)

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

Parameters
array$conf‪TypoScript properties for the property (see link to "numRows")
Returns
‪int The number of rows found by the select
See also
stdWrap()

Definition at line 3030 of file ContentObjectRenderer.php.

◆ parseFunc()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$theValue‪The value to process.
array$conf‪TypoScript configuration for parseFunc
string$ref‪Reference 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 3747 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Functional\ContentObject\ContentObjectRendererTest\libParseFuncProperlyKeepsTagsUnescaped().

◆ prefixComment()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$str‪Input value
array$conf‪TypoScript Configuration (not used at this point.)
string$content‪The content to wrap the comment around.
Returns
‪string Processed input value
See also
stdWrap()

Definition at line 3233 of file ContentObjectRenderer.php.

References $output.

◆ processUrl()

string null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::processUrl (   $context,
  $url,
  $typolinkConfiguration = [] 
)
protected

Loops over all configured URL modifier hooks (if available) and returns the generated URL or NULL if no URL was generated.

Parameters
string$context‪The context in which the method is called (e.g. typoLink).
string$url‪The URL that should be processed.
array$typolinkConfiguration‪The current link configuration array.
Returns
‪string|null Returns NULL if URL was not processed or the processed URL as a string.
Exceptions

Definition at line 5437 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ readFlexformIntoConf()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::readFlexformIntoConf (   $flexData,
$conf,
  $recursive = false 
)

Converts a given config in Flexform to a conf-array

Parameters
string | array$flexData‪Flexform data
array$conf‪Array to write the data into, by reference
bool$recursive‪Is set if called recursive. Don't call function with this parameter, it's used inside the function only

Definition at line 946 of file ContentObjectRenderer.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

◆ registerContentObjectClass()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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

Parameters
string$className
string$contentObjectName

Definition at line 520 of file ContentObjectRenderer.php.

◆ render()

◆ replacement()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::replacement (   $content,
array  $configuration 
)
protected

Processes ordered replacements on content data.

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

Definition at line 3585 of file ContentObjectRenderer.php.

◆ replacementSingle()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::replacementSingle (   $content,
array  $configuration 
)
protected

Processes a single search/replace on content data.

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

Definition at line 3605 of file ContentObjectRenderer.php.

◆ resolveAnchorLink()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::resolveAnchorLink ( string  $linkText,
array  $conf 
)
protected

Support anchors without href value Changes ContentObjectRenderer::typolink to render a tag without href, if id or name attribute is present.

Parameters
string$linkText
array$confTypolink configuration decoded as array
Returns
‪string Full a-Tag or just the linktext if id or name are not set.

Definition at line 7171 of file ContentObjectRenderer.php.

◆ resolveMixedLinkParameter()

array string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$linkText‪The string (text) to link
string$mixedLinkParameter‪destination data like "15,13 _blank myclass &more=1" used to create the link
array$configuration‪TypoScript configuration
Returns
‪array|string
See also
typoLink()
Todo:
‪the functionality of the "file:" syntax + the hook should be marked as deprecated, an upgrade wizard should handle existing links

Definition at line 5031 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ rootLineValue()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::rootLineValue (   $key,
  $field,
  $slideBack = false,
  $altRootLine = '' 
)

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

Parameters
int$key‪Which level in the root line
string$field‪The field in the rootline record to return (a field from the pages table)
bool$slideBack‪If set, then we will traverse through the rootline from outer level towards the root level until the value found is TRUE
mixed$altRootLine‪If 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.
See also
getData()

Definition at line 4940 of file ContentObjectRenderer.php.

◆ round()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Value to process
array$conf‪TypoScript configuration for round
Returns
‪string The formatted number

Definition at line 3682 of file ContentObjectRenderer.php.

◆ sanitizeSelectPart()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$selectPart‪Select part
string$table‪Table to select from
Returns
‪string Sanitized select part
See also
getQuery

Definition at line 6776 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ searchWhere()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::searchWhere (   $searchWords,
  $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$searchWords‪The search words. These will be separated by space and comma.
string$searchFieldList‪The fields to search in
string$searchTable‪The table name you search in (recommended for DBAL compliance. Will be prepended field names as well)
Returns
‪string The WHERE clause.

Definition at line 6181 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Functional\ContentObject\ContentObjectRendererTest\searchWhereWithTooShortSearchWordWillReturnValidWhereStatement().

◆ sendNotifyEmail()

bool TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::sendNotifyEmail (   $message,
  $recipients,
  $cc,
  $senderAddress,
  $senderName = '',
  $replyTo = '' 
)

Sends a notification email

Parameters
string$message‪The message content. If blank, no email is sent.
string$recipients‪Comma list of recipient email addresses
string$cc‪Email address of recipient of an extra mail. The same mail will be sent ONCE more; not using a CC header but sending twice.
string$senderAddress‪"From" email address
string$senderName‪Optional "From" name
string$replyTo‪Optional "Reply-To" header email address.
Returns
‪bool Returns TRUE if sent
Deprecated:
ContentObjectRenderer::sendNotifyEmail is deprecated and will be removed in TYPO3 v11. Consider using the mail API directly

Definition at line 5843 of file ContentObjectRenderer.php.

◆ setContentObjectClassMap()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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

Parameters
array$contentObjectClassMap

Definition at line 505 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$contentObjectClassMap.

◆ setCurrentFile()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::setCurrentFile (   $fileObject)

Sets the current file object during iterations over files.

Parameters
File$fileObject‪The file object.

Definition at line 1559 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\FluidStyledContent\ViewHelpers\Link\ClickEnlargeViewHelper\renderStatic().

◆ setCurrentVal()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::setCurrentVal (   $value)

Sets the "current" value.

Parameters
mixed$value‪The variable that you want to set as "current
See also
getCurrentVal()

Definition at line 633 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$currentValKey.

◆ setParent()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$data‪The record array
string$currentRecord‪This 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.

Definition at line 601 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$currentRecord, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$data.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentContentObject\render(), and TYPO3\CMS\Frontend\ContentObject\RecordsContentObject\render().

◆ setUserObjectType()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::setUserObjectType (   $userObjectType)

Sets the user object type

Parameters
mixed$userObjectType

Definition at line 917 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$userObjectType.

◆ shallDebug()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::shallDebug ( )
protected

Definition at line 7232 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ splitObj()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$value‪The string value to explode by $conf[token] and process each part
array$conf‪TypoScript properties for "split
Returns
‪string Compiled result
See also
stdWrap()
‪\TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::processItemStates()

Definition at line 3518 of file ContentObjectRenderer.php.

◆ start()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::start (   $data,
  $table = '' 
)

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

Parameters
array$data‪The record data that is rendered.
string$table‪The table that the data record is from.

Definition at line 533 of file ContentObjectRenderer.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$data, $GLOBALS, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\$table.

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\checkTextObj(), TYPO3\CMS\Frontend\Imaging\GifBuilder\getResource(), TYPO3\CMS\Frontend\ContentObject\ContentContentObject\render(), TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject\render(), TYPO3\CMS\Frontend\ContentObject\RecordsContentObject\render(), TYPO3\CMS\Frontend\Tests\Functional\ContentObject\ContentObjectRendererTest\searchWhereWithTooShortSearchWordWillReturnValidWhereStatement(), and TYPO3\CMS\Frontend\Imaging\GifBuilder\start().

◆ stdWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function. Possibly substituted by other values fetched from another source.
array$conf‪TypoScript "stdWrap properties".
Returns
‪string The processed input value

Definition at line 1590 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\checkTextObj(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage(), TYPO3\CMS\Frontend\Http\RequestHandler\generateHtmlTag(), TYPO3\CMS\Frontend\Http\RequestHandler\generateMetaTagHtml(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getImageSourceCollection(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getImageTagTemplate(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getSlidePids(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\imageLinkWrap().

◆ stdWrap_addPageCacheTags()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_addPageCacheTags (   $content = '',
  $conf = [] 
)

Add tags to page cache (comma-separated list)

Parameters
string$content‪Input value undergoing processing in these functions.
array$conf‪All stdWrap properties, not just the ones for a particular function.
Returns
‪string The processed input value

Definition at line 1741 of file ContentObjectRenderer.php.

◆ stdWrap_age()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_age (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for age.
Returns
‪string The processed input value

Definition at line 2379 of file ContentObjectRenderer.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_age().

◆ stdWrap_append()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for append.
Returns
‪string The processed input value

Definition at line 2756 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_append().

◆ stdWrap_br()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_br (   $content = '')

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

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2526 of file ContentObjectRenderer.php.

◆ stdWrap_brTag()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_brTag (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for brTag.
Returns
‪string The processed input value

Definition at line 2539 of file ContentObjectRenderer.php.

◆ stdWrap_bytes()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_bytes (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for bytes.
Returns
‪string The processed input value

Definition at line 2406 of file ContentObjectRenderer.php.

◆ stdWrap_cacheRead()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_cacheRead (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in these functions.
array$conf‪All stdWrap properties, not just the ones for a particular function.
Returns
‪string The processed input value

Definition at line 1725 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cacheRead().

◆ stdWrap_cacheStore()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_cacheStore (   $content = '',
  $conf = [] 
)

Store content into cache

Parameters
string$content‪Input value undergoing processing in these functions.
array$conf‪All stdWrap properties, not just the ones for a particular function.
Returns
‪string The processed input value

Definition at line 2934 of file ContentObjectRenderer.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cacheStore().

◆ stdWrap_case()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_case (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for case.
Returns
‪string The processed input value

Definition at line 2393 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_case().

◆ stdWrap_char()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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
https://php.net/manual/en/function.chr.php
Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for char.
Returns
‪string The processed input value

Definition at line 2242 of file ContentObjectRenderer.php.

◆ stdWrap_cObject()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_cObject (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for cObject.
Returns
‪string The processed input value

Definition at line 1861 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cObject().

◆ stdWrap_crop()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_crop (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for crop.
Returns
‪string The processed input value

Definition at line 2457 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_crop().

◆ stdWrap_cropHTML()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_cropHTML (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for cropHTML.
Returns
‪string The processed input value

Definition at line 2432 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cropHTML().

◆ stdWrap_csConv()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_csConv (   $content = '',
  $conf = [] 
)

stdWrap csConv: Converts the input to UTF-8

The character set of the input must be specified. Returns the input if matters go wrong, for example if an invalid character set is given.

Parameters
string$content‪The string to convert.
array$conf‪stdWrap properties for csConv.
Returns
‪string The processed input.

Definition at line 2146 of file ContentObjectRenderer.php.

References $output.

◆ stdWrap_current()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_current (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for current.
Returns
‪string The processed input value

Definition at line 1847 of file ContentObjectRenderer.php.

◆ stdWrap_data()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_data (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for data.
Returns
‪string The processed input value

Definition at line 1817 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_data().

◆ stdWrap_dataWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for dataWrap.
Returns
‪string The processed input value

Definition at line 2730 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_dataWrap().

◆ stdWrap_date()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for date.
Returns
‪string The processed input value

Definition at line 2324 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ stdWrap_debug()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_debug (   $content = '')

debug Will output the content as readable HTML code

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2986 of file ContentObjectRenderer.php.

◆ stdWrap_debugData()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_debugData (   $content = '')

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

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 3012 of file ContentObjectRenderer.php.

References debug().

◆ stdWrap_debugFunc()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_debugFunc (   $content = '',
  $conf = [] 
)

debugFunc Will output the content in a debug table

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for debugFunc.
Returns
‪string The processed input value

Definition at line 2999 of file ContentObjectRenderer.php.

References debug().

◆ stdWrap_doubleBrTag()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_doubleBrTag (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for doubleBrTag.
Returns
‪string The processed input value

Definition at line 2513 of file ContentObjectRenderer.php.

◆ stdWrap_editIcons()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_editIcons (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for editIcons.
Returns
‪string The processed input value

Definition at line 2884 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_editIcons().

◆ stdWrap_editPanel()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for editPanel.
Returns
‪string The processed input value

Definition at line 2903 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_editPanel().

◆ stdWrap_encapsLines()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for erncapsLines.
Returns
‪string The processed input value

Definition at line 2553 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_encapsLines().

◆ stdWrap_encodeForJavaScriptValue()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_encodeForJavaScriptValue (   $content = '')

encodeForJavaScriptValue Escapes content to be used inside JavaScript strings. Single quotes are added around the value.

Parameters
string$content‪Input value undergoing processing in this function
Returns
‪string The processed input value

Definition at line 2500 of file ContentObjectRenderer.php.

◆ stdWrap_expandList()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_expandList (   $content = '')

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

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2310 of file ContentObjectRenderer.php.

◆ stdWrap_field()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_field (   $content = '',
  $conf = [] 
)

field Gets content from a DB field

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for field.
Returns
‪string The processed input value

Definition at line 1833 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_field().

◆ stdWrap_fieldRequired()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for fieldRequired.
Returns
‪string The processed input value

Definition at line 2127 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_fieldRequired().

◆ stdWrap_hash()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_hash (   $content = '',
array  $conf = [] 
)

Will return a hashed value of the current content

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for hash.
Returns
‪string The processed input value for a list of supported hash algorithms

Definition at line 2267 of file ContentObjectRenderer.php.

◆ stdWrap_HTMLparser()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for HTMLparser.
Returns
‪string The processed input value

Definition at line 2178 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_HTMLparser().

◆ stdWrap_htmlSanitize()

TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_htmlSanitize ( string  $content = '',
array  $conf = [] 
)

Definition at line 2911 of file ContentObjectRenderer.php.

◆ stdWrap_htmlSpecialChars()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for htmlSpecialChars.
Returns
‪string The processed input value

Definition at line 2483 of file ContentObjectRenderer.php.

◆ stdWrap_if()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_if (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for if.
Returns
‪string The processed input value

Definition at line 2109 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_if().

◆ stdWrap_ifBlank()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for ifBlank.
Returns
‪string The processed input value

Definition at line 1980 of file ContentObjectRenderer.php.

◆ stdWrap_ifEmpty()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for ifEmpty.
Returns
‪string The processed input value

Definition at line 1963 of file ContentObjectRenderer.php.

◆ stdWrap_ifNull()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_ifNull (   $content = '',
  $conf = [] 
)

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

Parameters
string | null$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for ifNull.
Returns
‪string The processed input value

Definition at line 1949 of file ContentObjectRenderer.php.

◆ stdWrap_innerWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for innerWrap.
Returns
‪string The processed input value

Definition at line 2579 of file ContentObjectRenderer.php.

◆ stdWrap_innerWrap2()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for innerWrap2.
Returns
‪string The processed input value

Definition at line 2593 of file ContentObjectRenderer.php.

◆ stdWrap_insertData()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2816 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_insertData().

◆ stdWrap_intval()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_intval (   $content = '')

intval Will return an integer value of the current content

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2254 of file ContentObjectRenderer.php.

◆ stdWrap_keywords()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_keywords (   $content = '')

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

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2565 of file ContentObjectRenderer.php.

◆ stdWrap_lang()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_lang (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for lang.
Returns
‪string The processed input value

Definition at line 1788 of file ContentObjectRenderer.php.

References $locales.

◆ stdWrap_listNum()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for listNum.
Returns
‪string The processed input value

Definition at line 1998 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_listNum().

◆ stdWrap_noTrimWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for noTrimWrap.
Returns
‪string The processed input value

Definition at line 2687 of file ContentObjectRenderer.php.

◆ stdWrap_numberFormat()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_numberFormat (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for numberFormat.
Returns
‪string The processed input value

Definition at line 2298 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_numberFormat().

◆ stdWrap_numRows()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_numRows (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for numRows.
Returns
‪string The processed input value

Definition at line 1875 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_numRows().

◆ stdWrap_orderedStdWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_orderedStdWrap (   $content = '',
  $conf = [] 
)

orderedStdWrap Calls stdWrap for each entry in the provided array

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for orderedStdWrap.
Returns
‪string The processed input value

Definition at line 2787 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_orderedStdWrap().

◆ stdWrap_outerWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for outerWrap.
Returns
‪string The processed input value

Definition at line 2804 of file ContentObjectRenderer.php.

◆ stdWrap_override()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_override (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for override.
Returns
‪string The processed input value

Definition at line 1919 of file ContentObjectRenderer.php.

◆ stdWrap_parseFunc()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for parseFunc.
Returns
‪string The processed input value

Definition at line 2164 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_parseFunc().

◆ stdWrap_postCObject()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for postCObject.
Returns
‪string The processed input value

Definition at line 2619 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_postCObject().

◆ stdWrap_postUserFunc()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_postUserFunc (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for postUserFunc.
Returns
‪string The processed input value

Definition at line 2829 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_postUserFunc().

◆ stdWrap_postUserFuncInt()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for postUserFuncInt.
Returns
‪string The processed input value

Definition at line 2843 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_postUserFuncInt().

◆ stdWrap_preCObject()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for preCObject.
Returns
‪string The processed input value

Definition at line 2606 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_preCObject().

◆ stdWrap_prefixComment()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for prefixComment.
Returns
‪string The processed input value

Definition at line 2865 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_prefixComment().

◆ stdWrap_preIfEmptyListNum()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for preIfEmptyListNum.
Returns
‪string The processed input value

Definition at line 1936 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_preIfEmptyListNum().

◆ stdWrap_prepend()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for prepend.
Returns
‪string The processed input value

Definition at line 2743 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_prepend().

◆ stdWrap_preUserFunc()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_preUserFunc (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for preUserFunc.
Returns
‪string The processed input value

Definition at line 1888 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_preUserFunc().

◆ stdWrap_prioriCalc()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for prioriCalc.
Returns
‪string The processed input value

Definition at line 2222 of file ContentObjectRenderer.php.

◆ stdWrap_rawUrlEncode()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_rawUrlEncode (   $content = '')

rawUrlEncode Encodes content to be used within URLs

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2469 of file ContentObjectRenderer.php.

◆ stdWrap_replacement()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_replacement (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for replacement.
Returns
‪string The processed input value

Definition at line 2208 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_replacement().

◆ stdWrap_required()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_required (   $content = '')

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

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2091 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_required().

◆ stdWrap_round()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for round.
Returns
‪string The processed input value

Definition at line 2285 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_round().

◆ stdWrap_setContentToCurrent()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_setContentToCurrent (   $content = '')

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

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 1760 of file ContentObjectRenderer.php.

◆ stdWrap_setCurrent()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_setCurrent (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for setCurrent.
Returns
‪string The processed input value

Definition at line 1774 of file ContentObjectRenderer.php.

◆ stdWrap_split()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for split.
Returns
‪string The processed input value

Definition at line 2195 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_split().

◆ stdWrap_stdWrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for stdWrap.
Returns
‪string The processed input value

Definition at line 2060 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_stdWrap().

◆ stdWrap_stdWrapOverride()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_stdWrapOverride (   $content = '',
  $conf = [] 
)

stdWrap override hook can be used by extensions authors to modify the behaviour of stdWrap functions to their needs this hook will execute functions on existing content but still before the content gets modified or replaced

Parameters
string$content‪Input value undergoing processing in these functions.
array$conf‪All stdWrap properties, not just the ones for a particular function.
Returns
‪string The processed input value

Definition at line 1902 of file ContentObjectRenderer.php.

◆ stdWrap_stdWrapPostProcess()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_stdWrapPostProcess (   $content = '',
  $conf = [] 
)

stdWrap post process hook can be used by extensions authors to modify the behaviour of stdWrap functions to their needs this hook executes functions at after the content has been modified by the rest of the stdWrap functions but still before debugging

Parameters
string$content‪Input value undergoing processing in these functions.
array$conf‪All stdWrap properties, not just the ones for a particular function.
Returns
‪string The processed input value

Definition at line 2970 of file ContentObjectRenderer.php.

◆ stdWrap_stdWrapPreProcess()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_stdWrapPreProcess (   $content = '',
  $conf = [] 
)

stdWrap pre process hook can be used by extensions authors to modify the behaviour of stdWrap functions to their needs this hook will execute functions before any other stdWrap function can modify anything

Parameters
string$content‪Input value undergoing processing in these functions.
array$conf‪All stdWrap properties, not just the ones for a particular function.
Returns
‪string The processed input value

Definition at line 1709 of file ContentObjectRenderer.php.

◆ stdWrap_stdWrapProcess()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_stdWrapProcess (   $content = '',
  $conf = [] 
)

stdWrap process hook can be used by extensions authors to modify the behaviour of stdWrap functions to their needs this hook executes functions directly after the recursive stdWrap function call but still before the content gets modified

Parameters
string$content‪Input value undergoing processing in these functions.
array$conf‪All stdWrap properties, not just the ones for a particular function.
Returns
‪string The processed input value

Definition at line 2074 of file ContentObjectRenderer.php.

◆ stdWrap_strftime()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_strftime (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for strftime.
Returns
‪string The processed input value

Definition at line 2341 of file ContentObjectRenderer.php.

References $GLOBALS, and $output.

◆ stdWrap_stripHtml()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_stripHtml (   $content = '')

stripHtml Completely removes HTML tags from content

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2444 of file ContentObjectRenderer.php.

◆ stdWrap_strPad()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_strPad (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for strPad.
Returns
‪string The processed input value

Definition at line 2023 of file ContentObjectRenderer.php.

◆ stdWrap_strtotime()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_strtotime (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for strtotime.
Returns
‪string The processed input value

Definition at line 2363 of file ContentObjectRenderer.php.

References $GLOBALS.

◆ stdWrap_substring()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_substring (   $content = '',
  $conf = [] 
)

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

Parameters
string$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for substring.
Returns
‪string The processed input value

Definition at line 2419 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_substring().

◆ stdWrap_trim()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::stdWrap_trim (   $content = '')

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

Parameters
string$content‪Input value undergoing processing in this function.
Returns
‪string The processed input value

Definition at line 2010 of file ContentObjectRenderer.php.

◆ stdWrap_typolink()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for typolink.
Returns
‪string The processed input value

Definition at line 2652 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_typolink().

◆ stdWrap_wrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for wrap.
Returns
‪string The processed input value

Definition at line 2669 of file ContentObjectRenderer.php.

◆ stdWrap_wrap2()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for wrap2.
Returns
‪string The processed input value

Definition at line 2712 of file ContentObjectRenderer.php.

◆ stdWrap_wrap3()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for wrap3.
Returns
‪string The processed input value

Definition at line 2770 of file ContentObjectRenderer.php.

◆ stdWrap_wrapAlign()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪Input value undergoing processing in this function.
array$conf‪stdWrap properties for wrapAlign.
Returns
‪string The processed input value

Definition at line 2633 of file ContentObjectRenderer.php.

◆ stdWrapValue()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$key‪The config variable key (from TS array).
array$config‪The TypoScript array.
string$defaultValue‪Optional default value.
Returns
‪string Value of the config variable

Definition at line 1685 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage(), TYPO3\CMS\Frontend\DataProcessing\SiteProcessor\process(), TYPO3\CMS\Frontend\DataProcessing\FilesProcessor\process(), TYPO3\CMS\Frontend\DataProcessing\SplitProcessor\process(), TYPO3\CMS\Frontend\DataProcessing\CommaSeparatedValueProcessor\process(), TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor\process(), and TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor\process().

◆ substring()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::substring (   $content,
  $options 
)

Implements the stdWrap property "substring" which is basically a TypoScript implementation of the PHP function, substr()

Parameters
string$content‪The string to perform the operation on
string$options‪The parameters to substring, given as a comma list of integers where the first and second number is passed as arg 1 and 2 to substr().
Returns
‪string The processed input value.
See also
stdWrap()

Definition at line 3258 of file ContentObjectRenderer.php.

◆ typoLink()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typoLink (   $linkText,
  $conf 
)

Implements the "typolink" property of stdWrap (and others) Basically the input string, $linktext, is (typically) wrapped in a -tag linking to some page, email address, file or URL based on a parameter defined by the configuration array $conf. This function is best used from internal functions as is. There are some API functions defined after this function which is more suited for general usage in external applications. Generally the concept "typolink" should be used in your own applications as an API for making links to pages with parameters and more. The reason for this is that you will then automatically make links compatible with all the centralized functions for URL simulation and manipulation of parameters into hashes and more. For many more details on the parameters and how they are interpreted, please see the link to TSref below.

the FAL API is handled with the namespace/prefix "file:..."

Parameters
string$linkText‪The string (text) to link
array$conf‪TypoScript configuration (see link below)
Returns
‪string A link-wrapped string.
See also
stdWrap()
‪\TYPO3\CMS\Frontend\Plugin\AbstractPlugin::pi_linkTP()

Definition at line 5088 of file ContentObjectRenderer.php.

References $GLOBALS, and TYPO3\CMS\Frontend\Typolink\UnableToLinkException\getLinkText().

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\imageLinkWrap(), TYPO3\CMS\Frontend\Tests\Functional\ContentObject\ContentObjectRendererTest\typolinkReturnsCorrectLinkForEmails(), TYPO3\CMS\Frontend\Tests\Functional\ContentObject\ContentObjectRendererTest\typolinkReturnsCorrectLinkForSectionToHomePageWithUrlRewriting(), TYPO3\CMS\Frontend\Tests\Functional\ContentObject\ContentObjectRendererTest\typolinkReturnsCorrectLinkForSpamEncryptedEmails(), and TYPO3\CMS\Frontend\Tests\Functional\ContentObject\ContentObjectRendererTest\typolinkReturnsCorrectLinksForPages().

◆ typoLink_URL()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typoLink_URL (   $conf)

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

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

Definition at line 5351 of file ContentObjectRenderer.php.

◆ wrap()

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::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$content‪The content to wrap
string$wrap‪The 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 5630 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\cImage().

Member Data Documentation

◆ $align

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$align
Initial value:
= array(
'center',
'right',
'left'
)

Definition at line 106 of file ContentObjectRenderer.php.

◆ $alternativeData

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$alternativeData = ''

If this is set with an array before stdWrap, it's used instead of $this->data in the data-property in stdWrap

Definition at line 304 of file ContentObjectRenderer.php.

◆ $checkPid_badDoktypeList

string int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$checkPid_badDoktypeList = PageRepository::DOKTYPE_RECYCLER

Definition at line 349 of file ContentObjectRenderer.php.

◆ $cObjHookObjectsArr

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$cObjHookObjectsArr = array( )
Deprecated:
  • ‪will be removed in TYPO3 v11.0

Definition at line 383 of file ContentObjectRenderer.php.

◆ $cObjHookObjectsRegistry

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$cObjHookObjectsRegistry = array( )
protected

Additionally registered content object types and class names

Deprecated:
  • ‪will be removed in TYPO3 v11.0

Definition at line 378 of file ContentObjectRenderer.php.

◆ $container

ContainerInterface TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$container
protected

◆ $contentObjectClassMap

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$contentObjectClassMap = array( )
protected

Class names for accordant content object names

Definition at line 278 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\setContentObjectClassMap().

◆ $currentFile

File FileReference Folder null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$currentFile
protected

Current file objects (during iterations over files)

Definition at line 399 of file ContentObjectRenderer.php.

◆ $currentRecord

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$currentRecord = ''

This 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.

Definition at line 321 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\setParent().

◆ $currentRecordNumber

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$currentRecordNumber = 0

Incremented in RecordsContentObject and ContentContentObject before each record rendering.

Definition at line 333 of file ContentObjectRenderer.php.

◆ $currentRecordTotal

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$currentRecordTotal = 0

Set in RecordsContentObject and ContentContentObject to the current number of records selected in a query.

Definition at line 327 of file ContentObjectRenderer.php.

◆ $currentValKey

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$currentValKey = 'currentValue_kidjls9dksoje'

◆ $data

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$data = array( )

Loaded with the current data-record.

If the instance of this class is used to render records from the database those records are found in this array. The function stdWrap has TypoScript properties that fetch field-data from this array.

See also
start()

Definition at line 288 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\setParent(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\start().

◆ $doConvertToUserIntObject

bool TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$doConvertToUserIntObject = false

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

Definition at line 404 of file ContentObjectRenderer.php.

◆ $getImgResourceHookObjects

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$getImgResourceHookObjects
protected

Containing hook objects for getImgResource

Definition at line 395 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getGetImgResourceHookObjects().

◆ $lastTypoLinkLD

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$lastTypoLinkLD = array( )

Definition at line 365 of file ContentObjectRenderer.php.

◆ $lastTypoLinkTarget

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$lastTypoLinkTarget = ''

DO. link target.

Definition at line 361 of file ContentObjectRenderer.php.

◆ $lastTypoLinkUrl

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$lastTypoLinkUrl = ''

This will be set by typoLink() to the url of the most recent link created.

Definition at line 355 of file ContentObjectRenderer.php.

◆ $oldData

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$oldData = array( )

Used for backup

Definition at line 298 of file ContentObjectRenderer.php.

◆ $parameters

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$parameters = array( )

Used by the parseFunc function and is loaded with tag-parameters when parsing tags.

Definition at line 310 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\imageLinkWrap().

◆ $parentRecord

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$parentRecord = array( )

If the ContentObjectRender was started from ContentContentObject, RecordsContentObject or SearchResultContentObject this array has two keys, 'data' and 'currentRecord' which indicates the record and data for the parent cObj.

Definition at line 345 of file ContentObjectRenderer.php.

◆ $parentRecordNumber

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$parentRecordNumber = 0

Incremented in RecordsContentObject and ContentContentObject before each record rendering.

Definition at line 339 of file ContentObjectRenderer.php.

◆ $recordRegister

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$recordRegister = array( )

array that registers rendered content elements (or any table) to make sure they are not rendered recursively!

Definition at line 371 of file ContentObjectRenderer.php.

◆ $stdWrapHookObjects

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$stdWrapHookObjects = array( )
protected

Containing hook objects for stdWrap

Definition at line 389 of file ContentObjectRenderer.php.

◆ $stdWrapOrder

string [] TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$stdWrapOrder

stdWrap functions in their correct order

See also
stdWrap()

Definition at line 117 of file ContentObjectRenderer.php.

◆ $stdWrapRecursionLevel

int TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$stdWrapRecursionLevel = 0
protected

Definition at line 419 of file ContentObjectRenderer.php.

◆ $stopRendering

array TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$stopRendering = array( )
protected

Definition at line 415 of file ContentObjectRenderer.php.

◆ $table

string TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$table = ''
protected

◆ $typoScriptFrontendController

TypoScriptFrontendController null TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$typoScriptFrontendController
protected

◆ $userObjectType

bool TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::$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 411 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getUserObjectType(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\setUserObjectType().

◆ OBJECTTYPE_USER

◆ OBJECTTYPE_USER_INT

const TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::OBJECTTYPE_USER_INT = 1

Indicates that object type is USER.

See also
‪ContentObjectRender::$userObjectType

Definition at line 430 of file ContentObjectRenderer.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject\render().