ContentObjectRenderer implements LoggerAwareInterface uses LoggerAwareTrait, DefaultJavaScriptAssetTrait
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.
Table of Contents
Interfaces
- LoggerAwareInterface
Constants
- OBJECTTYPE_USER = 2
- Indicates that object type is USER.
- OBJECTTYPE_USER_INT = 1
- Indicates that object type is USER.
Properties
- $align : array<string|int, mixed>
- $alternativeData : string
- If this is set with an array before stdWrap, it's used instead of $this->data in the data-property in stdWrap
- $checkPid_badDoktypeList : string|int
- $currentRecord : string
- This is set to the [table]:[uid] of the record delivered in the $data-array, if the cObjects CONTENT or RECORD is in operation.
- $currentRecordNumber : int
- Incremented in RecordsContentObject and ContentContentObject before each record rendering.
- $currentRecordTotal : int
- Set in RecordsContentObject and ContentContentObject to the current number of records selected in a query.
- $currentValKey : string
- $data : array<string|int, mixed>
- Loaded with the current data-record.
- $doConvertToUserIntObject : bool
- Set to TRUE by doConvertToUserIntObject() if USER object wants to become USER_INT
- $lastTypoLinkLD : array<string|int, mixed>
- $lastTypoLinkResult : LinkResultInterface|null
- $lastTypoLinkTarget : string
- DO. link target.
- $lastTypoLinkUrl : string
- This will be set by typoLink() to the url of the most recent link created.
- $oldData : array<string|int, mixed>
- Used for backup
- $parameters : array<string|int, mixed>
- Used by the parseFunc function and is loaded with tag-parameters when parsing tags.
- $parentRecord : array<string|int, mixed>
- 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.
- $parentRecordNumber : int
- Incremented in RecordsContentObject and ContentContentObject before each record rendering.
- $recordRegister : array<string|int, mixed>
- array that registers rendered content elements (or any table) to make sure they are not rendered recursively!
- $stdWrapOrder : array<string|int, string>
- stdWrap functions in their correct order
- $container : ContainerInterface|null
- $contentObjectClassMap : array<string|int, mixed>
- Class names for accordant content object names
- $currentFile : File|FileReference|Folder|string|null
- $defaultFrontendJavaScriptFile : string
- $getImgResourceHookObjects : array<string|int, mixed>
- Containing hook objects for getImgResource
- $stdWrapHookObjects : array<string|int, mixed>
- Containing hook objects for stdWrap
- $stdWrapRecursionLevel : int
- $stopRendering : array<string|int, mixed>
- $table : string
- $typoScriptFrontendController : TypoScriptFrontendController|null
- $userObjectType : int|bool
- Indicates current object type. Can hold one of OBJECTTYPE_ constants or FALSE.
Methods
- __construct() : mixed
- __sleep() : array<string|int, mixed>
- Prevent several objects from being serialized.
- __wakeup() : mixed
- Restore currentFile from hash.
- _parseFunc() : string
- Helper function for parseFunc()
- calc() : int
- 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())
- calcAge() : string
- Returns the 'age' of the tstamp $seconds
- callUserFunction() : mixed
- 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).
- caseshift() : string
- Changing character case of a string, converting typically used western charset characters as well.
- checkIf() : bool
- Compares values together based on the settings in the input TypoScript array and returns the comparison result.
- checkPidArray() : array<string|int, mixed>
- 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)
- cObjGet() : string
- Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found and accumulate the output.
- cObjGetSeparated() : array<int, string>
- Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found.
- cObjGetSingle() : string
- Renders a content object
- convertToUserIntObject() : mixed
- Requests the current USER object to be converted to USER_INT.
- crop() : string
- 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.
- cropHTML() : string
- 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.
- dataWrap() : string
- Wrapping input value in a regular "wrap" but parses the wrapping value first for "insertData" codes.
- editIcons() : string
- 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.
- editPanel() : string
- 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.
- encaps_lineSplit() : string
- Lets you split the content by LF and process each line independently. Used to format content made with the RTE.
- exec_getQuery() : Result
- 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.
- getATagParams() : string
- An abstraction method to add parameters to an A tag.
- getContentObject() : AbstractContentObject|null
- Returns a new content object of type $name.
- getCurrentFile() : File|FileReference|Folder|string|null
- Gets the current file object during iterations over files.
- getCurrentTable() : string
- Returns the current table
- getCurrentVal() : mixed
- Returns the "current" value.
- getData() : string
- 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.
- getFieldVal() : string|null
- 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.
- getGlobal() : mixed
- 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
- getImgResource() : array<string|int, mixed>|null
- Creates and returns a TypoScript "imgResource".
- getKey() : int
- 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).
-
getMailTo()
: array{0: string, 1: string, 2: array
} - Creates a href attibute for given $mailAddress.
- getQuery() : mixed
- 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
- getQueryArguments() : string
- Gets the query arguments and assembles them for URLs.
- getQueryMarkers() : array<string|int, mixed>
- Builds list of marker values for handling PDO-like parameter markers in select parts.
- getRecords() : array<string|int, mixed>
- 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
- getRequest() : ServerRequestInterface
- getSlidePids() : string
- Returns all parents of the given PID (Page UID) list
- getTreeList() : string
- 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.
- getTypoLink() : string
- Returns a linked string made from typoLink parameters.
- getTypoLink_URL() : string
- Returns the URL of a "typolink" create from the input parameter string, url-parameters and target
- getTypoScriptFrontendController() : TypoScriptFrontendController|null
- getUrlToCurrentLocation() : string
- Returns the canonical URL to the current "location", which include the current page ID and type and optionally the query string
- getUserObjectType() : mixed
- 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.
- HTMLcaseshift() : string
- Shifts the case of characters outside of HTML tags in the input string
- HTMLparser_TSbridge() : string
- 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.
- http_makelinks() : string
- Finds URLs in text and makes it to a real link.
- imageLinkWrap() : string
- Wraps the input string in link-tags that opens the image in a new window.
- insertData() : string
- 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.
- isDisabled() : bool
- Returns TRUE if the input table/row would be hidden in the frontend (according nto the current time and simulate user group)
- keywords() : string
- Cleans up a string of keywords. Keywords at splitted by "," (comma) ";" (semi colon) and linebreak
- lastChanged() : mixed
- Sets the SYS_LASTCHANGED timestamp if input timestamp is larger than current value.
- listNum() : string
- Exploding a string by the $char value (if integer its an ASCII value) and returning index $listNum
- mailto_makelinks() : string
- 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.
- mergeTSRef() : array<string|int, mixed>
- Resolves a TypoScript reference value to the full set of properties BUT overridden with any local properties set.
- noTrimWrap() : string
- Wrapping a string, preserving whitespace in wrap value.
- numberFormat() : string
- Implements the stdWrap property "numberFormat" This is a Wrapper function for php's number_format()
- numRows() : int
- Returns number of rows selected by the query made by the properties set.
- parseFunc() : string
- Implements the stdWrap property, "parseFunc".
- prefixComment() : string
- 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.
- readFlexformIntoConf() : mixed
- Converts a given config in Flexform to a conf-array
- registerContentObjectClass() : mixed
- Register a single content object name to class name
- render() : string
- Renders a content object by taking exception and cache handling into consideration
- rootLineValue() : string
- Returns a value from the current rootline (site) from $GLOBALS['TSFE']->tmpl->rootLine;
- searchWhere() : string
- 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%")'
- setContentObjectClassMap() : mixed
- Allow injecting content object class map.
- setCurrentFile() : mixed
- Sets the current file object during iterations over files.
- setCurrentVal() : mixed
- Sets the "current" value.
- setParent() : mixed
- Sets the internal variable parentRecord with information about current record.
- setRequest() : void
- setUserObjectType() : mixed
- Sets the user object type
- splitObj() : string
- 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.
- start() : mixed
- Class constructor.
- stdWrap() : string|null
- The "stdWrap" function. This is the implementation of what is known as "stdWrap properties" in TypoScript.
- stdWrap_addPageCacheTags() : string
- Add tags to page cache (comma-separated list)
- stdWrap_age() : string
- age Will return the age of a given timestamp based on configuration given by stdWrap properties
- stdWrap_append() : string
- append A content object that will be appended to the current content after most of the wraps have already been applied
- stdWrap_br() : string
- br Searches for single line breaks and replaces them with a <br />/<br> tag according to the doctype
- stdWrap_brTag() : string
- brTag Searches for single line feeds and replaces them with the given value
- stdWrap_bytes() : string
- bytes Will return the size of a given number in Bytes *
- stdWrap_cacheRead() : string
- Check if content was cached before (depending on the given cache key)
- stdWrap_cacheStore() : string
- Store content into cache
- stdWrap_case() : string
- case Will transform the content to be upper or lower case only Leaves HTML tags untouched
- stdWrap_char() : string
- char Returns a one-character string containing the character specified by ascii code.
- stdWrap_cObject() : string
- cObject Will replace the content with the value of an official TypoScript cObject like TEXT, COA, HMENU
- stdWrap_crop() : string
- crop Crops content to a given size without caring about HTML tags
- stdWrap_cropHTML() : string
- cropHTML Crops content to a given size while leaving HTML tags untouched
- stdWrap_csConv() : string
- stdWrap csConv: Converts the input to UTF-8
- stdWrap_current() : string
- 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
- stdWrap_data() : string
- Gets content from different sources based on getText functions.
- stdWrap_dataWrap() : string
- 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
- stdWrap_date() : string
- 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
- stdWrap_debug() : string
- debug Will output the content as readable HTML code
- stdWrap_debugData() : string
- debugData Will output the data used by the current record in a debug table
- stdWrap_debugFunc() : string
- debugFunc Will output the content in a debug table
- stdWrap_doubleBrTag() : string
- doubleBrTag Searches for double line breaks and replaces them with the given value
- stdWrap_editIcons() : string
- editIcons Will render icons for frontend editing as long as there is a BE user logged in
- stdWrap_editPanel() : string
- editPanel Will render the edit panel for frontend editing as long as there is a BE user logged in
- stdWrap_encapsLines() : string
- 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
- stdWrap_encodeForJavaScriptValue() : string
- encodeForJavaScriptValue Escapes content to be used inside JavaScript strings. Single quotes are added around the value.
- stdWrap_expandList() : string
- expandList Will return a formatted number based on configuration given as stdWrap properties
- stdWrap_field() : string|null
- field Gets content from a DB field
- stdWrap_fieldRequired() : string
- fieldRequired Will immediately stop rendering and return an empty value when there is no content in the field given by fieldRequired
- stdWrap_hash() : string
- Will return a hashed value of the current content
- stdWrap_HTMLparser() : string
- HTMLparser Will parse HTML content based on functions given as stdWrap properties Heavily used together with RTE based content
- stdWrap_htmlSanitize() : string
- stdWrap_htmlSpecialChars() : string
- 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
- stdWrap_if() : string
- if Will immediately stop rendering and return an empty value when the result of the checks returns FALSE
- stdWrap_ifBlank() : string
- ifBlank Will set content to a replacement value in case the trimmed value of content has no length 0 (zero) will not be replaced
- stdWrap_ifEmpty() : string
- ifEmpty Will set content to a replacement value in case the trimmed value of content returns FALSE 0 (zero) will be replaced as well
- stdWrap_ifNull() : string
- ifNull Will set content to a replacement value in case the value of content is NULL
- stdWrap_innerWrap() : string
- 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
- stdWrap_innerWrap2() : string
- 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
- stdWrap_insertData() : string
- insertData Can fetch additional content the same way data does and replaces any occurrence of {field:whatever} with this content
- stdWrap_intval() : string
- intval Will return an integer value of the current content
- stdWrap_keywords() : string
- keywords Transforms content into a CSV list to be used i.e. as keywords within a meta tag
- stdWrap_lang() : string
- lang Translates content based on the language currently used by the FE
- stdWrap_listNum() : string
- 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
- stdWrap_noTrimWrap() : string
- 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 *
- stdWrap_numberFormat() : string
- numberFormat Will return a formatted number based on configuration given as stdWrap properties
- stdWrap_numRows() : string
- numRows Counts the number of returned records of a DB operation makes use of select internally
- stdWrap_orderedStdWrap() : string
- orderedStdWrap Calls stdWrap for each entry in the provided array
- stdWrap_outerWrap() : string
- 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
- stdWrap_override() : string
- override Will override the current value of content with its own value'
- stdWrap_parseFunc() : string
- parseFunc Will parse the content based on functions given as stdWrap properties Heavily used together with RTE based content
- stdWrap_postCObject() : string
- postCObject A content object that is appended to the current content but between the innerWraps and the rest of the wraps
- stdWrap_postUserFunc() : string
- postUserFunc Will execute a user function after the content has been modified by any other stdWrap function
- stdWrap_postUserFuncInt() : string
- 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
- stdWrap_preCObject() : string
- preCObject A content object that is prepended to the current content but between the innerWraps and the rest of the wraps
- stdWrap_prefixComment() : string
- prefixComment Will add HTML comments to the content to make it easier to identify certain content elements within the HTML output later on
- stdWrap_preIfEmptyListNum() : string
- 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
- stdWrap_prepend() : string
- prepend A content object that will be prepended to the current content after most of the wraps have already been applied
- stdWrap_preUserFunc() : string
- preUserFunc Will execute a user public function before the content will be modified by any other stdWrap function
- stdWrap_prioriCalc() : string
- 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
- stdWrap_rawUrlEncode() : string
- rawUrlEncode Encodes content to be used within URLs
- stdWrap_replacement() : string
- replacement Will execute replacements on the content (optionally with preg-regex)
- stdWrap_required() : string
- required Will immediately stop rendering and return an empty value when there is no content at this point
- stdWrap_round() : string
- 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
- stdWrap_setContentToCurrent() : string
- setContentToCurrent actually it just does the contrary: Sets the value of 'current' based on current content
- stdWrap_setCurrent() : string
- setCurrent Sets the value of 'current' based on the outcome of stdWrap operations
- stdWrap_split() : string
- split Will split the content by a given token and treat the results separately Automatically fills 'current' with a single result
- stdWrap_stdWrap() : string
- 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
- stdWrap_stdWrapOverride() : string
- 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
- stdWrap_stdWrapPostProcess() : string
- 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
- stdWrap_stdWrapPreProcess() : string
- 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
- stdWrap_stdWrapProcess() : string
- 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
- stdWrap_strftime() : string
- 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
- stdWrap_stripHtml() : string
- stripHtml Completely removes HTML tags from content
- stdWrap_strPad() : string
- strPad Will return a string padded left/right/on both sides, based on configuration given as stdWrap properties
- stdWrap_strtotime() : string
- strtotime Will return a timestamp based on configuration given according to PHP strtotime
- stdWrap_substring() : string
- substring Will return a substring based on position information given by stdWrap properties
- stdWrap_trim() : string
- trim Cuts off any whitespace at the beginning and the end of the content
- stdWrap_typolink() : string
- 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
- stdWrap_wrap() : string
- 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
- stdWrap_wrap2() : string
- 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
- stdWrap_wrap3() : string
- 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
- stdWrap_wrapAlign() : string
- wrapAlign Wraps content with a div container having the style attribute text-align set to the given value See wrap
- stdWrapValue() : string|int|bool|null
- Gets a configuration value by passing them through stdWrap first and taking a default value if stdWrap doesn't yield a result.
- substring() : string
- Implements the stdWrap property "substring" which is basically a TypoScript implementation of the PHP function, substr()
- typoLink() : string
- Implements the "typolink" property of stdWrap (and others) Basically the input string, $linktext, is (typically) wrapped in a <a>-tag linking to some page, email address, file or URL based on a parameter defined by the configuration array $conf.
- typoLink_URL() : string
- Based on the input "TypoLink" TypoScript configuration this will return the generated URL
- wrap() : string
- Wrapping a string.
- addDefaultFrontendJavaScript() : void
- addSecurityRelValues() : array<string|int, mixed>
- calculateCacheKey() : string
- Applies stdWrap to the cache key
- calculateCacheLifetime() : int|null
- Calculates the lifetime of a cache entry based on the given configuration
- calculateCacheTags() : array<string|int, mixed>
- Calculates the tags for a cache entry bases on the given configuration
- createCropAreaFromJsonString() : Area
- Takes a JSON string and creates CropVariantCollection and fetches the corresponding CropArea for that.
- createExceptionHandler() : ExceptionHandlerInterface|null
- Creates the content object exception handler from local content object configuration or, from global configuration if not explicitly disabled in local configuration
- determineExceptionHandlerClassName() : string|null
- Determine exception handler class name from global and content object configuration
- encryptCharcode() : string
- Encryption (or decryption) of a single character.
- encryptEmail() : string
- Encryption of email addresses for <A>-tags See the spam protection setup in TS 'config.'
- getContentLengthOfCurrentTag() : int
- Get content length of the current tag that could also contain nested tag contents
- getCropAreaFromFileReference() : Area|null
- Returns an ImageManipulation\Area object for the given cropVariant (or 'default') or null if the crop settings or crop area is empty.
- getCropAreaFromFromTypoScriptSettings() : Area|null
- Returns an ImageManipulation\Area object for the given cropVariant (or 'default') or null if the crop settings or crop area is empty.
- getEnvironmentVariable() : string
- Wrapper function for GeneralUtility::getIndpEnv()
- getFileDataKey() : string|int
- Gets file information. This is a helper function for the getData() method above, which resolves e.g.
- getFromCache() : string|bool
- Fetches content from cache
- getFrontendBackendUser() : FrontendBackendUserAuthentication
- Returns the current BE user.
- getGetImgResourceHookObjects() : array<string|int, mixed>
- Gets the 'getImgResource' hook objects.
- getLanguageRestriction() : string|CompositeExpression|null
- Adds parts to the WHERE clause that are related to language.
- getQueryArray() : array<string|int, mixed>
- Helper to transform a QueryBuilder object into a queryParts array that can be used with exec_SELECT_queryArray
- getQueryArrayJoinHelper() : string
- Helper to transform the QueryBuilder join part into a SQL fragment.
- getQueryConstraints() : array<string|int, mixed>
- Helper function for getQuery(), creating the WHERE clause of the SELECT query
- getResourceFactory() : ResourceFactory
- Get instance of FAL resource factory
- getTimeTracker() : TimeTracker
- isInternalUrl() : bool
- Checks whether the given url is an internal url.
- mergeExceptionHandlerConfiguration() : array<string|int, mixed>
- Merges global exception handler configuration with the one from the content object and returns the merged exception handler configuration
- processUrl() : string|null
- Loops over all configured URL modifier hooks (if available) and returns the generated URL or NULL if no URL was generated.
- replacement() : string
- Processes ordered replacements on content data.
- replacementSingle() : string
- Processes a single search/replace on content data.
- resolveMixedLinkParameter() : array<string|int, mixed>|string
- called from the typoLink() function
- round() : string
- Implements the "round" property of stdWrap This is a Wrapper function for PHP's rounding functions (round,ceil,floor), defaults to round()
- sanitizeSelectPart() : string
- Helper function for getQuery, sanitizing the select part
- shallDebug() : bool
- shallExportDefaultFrontendJavaScript() : bool
- shallRemoveDefaultFrontendJavaScript() : bool
Constants
OBJECTTYPE_USER
Indicates that object type is USER.
public
mixed
OBJECTTYPE_USER
= 2
Tags
OBJECTTYPE_USER_INT
Indicates that object type is USER.
public
mixed
OBJECTTYPE_USER_INT
= 1
Tags
Properties
$align
since v11, will be removed in v12. Unused.
public
array<string|int, mixed>
$align
= ['center', 'right', 'left']
$alternativeData
If this is set with an array before stdWrap, it's used instead of $this->data in the data-property in stdWrap
since v11, will be removed in v12. Drop together with usages in this class.
public
string
$alternativeData
= ''
$checkPid_badDoktypeList
public
string|int
$checkPid_badDoktypeList
= \TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_RECYCLER
$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.
public
string
$currentRecord
= ''
Note that $GLOBALS['TSFE']->currentRecord is set to an equal value but always indicating the latest record rendered.
$currentRecordNumber
Incremented in RecordsContentObject and ContentContentObject before each record rendering.
public
int
$currentRecordNumber
= 0
$currentRecordTotal
Set in RecordsContentObject and ContentContentObject to the current number of records selected in a query.
since v11, will be removed in v12. Drop together with usages in RecordsContentObject and ContentContentObject
public
int
$currentRecordTotal
= 0
$currentValKey
public
string
$currentValKey
= 'currentValue_kidjls9dksoje'
$data
Loaded with the current data-record.
public
array<string|int, mixed>
$data
= []
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.
Tags
$doConvertToUserIntObject
Set to TRUE by doConvertToUserIntObject() if USER object wants to become USER_INT
public
bool
$doConvertToUserIntObject
= false
$lastTypoLinkLD
public
array<string|int, mixed>
$lastTypoLinkLD
= []
$lastTypoLinkResult
public
LinkResultInterface|null
$lastTypoLinkResult
= null
$lastTypoLinkTarget
DO. link target.
public
string
$lastTypoLinkTarget
= ''
$lastTypoLinkUrl
This will be set by typoLink() to the url of the most recent link created.
public
string
$lastTypoLinkUrl
= ''
$oldData
Used for backup
since v11, will be removed in v12. Unused.
public
array<string|int, mixed>
$oldData
= []
$parameters
Used by the parseFunc function and is loaded with tag-parameters when parsing tags.
public
array<string|int, mixed>
$parameters
= []
$parentRecord
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.
public
array<string|int, mixed>
$parentRecord
= []
$parentRecordNumber
Incremented in RecordsContentObject and ContentContentObject before each record rendering.
public
int
$parentRecordNumber
= 0
$recordRegister
array that registers rendered content elements (or any table) to make sure they are not rendered recursively!
since v11, will be removed in v12. Unused.
public
array<string|int, mixed>
$recordRegister
= []
$stdWrapOrder
stdWrap functions in their correct order
public
array<string|int, string>
$stdWrapOrder
= [
'stdWrapPreProcess' => 'hook',
// this is a placeholder for the first Hook
'cacheRead' => 'hook',
// this is a placeholder for checking if the content is available in cache
'setContentToCurrent' => 'boolean',
'setContentToCurrent.' => 'array',
'addPageCacheTags' => 'string',
'addPageCacheTags.' => 'array',
'setCurrent' => 'string',
'setCurrent.' => 'array',
'lang.' => 'array',
'data' => 'getText',
'data.' => 'array',
'field' => 'fieldName',
'field.' => 'array',
'current' => 'boolean',
'current.' => 'array',
'cObject' => 'cObject',
'cObject.' => 'array',
'numRows.' => 'array',
'preUserFunc' => 'functionName',
'stdWrapOverride' => 'hook',
// this is a placeholder for the second Hook
'override' => 'string',
'override.' => 'array',
'preIfEmptyListNum' => 'listNum',
'preIfEmptyListNum.' => 'array',
'ifNull' => 'string',
'ifNull.' => 'array',
'ifEmpty' => 'string',
'ifEmpty.' => 'array',
'ifBlank' => 'string',
'ifBlank.' => 'array',
'listNum' => 'listNum',
'listNum.' => 'array',
'trim' => 'boolean',
'trim.' => 'array',
'strPad.' => 'array',
'stdWrap' => 'stdWrap',
'stdWrap.' => 'array',
'stdWrapProcess' => 'hook',
// this is a placeholder for the third Hook
'required' => 'boolean',
'required.' => 'array',
'if.' => 'array',
'fieldRequired' => 'fieldName',
'fieldRequired.' => 'array',
'csConv' => 'string',
'csConv.' => 'array',
'parseFunc' => 'objectpath',
'parseFunc.' => 'array',
'HTMLparser' => 'boolean',
'HTMLparser.' => 'array',
'split.' => 'array',
'replacement.' => 'array',
'prioriCalc' => 'boolean',
'prioriCalc.' => 'array',
'char' => 'integer',
'char.' => 'array',
'intval' => 'boolean',
'intval.' => 'array',
'hash' => 'string',
'hash.' => 'array',
'round' => 'boolean',
'round.' => 'array',
'numberFormat.' => 'array',
'expandList' => 'boolean',
'expandList.' => 'array',
'date' => 'dateconf',
'date.' => 'array',
'strtotime' => 'strtotimeconf',
'strtotime.' => 'array',
'strftime' => 'strftimeconf',
'strftime.' => 'array',
'age' => 'boolean',
'age.' => 'array',
'case' => 'case',
'case.' => 'array',
'bytes' => 'boolean',
'bytes.' => 'array',
'substring' => 'parameters',
'substring.' => 'array',
'cropHTML' => 'crop',
'cropHTML.' => 'array',
'stripHtml' => 'boolean',
'stripHtml.' => 'array',
'crop' => 'crop',
'crop.' => 'array',
'rawUrlEncode' => 'boolean',
'rawUrlEncode.' => 'array',
'htmlSpecialChars' => 'boolean',
'htmlSpecialChars.' => 'array',
'encodeForJavaScriptValue' => 'boolean',
'encodeForJavaScriptValue.' => 'array',
'doubleBrTag' => 'string',
'doubleBrTag.' => 'array',
'br' => 'boolean',
'br.' => 'array',
'brTag' => 'string',
'brTag.' => 'array',
'encapsLines.' => 'array',
'keywords' => 'boolean',
'keywords.' => 'array',
'innerWrap' => 'wrap',
'innerWrap.' => 'array',
'innerWrap2' => 'wrap',
'innerWrap2.' => 'array',
'preCObject' => 'cObject',
'preCObject.' => 'array',
'postCObject' => 'cObject',
'postCObject.' => 'array',
'wrapAlign' => 'align',
'wrapAlign.' => 'array',
'typolink.' => 'array',
'wrap' => 'wrap',
'wrap.' => 'array',
'noTrimWrap' => 'wrap',
'noTrimWrap.' => 'array',
'wrap2' => 'wrap',
'wrap2.' => 'array',
'dataWrap' => 'dataWrap',
'dataWrap.' => 'array',
'prepend' => 'cObject',
'prepend.' => 'array',
'append' => 'cObject',
'append.' => 'array',
'wrap3' => 'wrap',
'wrap3.' => 'array',
'orderedStdWrap' => 'stdWrap',
'orderedStdWrap.' => 'array',
'outerWrap' => 'wrap',
'outerWrap.' => 'array',
'insertData' => 'boolean',
'insertData.' => 'array',
'postUserFunc' => 'functionName',
'postUserFuncInt' => 'functionName',
'prefixComment' => 'string',
'prefixComment.' => 'array',
'editIcons' => 'string',
// @deprecated since v11, will be removed with v12. Drop together with other editIcon removals.
'editIcons.' => 'array',
// @deprecated since v11, will be removed with v12. Drop together with other editIcon removals.
'editPanel' => 'boolean',
// @deprecated since v11, will be removed with v12. Drop together with other editPanel removals.
'editPanel.' => 'array',
// @deprecated since v11, will be removed with v12. Drop together with other editPanel removals.
'htmlSanitize' => 'boolean',
'htmlSanitize.' => 'array',
'cacheStore' => 'hook',
// this is a placeholder for storing the content in cache
'stdWrapPostProcess' => 'hook',
// this is a placeholder for the last Hook
'debug' => 'boolean',
'debug.' => 'array',
'debugFunc' => 'boolean',
'debugFunc.' => 'array',
'debugData' => 'boolean',
'debugData.' => 'array',
]
Tags
$container
protected
ContainerInterface|null
$container
$contentObjectClassMap
Class names for accordant content object names
protected
array<string|int, mixed>
$contentObjectClassMap
= []
$currentFile
protected
File|FileReference|Folder|string|null
$currentFile
Current file objects (during iterations over files)
$defaultFrontendJavaScriptFile
protected
string
$defaultFrontendJavaScriptFile
= 'EXT:frontend/Resources/Public/JavaScript/default_frontend.js'
$getImgResourceHookObjects
Containing hook objects for getImgResource
protected
array<string|int, mixed>
$getImgResourceHookObjects
$stdWrapHookObjects
Containing hook objects for stdWrap
protected
array<string|int, mixed>
$stdWrapHookObjects
= []
$stdWrapRecursionLevel
protected
int
$stdWrapRecursionLevel
= 0
$stopRendering
protected
array<string|int, mixed>
$stopRendering
= []
$table
protected
string
$table
= ''
$typoScriptFrontendController
protected
TypoScriptFrontendController|null
$typoScriptFrontendController
$userObjectType
Indicates current object type. Can hold one of OBJECTTYPE_ constants or FALSE.
protected
int|bool
$userObjectType
= false
The value is set and reset inside USER() function. Any time outside of USER() it is FALSE.
Methods
__construct()
public
__construct([TypoScriptFrontendController $typoScriptFrontendController = null ][, ContainerInterface $container = null ]) : mixed
Parameters
- $typoScriptFrontendController : TypoScriptFrontendController = null
- $container : ContainerInterface = null
__sleep()
Prevent several objects from being serialized.
public
__sleep() : array<string|int, mixed>
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()
Return values
array<string|int, mixed>__wakeup()
Restore currentFile from hash.
public
__wakeup() : mixed
If currentFile references a File, the identifier equals file identifier. If it references a FileReference the identifier equals the uid of the reference.
_parseFunc()
Helper function for parseFunc()
public
_parseFunc(string $theValue, array<string|int, mixed> $conf) : string
Parameters
- $theValue : string
-
The value to process.
- $conf : array<string|int, mixed>
-
TypoScript configuration for parseFunc
Tags
Return values
string —The processed value
calc()
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())
public
calc(string $val) : int
Parameters
- $val : string
-
The string to evaluate. Example: "3+4*10/5" will generate "35". Only integer numbers can be used.
Tags
Return values
int —The result (might be a float if you did a division of the numbers).
calcAge()
Returns the 'age' of the tstamp $seconds
public
calcAge(int $seconds, string $labels) : string
Parameters
- $seconds : int
-
Seconds to return age for. Example: "70" => "1 min", "3601" => "1 hrs
- $labels : string
-
The labels of the individual units. Defaults to : ' min| hrs| days| yrs'
Return values
string —The formatted string
callUserFunction()
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).
public
callUserFunction(string $funcName, array<string|int, mixed> $conf, mixed $content) : mixed
Parameters
- $funcName : string
-
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.
- $conf : array<string|int, mixed>
-
The TypoScript configuration to pass the function
- $content : mixed
-
The content payload to pass the function
Tags
Return values
mixed —The return content from the function call. Should probably be a string.
caseshift()
Changing character case of a string, converting typically used western charset characters as well.
public
caseshift(string $theValue, string $case) : string
Parameters
- $theValue : string
-
The string to change case for.
- $case : string
-
The direction; either "upper" or "lower
Tags
Return values
stringcheckIf()
Compares values together based on the settings in the input TypoScript array and returns the comparison result.
public
checkIf(array<string|int, mixed> $conf) : bool
Implements the "if" function in TYPO3 TypoScript
Parameters
- $conf : array<string|int, mixed>
-
TypoScript properties defining what to compare
Tags
Return values
boolcheckPidArray()
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)
public
checkPidArray(array<string|int, int> $pageIds) : array<string|int, mixed>
Parameters
- $pageIds : array<string|int, int>
-
Array of Page UID numbers for select and for which pages with enablefields and bad doktypes should be removed.
Return values
array<string|int, mixed> —Returns the array of remaining page UID numbers
cObjGet()
Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found and accumulate the output.
public
cObjGet(array<string|int, mixed> $setup[, string $addKey = '' ]) : string
Parameters
- $setup : array<string|int, mixed>
-
array with cObjects as values.
- $addKey : string = ''
-
A prefix for the debugging information
Tags
Return values
string —Rendered output from the cObjects in the array.
cObjGetSeparated()
Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found.
public
cObjGetSeparated(array<string|int, mixed>|null $setup[, string $addKey = '' ]) : array<int, string>
Parameters
- $setup : array<string|int, mixed>|null
- $addKey : string = ''
Return values
array<int, string>cObjGetSingle()
Renders a content object
public
cObjGetSingle(string $name, array<string|int, mixed> $conf[, string $TSkey = '__' ]) : string
Parameters
- $name : string
-
The content object name, eg. "TEXT" or "USER" or "IMAGE"
- $conf : array<string|int, mixed>
-
The array with TypoScript properties for the content object
- $TSkey : string = '__'
-
A string label used for the internal debugging tracking.
Tags
Return values
string —cObject output
convertToUserIntObject()
Requests the current USER object to be converted to USER_INT.
public
convertToUserIntObject() : mixed
crop()
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.
public
crop(string $content, string $options) : string
Parameters
- $content : string
-
The string to perform the operation on
- $options : string
-
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.
Tags
Return values
string —The processed input value.
cropHTML()
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.
public
cropHTML(string $content, string $options) : string
Compared to stdWrap.crop it respects HTML tags and entities.
Parameters
- $content : string
-
The string to perform the operation on
- $options : string
-
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.
Tags
Return values
string —The processed input value.
dataWrap()
Wrapping input value in a regular "wrap" but parses the wrapping value first for "insertData" codes.
public
dataWrap(string $content, string $wrap) : string
Parameters
- $content : string
-
Input string being wrapped
- $wrap : string
-
The wrap string, eg. "" or more likely here ' | ' which will wrap the input string in a tag linking to the current page.
Tags
Return values
string —Output string wrapped in the wrapping value.
editIcons()
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.
public
editIcons(string $content, string $params[, array<string|int, mixed> $conf = [] ][, string $currentRecord = '' ][, array<string|int, mixed> $dataArray = [] ][, string $addUrlParamStr = '' ]) : string
since v11, will be removed with v12. Drop together with other editIcons removals.
This implements TYPO3 context sensitive editing facilities. Only backend users will have access (if properly configured as well).
Parameters
- $content : string
-
The content to which the edit icons should be appended
- $params : string
-
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
- $conf : array<string|int, mixed> = []
-
TypoScript properties for configuring the edit icons.
- $currentRecord : string = ''
-
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
- $dataArray : array<string|int, mixed> = []
-
Alternative data array to use. Default is $this->data
- $addUrlParamStr : string = ''
-
Additional URL parameters for the link pointing to FormEngine
Return values
string —The input content string, possibly with edit icons added (not necessarily in the end but just after the last string of normal content.
editPanel()
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.
public
editPanel(string $content, array<string|int, mixed> $conf[, string $currentRecord = '' ][, array<string|int, mixed> $dataArray = [] ]) : string
since v11, will be removed with v12. Drop together with other editPanel removals.
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
- $content : string
-
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.
- $conf : array<string|int, mixed>
-
TypoScript configuration properties for the editPanel
- $currentRecord : string = ''
-
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
- $dataArray : array<string|int, mixed> = []
-
Alternative data array to use. Default is $this->data
Return values
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.
encaps_lineSplit()
Lets you split the content by LF and process each line independently. Used to format content made with the RTE.
public
encaps_lineSplit(string $theValue, array<string|int, mixed> $conf) : string
Parameters
- $theValue : string
-
The input value
- $conf : array<string|int, mixed>
-
TypoScript options
Return values
string —The processed input value being returned; Splitted lines imploded by LF again.
exec_getQuery()
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.
public
exec_getQuery(string $table, array<string|int, mixed> $conf) : Result
Parameters
- $table : string
-
The table name
- $conf : array<string|int, mixed>
-
The TypoScript configuration properties
Tags
Return values
ResultgetATagParams()
An abstraction method to add parameters to an A tag.
public
getATagParams(array<string|int, mixed> $conf[, bool|int|null $addGlobal = null ]) : string
Uses the ATagParams property.
Parameters
- $conf : array<string|int, mixed>
-
TypoScript configuration properties
- $addGlobal : bool|int|null = null
-
If set, will add the global config.ATagParams to the link. @deprecated will be removed in TYPO3 v12.0.
Tags
Return values
string —String containing the parameters to the A tag (if non empty, with a leading space)
getContentObject()
Returns a new content object of type $name.
public
getContentObject(string $name) : AbstractContentObject|null
This content object needs to be registered as content object in $this->contentObjectClassMap
Parameters
- $name : string
Tags
Return values
AbstractContentObject|nullgetCurrentFile()
Gets the current file object during iterations over files.
public
getCurrentFile() : File|FileReference|Folder|string|null
Return values
File|FileReference|Folder|string|null —The current file object.
getCurrentTable()
Returns the current table
public
getCurrentTable() : string
Return values
stringgetCurrentVal()
Returns the "current" value.
public
getCurrentVal() : mixed
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.
Return values
mixed —The "current" value
getData()
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.
public
getData(string $string[, array<string|int, mixed>|null $fieldArray = null ]) : string
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)
- $fieldArray : array<string|int, mixed>|null = null
-
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.
Tags
Return values
string —The value fetched
getFieldVal()
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.
public
getFieldVal(string $field) : string|null
Parameters
- $field : string
-
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)
Return values
string|nullgetGlobal()
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
public
getGlobal(string $keyString[, array<string|int, mixed> $source = null ]) : mixed
Parameters
- $keyString : string
-
Global var key, eg. "HTTP_GET_VAR" or "HTTP_GET_VARS|id" to get the GET parameter "id" back.
- $source : array<string|int, mixed> = null
-
Alternative array than $GLOBAL to get variables from.
Tags
Return values
mixed —Whatever value. If none, then blank string.
getImgResource()
Creates and returns a TypoScript "imgResource".
public
getImgResource(string|File|FileReference $file, array<string|int, mixed> $fileArray) : array<string|int, mixed>|null
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
- $file : string|File|FileReference
-
A "imgResource" TypoScript data type. Either a TypoScript file resource, a file or a file reference object or the string GIFBUILDER. See description above.
- $fileArray : array<string|int, mixed>
-
TypoScript properties for the imgResource type
Tags
Return values
array<string|int, mixed>|null —Returns info-array
getKey()
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).
public
getKey(int $key, array<string|int, mixed> $arr) : int
Example: entrylevel = -1 means that entryLevel ends up pointing at the outermost-level, -2 means the level before the outermost...
Parameters
- $key : int
-
The integer to transform
- $arr : array<string|int, mixed>
-
array in which the key should be found.
Tags
Return values
int —The processed integer key value.
getMailTo()
Creates a href attibute for given $mailAddress.
public
getMailTo(string $mailAddress, string $linktxt) : array{0: string, 1: string, 2: array}
The function uses spamProtectEmailAddresses for encoding the mailto statement. If spamProtectEmailAddresses is disabled, it'll just return a string like "mailto:user@example.tld".
Returns an array with three items (numeric index)
#0: $mailToUrl (string), ready to be inserted into the href attribute of the tag
#1: $linktxt (string), content between starting and ending <a>
tag
#2: $attributes (array<string, string>), additional attributes for <a>
tag
Parameters
- $mailAddress : string
-
Email address
- $linktxt : string
-
Link text, default will be the email address.
Return values
array{0: string, 1: string, 2: arrayA numerical array with three items
getQuery()
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
public
getQuery(string $table, array<string|int, mixed> $conf[, bool $returnQueryArray = false ]) : mixed
Parameters
- $table : string
-
See ->exec_getQuery()
- $conf : array<string|int, mixed>
-
See ->exec_getQuery()
- $returnQueryArray : bool = false
-
If set, the function will return the query not as a string but array with the various parts. RECOMMENDED!
Tags
Return values
mixed —A SELECT query if $returnQueryArray is FALSE, otherwise the SELECT query in an array as parts.
getQueryArguments()
Gets the query arguments and assembles them for URLs.
public
getQueryArguments(array<string|int, mixed> $conf) : string
Arguments may be removed or set, depending on configuration.
Parameters
- $conf : array<string|int, mixed>
-
Configuration
Return values
string —The URL query part (starting with a &)
getQueryMarkers()
Builds list of marker values for handling PDO-like parameter markers in select parts.
public
getQueryMarkers(string $table, array<string|int, mixed> $conf) : array<string|int, mixed>
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
- $table : string
-
Table to select records from
- $conf : array<string|int, mixed>
-
Select part of CONTENT definition
Tags
Return values
array<string|int, mixed> —List of values to replace markers with
getRecords()
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
public
getRecords(string $tableName, array<string|int, mixed> $queryConfiguration) : array<string|int, mixed>
Parameters
- $tableName : string
-
the name of the TCA database table
- $queryConfiguration : array<string|int, mixed>
-
The TypoScript configuration properties, see .select in TypoScript reference
Tags
Return values
array<string|int, mixed> —The records
getRequest()
public
getRequest() : ServerRequestInterface
Return values
ServerRequestInterfacegetSlidePids()
Returns all parents of the given PID (Page UID) list
public
getSlidePids(string $pidList, array<string|int, mixed> $pidConf) : string
Parameters
- $pidList : string
-
A list of page Content-Element PIDs (Page UIDs) / stdWrap
- $pidConf : array<string|int, mixed>
-
stdWrap array for the list
Return values
string —A list of PIDs
getTreeList()
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.
public
getTreeList(int $id, int $depth[, int $begin = 0 ][, bool $dontCheckEnableFields = false ][, string $addSelectFields = '' ][, string $moreWhereClauses = '' ][, array<string|int, mixed> $prevId_array = [] ][, int $recursionLevel = 0 ]) : string
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
- $id : int
-
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!
- $depth : int
-
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...)
- $begin : int = 0
-
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'
- $dontCheckEnableFields : bool = false
-
See function description
- $addSelectFields : string = ''
-
Additional fields to select. Syntax: ",[fieldname],[fieldname],...
- $moreWhereClauses : string = ''
-
Additional where clauses. Syntax: " AND [fieldname]=[value] AND ...
- $prevId_array : array<string|int, mixed> = []
-
array of IDs from previous recursions. In order to prevent infinite loops with mount pages.
- $recursionLevel : int = 0
-
Internal: Zero for the first recursion, incremented for each recursive call.
Tags
Return values
string —Returns the list of ids as a comma separated string
getTypoLink()
Returns a linked string made from typoLink parameters.
public
getTypoLink(string $label, string $params[, array<string|int, mixed>|string $urlParameters = [] ][, string $target = '' ]) : string
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
- $label : string
-
Text string being wrapped by the link.
- $params : string
-
Link parameter; eg. "123" for page id, "kasperYYYY@typo3.com" for email address, "http://...." for URL, "fileadmin/example.txt" for file.
- $urlParameters : array<string|int, mixed>|string = []
-
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.
- $target : string = ''
-
Specific target set, if any. (Default is using the current)
Tags
Return values
string —The wrapped $label-text string
getTypoLink_URL()
Returns the URL of a "typolink" create from the input parameter string, url-parameters and target
public
getTypoLink_URL(string $params[, array<string|int, mixed>|string $urlParameters = [] ][, string $target = '' ]) : string
Parameters
- $params : string
-
Link parameter; eg. "123" for page id, "kasperYYYY@typo3.com" for email address, "http://...." for URL, "fileadmin/example.txt" for file.
- $urlParameters : array<string|int, mixed>|string = []
-
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.
- $target : string = ''
-
Specific target set, if any. (Default is using the current)
Tags
Return values
string —The URL
getTypoScriptFrontendController()
public
getTypoScriptFrontendController() : TypoScriptFrontendController|null
for reducing usage of global TSFE objects and to avoid conflicts when different frontend environments are used
Return values
TypoScriptFrontendController|nullgetUrlToCurrentLocation()
Returns the canonical URL to the current "location", which include the current page ID and type and optionally the query string
public
getUrlToCurrentLocation([bool $addQueryString = true ]) : string
Parameters
- $addQueryString : bool = true
-
Whether additional GET arguments in the query string should be included or not
Return values
stringgetUserObjectType()
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.
public
getUserObjectType() : mixed
Return values
mixed —One of OBJECTTYPE_ class constants or FALSE
HTMLcaseshift()
Shifts the case of characters outside of HTML tags in the input string
public
HTMLcaseshift(string $theValue, string $case) : string
Parameters
- $theValue : string
-
The string to change case for.
- $case : string
-
The direction; either "upper" or "lower
Tags
Return values
stringHTMLparser_TSbridge()
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.
public
HTMLparser_TSbridge(string $theValue, array<string|int, mixed> $conf) : string
Parameters
- $theValue : string
-
The value to parse by the class \TYPO3\CMS\Core\Html\HtmlParser
- $conf : array<string|int, mixed>
-
TypoScript properties for the parser. See link.
Tags
Return values
string —Return value.
http_makelinks()
Finds URLs in text and makes it to a real link.
public
http_makelinks(string $data, array<string|int, mixed> $conf) : string
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
- $data : string
-
The string in which to search for "http://
- $conf : array<string|int, mixed>
-
Configuration for makeLinks, see link
Tags
Return values
string —The processed input string, being returned.
imageLinkWrap()
Wraps the input string in link-tags that opens the image in a new window.
public
imageLinkWrap(string $string, string|File|FileReference $imageFile, array<string|int, mixed> $conf) : string
Parameters
- $string : string
-
String to wrap, probably an tag
- $imageFile : string|File|FileReference
-
The original image file
- $conf : array<string|int, mixed>
-
TypoScript properties for the "imageLinkWrap" function
This method should be used within TYPO3 Core only
Return values
string —The input string, $string, wrapped as configured.
insertData()
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.
public
insertData(string $str) : string
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
- $str : string
-
Input value
Tags
Return values
string —Processed input value
isDisabled()
Returns TRUE if the input table/row would be hidden in the frontend (according nto the current time and simulate user group)
public
isDisabled(string $table, array<string|int, mixed> $row) : bool
since v11, will be removed with v12. Unused.
Parameters
- $table : string
-
The table name
- $row : array<string|int, mixed>
-
The data record
Return values
boolkeywords()
Cleans up a string of keywords. Keywords at splitted by "," (comma) ";" (semi colon) and linebreak
public
keywords(string $content) : string
Parameters
- $content : string
-
String of keywords
Return values
string —Cleaned up string, keywords will be separated by a comma only.
lastChanged()
Sets the SYS_LASTCHANGED timestamp if input timestamp is larger than current value.
public
lastChanged(int $tstamp) : mixed
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
- $tstamp : int
-
Unix timestamp (number of seconds since 1970)
Tags
listNum()
Exploding a string by the $char value (if integer its an ASCII value) and returning index $listNum
public
listNum(string $content, string $listNum, string $char) : string
Parameters
- $content : string
-
String to explode
- $listNum : string
-
Index-number. You can place the word "last" in it and it will be substituted with the pointer to the last value. You can use math operators like "+-/*" (passed to calc())
- $char : string
-
Either a string used to explode the content string or an integer value which will then be changed into a character, eg. "10" for a linebreak char.
Return values
stringmailto_makelinks()
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.
public
mailto_makelinks(string $data, array<string|int, mixed> $conf) : string
Parameters
- $data : string
-
The string in which to search for "mailto:
- $conf : array<string|int, mixed>
-
Configuration for makeLinks, see link
Tags
Return values
string —The processed input string, being returned.
mergeTSRef()
Resolves a TypoScript reference value to the full set of properties BUT overridden with any local properties set.
public
mergeTSRef(array<string|int, mixed> $confArr, string $prop) : array<string|int, mixed>
So the reference is resolved but overlaid with local TypoScript properties of the reference value.
Parameters
- $confArr : array<string|int, mixed>
-
The TypoScript array
- $prop : string
-
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.
Return values
array<string|int, mixed> —The modified TypoScript array
noTrimWrap()
Wrapping a string, preserving whitespace in wrap value.
public
noTrimWrap(string $content, string $wrap[, string $char = '|' ]) : string
Notice that the wrap value uses part 1/2 to wrap (and not 0/1 which wrap() does)
Parameters
- $content : string
-
The content to wrap, eg. "HELLO WORLD
- $wrap : string
-
The wrap value, eg. " | |
- $char : string = '|'
-
The char used to split the wrapping value, default is "|"
Tags
Return values
string —Wrapped input string, eg. " HELLO WORD
numberFormat()
Implements the stdWrap property "numberFormat" This is a Wrapper function for php's number_format()
public
numberFormat(float $content, array<string|int, mixed> $conf) : string
Parameters
- $content : float
-
Value to process
- $conf : array<string|int, mixed>
-
TypoScript Configuration for numberFormat
Return values
string —The formatted number
numRows()
Returns number of rows selected by the query made by the properties set.
public
numRows(array<string|int, mixed> $conf) : int
Implements the stdWrap "numRows" property
Parameters
- $conf : array<string|int, mixed>
-
TypoScript properties for the property (see link to "numRows")
Tags
Return values
int —The number of rows found by the select
parseFunc()
Implements the stdWrap property, "parseFunc".
public
parseFunc(string $theValue, array<string|int, mixed> $conf[, string $ref = '' ]) : string
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
- $theValue : string
-
The value to process.
- $conf : array<string|int, mixed>
-
TypoScript configuration for parseFunc
- $ref : string = ''
-
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!
Tags
Return values
string —The processed value
prefixComment()
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.
public
prefixComment(string $str, array<string|int, mixed> $conf, string $content) : string
Notice; this function (used by stdWrap) can be disabled by a "config.disablePrefixComment" setting in TypoScript.
Parameters
- $str : string
-
Input value
- $conf : array<string|int, mixed>
-
TypoScript Configuration (not used at this point.)
- $content : string
-
The content to wrap the comment around.
Tags
Return values
string —Processed input value
readFlexformIntoConf()
Converts a given config in Flexform to a conf-array
public
readFlexformIntoConf(string|array<string|int, mixed> $flexData, array<string|int, mixed> &$conf[, bool $recursive = false ]) : mixed
Parameters
- $flexData : string|array<string|int, mixed>
-
Flexform data
- $conf : array<string|int, mixed>
-
Array to write the data into, by reference
- $recursive : bool = false
-
Is set if called recursive. Don't call function with this parameter, it's used inside the function only
registerContentObjectClass()
Register a single content object name to class name
public
registerContentObjectClass(string $className, string $contentObjectName) : mixed
This method is private API, please use configuration $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] to add new content objects
Parameters
- $className : string
- $contentObjectName : string
render()
Renders a content object by taking exception and cache handling into consideration
public
render(AbstractContentObject $contentObject[, array<string|int, mixed> $configuration = [] ]) : string
Parameters
- $contentObject : AbstractContentObject
-
Content object instance
- $configuration : array<string|int, mixed> = []
-
Array of TypoScript properties
Tags
Return values
stringrootLineValue()
Returns a value from the current rootline (site) from $GLOBALS['TSFE']->tmpl->rootLine;
public
rootLineValue(int $key, string $field[, bool $slideBack = false ][, mixed $altRootLine = '' ]) : string
Parameters
- $key : int
-
Which level in the root line
- $field : string
-
The field in the rootline record to return (a field from the pages table)
- $slideBack : bool = false
-
If set, then we will traverse through the rootline from outer level towards the root level until the value found is TRUE
- $altRootLine : mixed = ''
-
If you supply an array for this it will be used as an alternative root line array
Tags
Return values
string —The value from the field of the rootline.
searchWhere()
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%")'
public
searchWhere(string $searchWords, string $searchFieldList, string $searchTable) : string
Parameters
- $searchWords : string
-
The search words. These will be separated by space and comma.
- $searchFieldList : string
-
The fields to search in
- $searchTable : string
-
The table name you search in (recommended for DBAL compliance. Will be prepended field names as well)
Return values
string —The WHERE clause.
setContentObjectClassMap()
Allow injecting content object class map.
public
setContentObjectClassMap(array<string|int, mixed> $contentObjectClassMap) : mixed
This method is private API, please use configuration $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] to add new content objects
Parameters
- $contentObjectClassMap : array<string|int, mixed>
setCurrentFile()
Sets the current file object during iterations over files.
public
setCurrentFile(File|FileReference|Folder|string|null $fileObject) : mixed
Parameters
- $fileObject : File|FileReference|Folder|string|null
-
The file object.
setCurrentVal()
Sets the "current" value.
public
setCurrentVal(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable that you want to set as "current
Tags
setParent()
Sets the internal variable parentRecord with information about current record.
public
setParent(array<string|int, mixed> $data, string $currentRecord) : mixed
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
- $data : array<string|int, mixed>
-
The record array
- $currentRecord : string
-
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.
setRequest()
public
setRequest(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
setUserObjectType()
Sets the user object type
public
setUserObjectType(mixed $userObjectType) : mixed
Parameters
- $userObjectType : mixed
splitObj()
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.
public
splitObj(string $value, array<string|int, mixed> $conf) : string
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
Parameters
- $value : string
-
The string value to explode by $conf[token] and process each part
- $conf : array<string|int, mixed>
-
TypoScript properties for "split
Tags
Return values
string —Compiled result
start()
Class constructor.
public
start(array<string|int, mixed> $data[, string $table = '' ][, ServerRequestInterface|null $request = null ]) : mixed
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
- $data : array<string|int, mixed>
-
The record data that is rendered.
- $table : string = ''
-
The table that the data record is from.
- $request : ServerRequestInterface|null = null
stdWrap()
The "stdWrap" function. This is the implementation of what is known as "stdWrap properties" in TypoScript.
public
stdWrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string|null
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.
Parameters
- $content : string = ''
-
Input value undergoing processing in this function. Possibly substituted by other values fetched from another source.
- $conf : array<string|int, mixed> = []
-
TypoScript "stdWrap properties".
Return values
string|null —The processed input value
stdWrap_addPageCacheTags()
Add tags to page cache (comma-separated list)
public
stdWrap_addPageCacheTags([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in these functions.
- $conf : array<string|int, mixed> = []
-
All stdWrap properties, not just the ones for a particular function.
Return values
string —The processed input value
stdWrap_age()
age Will return the age of a given timestamp based on configuration given by stdWrap properties
public
stdWrap_age([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for age.
Return values
string —The processed input value
stdWrap_append()
append A content object that will be appended to the current content after most of the wraps have already been applied
public
stdWrap_append([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for append.
Return values
string —The processed input value
stdWrap_br()
br Searches for single line breaks and replaces them with a <br />/<br> tag according to the doctype
public
stdWrap_br([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_brTag()
brTag Searches for single line feeds and replaces them with the given value
public
stdWrap_brTag([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for brTag.
Return values
string —The processed input value
stdWrap_bytes()
bytes Will return the size of a given number in Bytes *
public
stdWrap_bytes([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for bytes.
Return values
string —The processed input value
stdWrap_cacheRead()
Check if content was cached before (depending on the given cache key)
public
stdWrap_cacheRead([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in these functions.
- $conf : array<string|int, mixed> = []
-
All stdWrap properties, not just the ones for a particular function.
Return values
string —The processed input value
stdWrap_cacheStore()
Store content into cache
public
stdWrap_cacheStore([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in these functions.
- $conf : array<string|int, mixed> = []
-
All stdWrap properties, not just the ones for a particular function.
Return values
string —The processed input value
stdWrap_case()
case Will transform the content to be upper or lower case only Leaves HTML tags untouched
public
stdWrap_case([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for case.
Return values
string —The processed input value
stdWrap_char()
char Returns a one-character string containing the character specified by ascii code.
public
stdWrap_char([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Reliable results only for character codes in the integer range 0 - 127.
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for char.
Tags
Return values
string —The processed input value
stdWrap_cObject()
cObject Will replace the content with the value of an official TypoScript cObject like TEXT, COA, HMENU
public
stdWrap_cObject([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for cObject.
Return values
string —The processed input value
stdWrap_crop()
crop Crops content to a given size without caring about HTML tags
public
stdWrap_crop([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for crop.
Return values
string —The processed input value
stdWrap_cropHTML()
cropHTML Crops content to a given size while leaving HTML tags untouched
public
stdWrap_cropHTML([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for cropHTML.
Return values
string —The processed input value
stdWrap_csConv()
stdWrap csConv: Converts the input to UTF-8
public
stdWrap_csConv([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
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
- $content : string = ''
-
The string to convert.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for csConv.
Return values
string —The processed input.
stdWrap_current()
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
public
stdWrap_current([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for current.
Return values
string —The processed input value
stdWrap_data()
Gets content from different sources based on getText functions.
public
stdWrap_data([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for data.
Return values
string —The processed input value
stdWrap_dataWrap()
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
public
stdWrap_dataWrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for dataWrap.
Return values
string —The processed input value
stdWrap_date()
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
public
stdWrap_date([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for date.
Return values
string —The processed input value
stdWrap_debug()
debug Will output the content as readable HTML code
public
stdWrap_debug([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_debugData()
debugData Will output the data used by the current record in a debug table
public
stdWrap_debugData([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_debugFunc()
debugFunc Will output the content in a debug table
public
stdWrap_debugFunc([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for debugFunc.
Return values
string —The processed input value
stdWrap_doubleBrTag()
doubleBrTag Searches for double line breaks and replaces them with the given value
public
stdWrap_doubleBrTag([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for doubleBrTag.
Return values
string —The processed input value
stdWrap_editIcons()
editIcons Will render icons for frontend editing as long as there is a BE user logged in
public
stdWrap_editIcons([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
since v11, will be removed with v12. Drop together with other editIcon removals.
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for editIcons.
Return values
string —The processed input value
stdWrap_editPanel()
editPanel Will render the edit panel for frontend editing as long as there is a BE user logged in
public
stdWrap_editPanel([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
since v11, will be removed with v12. Drop together with other editPanel removals.
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for editPanel.
Return values
string —The processed input value
stdWrap_encapsLines()
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
public
stdWrap_encapsLines([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for erncapsLines.
Return values
string —The processed input value
stdWrap_encodeForJavaScriptValue()
encodeForJavaScriptValue Escapes content to be used inside JavaScript strings. Single quotes are added around the value.
public
stdWrap_encodeForJavaScriptValue([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function
Return values
string —The processed input value
stdWrap_expandList()
expandList Will return a formatted number based on configuration given as stdWrap properties
public
stdWrap_expandList([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_field()
field Gets content from a DB field
public
stdWrap_field([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string|null
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for field.
Return values
string|null —The processed input value
stdWrap_fieldRequired()
fieldRequired Will immediately stop rendering and return an empty value when there is no content in the field given by fieldRequired
public
stdWrap_fieldRequired([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for fieldRequired.
Return values
string —The processed input value
stdWrap_hash()
Will return a hashed value of the current content
public
stdWrap_hash([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for hash.
Tags
Return values
string —The processed input value
stdWrap_HTMLparser()
HTMLparser Will parse HTML content based on functions given as stdWrap properties Heavily used together with RTE based content
public
stdWrap_HTMLparser([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for HTMLparser.
Return values
string —The processed input value
stdWrap_htmlSanitize()
public
stdWrap_htmlSanitize([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
- $conf : array<string|int, mixed> = []
Return values
stringstdWrap_htmlSpecialChars()
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
public
stdWrap_htmlSpecialChars([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for htmlSpecialChars.
Return values
string —The processed input value
stdWrap_if()
if Will immediately stop rendering and return an empty value when the result of the checks returns FALSE
public
stdWrap_if([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for if.
Return values
string —The processed input value
stdWrap_ifBlank()
ifBlank Will set content to a replacement value in case the trimmed value of content has no length 0 (zero) will not be replaced
public
stdWrap_ifBlank([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for ifBlank.
Return values
string —The processed input value
stdWrap_ifEmpty()
ifEmpty Will set content to a replacement value in case the trimmed value of content returns FALSE 0 (zero) will be replaced as well
public
stdWrap_ifEmpty([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for ifEmpty.
Return values
string —The processed input value
stdWrap_ifNull()
ifNull Will set content to a replacement value in case the value of content is NULL
public
stdWrap_ifNull([string|null $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string|null = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for ifNull.
Return values
string —The processed input value
stdWrap_innerWrap()
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
public
stdWrap_innerWrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for innerWrap.
Return values
string —The processed input value
stdWrap_innerWrap2()
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
public
stdWrap_innerWrap2([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for innerWrap2.
Return values
string —The processed input value
stdWrap_insertData()
insertData Can fetch additional content the same way data does and replaces any occurrence of {field:whatever} with this content
public
stdWrap_insertData([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_intval()
intval Will return an integer value of the current content
public
stdWrap_intval([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_keywords()
keywords Transforms content into a CSV list to be used i.e. as keywords within a meta tag
public
stdWrap_keywords([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_lang()
lang Translates content based on the language currently used by the FE
public
stdWrap_lang([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for lang.
Return values
string —The processed input value
stdWrap_listNum()
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
public
stdWrap_listNum([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for listNum.
Return values
string —The processed input value
stdWrap_noTrimWrap()
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 *
public
stdWrap_noTrimWrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for noTrimWrap.
Return values
string —The processed input value
stdWrap_numberFormat()
numberFormat Will return a formatted number based on configuration given as stdWrap properties
public
stdWrap_numberFormat([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for numberFormat.
Return values
string —The processed input value
stdWrap_numRows()
numRows Counts the number of returned records of a DB operation makes use of select internally
public
stdWrap_numRows([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for numRows.
Return values
string —The processed input value
stdWrap_orderedStdWrap()
orderedStdWrap Calls stdWrap for each entry in the provided array
public
stdWrap_orderedStdWrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for orderedStdWrap.
Return values
string —The processed input value
stdWrap_outerWrap()
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
public
stdWrap_outerWrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for outerWrap.
Return values
string —The processed input value
stdWrap_override()
override Will override the current value of content with its own value'
public
stdWrap_override([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for override.
Return values
string —The processed input value
stdWrap_parseFunc()
parseFunc Will parse the content based on functions given as stdWrap properties Heavily used together with RTE based content
public
stdWrap_parseFunc([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for parseFunc.
Return values
string —The processed input value
stdWrap_postCObject()
postCObject A content object that is appended to the current content but between the innerWraps and the rest of the wraps
public
stdWrap_postCObject([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for postCObject.
Return values
string —The processed input value
stdWrap_postUserFunc()
postUserFunc Will execute a user function after the content has been modified by any other stdWrap function
public
stdWrap_postUserFunc([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for postUserFunc.
Return values
string —The processed input value
stdWrap_postUserFuncInt()
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
public
stdWrap_postUserFuncInt([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for postUserFuncInt.
Return values
string —The processed input value
stdWrap_preCObject()
preCObject A content object that is prepended to the current content but between the innerWraps and the rest of the wraps
public
stdWrap_preCObject([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for preCObject.
Return values
string —The processed input value
stdWrap_prefixComment()
prefixComment Will add HTML comments to the content to make it easier to identify certain content elements within the HTML output later on
public
stdWrap_prefixComment([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for prefixComment.
Return values
string —The processed input value
stdWrap_preIfEmptyListNum()
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
public
stdWrap_preIfEmptyListNum([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for preIfEmptyListNum.
Return values
string —The processed input value
stdWrap_prepend()
prepend A content object that will be prepended to the current content after most of the wraps have already been applied
public
stdWrap_prepend([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for prepend.
Return values
string —The processed input value
stdWrap_preUserFunc()
preUserFunc Will execute a user public function before the content will be modified by any other stdWrap function
public
stdWrap_preUserFunc([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for preUserFunc.
Return values
string —The processed input value
stdWrap_prioriCalc()
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
public
stdWrap_prioriCalc([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for prioriCalc.
Return values
string —The processed input value
stdWrap_rawUrlEncode()
rawUrlEncode Encodes content to be used within URLs
public
stdWrap_rawUrlEncode([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_replacement()
replacement Will execute replacements on the content (optionally with preg-regex)
public
stdWrap_replacement([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for replacement.
Return values
string —The processed input value
stdWrap_required()
required Will immediately stop rendering and return an empty value when there is no content at this point
public
stdWrap_required([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_round()
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
public
stdWrap_round([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for round.
Return values
string —The processed input value
stdWrap_setContentToCurrent()
setContentToCurrent actually it just does the contrary: Sets the value of 'current' based on current content
public
stdWrap_setContentToCurrent([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_setCurrent()
setCurrent Sets the value of 'current' based on the outcome of stdWrap operations
public
stdWrap_setCurrent([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for setCurrent.
Return values
string —The processed input value
stdWrap_split()
split Will split the content by a given token and treat the results separately Automatically fills 'current' with a single result
public
stdWrap_split([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for split.
Return values
string —The processed input value
stdWrap_stdWrap()
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
public
stdWrap_stdWrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for stdWrap.
Return values
string —The processed input value
stdWrap_stdWrapOverride()
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
public
stdWrap_stdWrapOverride([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in these functions.
- $conf : array<string|int, mixed> = []
-
All stdWrap properties, not just the ones for a particular function.
Return values
string —The processed input value
stdWrap_stdWrapPostProcess()
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
public
stdWrap_stdWrapPostProcess([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in these functions.
- $conf : array<string|int, mixed> = []
-
All stdWrap properties, not just the ones for a particular function.
Return values
string —The processed input value
stdWrap_stdWrapPreProcess()
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
public
stdWrap_stdWrapPreProcess([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in these functions.
- $conf : array<string|int, mixed> = []
-
All stdWrap properties, not just the ones for a particular function.
Return values
string —The processed input value
stdWrap_stdWrapProcess()
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
public
stdWrap_stdWrapProcess([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in these functions.
- $conf : array<string|int, mixed> = []
-
All stdWrap properties, not just the ones for a particular function.
Return values
string —The processed input value
stdWrap_strftime()
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
public
stdWrap_strftime([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for strftime.
Tags
Return values
string —The processed input value
stdWrap_stripHtml()
stripHtml Completely removes HTML tags from content
public
stdWrap_stripHtml([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_strPad()
strPad Will return a string padded left/right/on both sides, based on configuration given as stdWrap properties
public
stdWrap_strPad([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for strPad.
Return values
string —The processed input value
stdWrap_strtotime()
strtotime Will return a timestamp based on configuration given according to PHP strtotime
public
stdWrap_strtotime([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for strtotime.
Return values
string —The processed input value
stdWrap_substring()
substring Will return a substring based on position information given by stdWrap properties
public
stdWrap_substring([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for substring.
Return values
string —The processed input value
stdWrap_trim()
trim Cuts off any whitespace at the beginning and the end of the content
public
stdWrap_trim([string $content = '' ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
Return values
string —The processed input value
stdWrap_typolink()
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
public
stdWrap_typolink([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for typolink.
Return values
string —The processed input value
stdWrap_wrap()
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
public
stdWrap_wrap([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for wrap.
Return values
string —The processed input value
stdWrap_wrap2()
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
public
stdWrap_wrap2([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for wrap2.
Return values
string —The processed input value
stdWrap_wrap3()
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
public
stdWrap_wrap3([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for wrap3.
Return values
string —The processed input value
stdWrap_wrapAlign()
wrapAlign Wraps content with a div container having the style attribute text-align set to the given value See wrap
public
stdWrap_wrapAlign([string $content = '' ][, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string = ''
-
Input value undergoing processing in this function.
- $conf : array<string|int, mixed> = []
-
stdWrap properties for wrapAlign.
Return values
string —The processed input value
stdWrapValue()
Gets a configuration value by passing them through stdWrap first and taking a default value if stdWrap doesn't yield a result.
public
stdWrapValue(string $key, array<string|int, mixed> $config[, string|int|bool|null $defaultValue = '' ]) : string|int|bool|null
Parameters
- $key : string
-
The config variable key (from TS array).
- $config : array<string|int, mixed>
-
The TypoScript array.
- $defaultValue : string|int|bool|null = ''
-
Optional default value.
Return values
string|int|bool|null —Value of the config variable
substring()
Implements the stdWrap property "substring" which is basically a TypoScript implementation of the PHP function, substr()
public
substring(string $content, string $options) : string
Parameters
- $content : string
-
The string to perform the operation on
- $options : string
-
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().
Tags
Return values
string —The processed input value.
typoLink()
Implements the "typolink" property of stdWrap (and others) Basically the input string, $linktext, is (typically) wrapped in a <a>-tag linking to some page, email address, file or URL based on a parameter defined by the configuration array $conf.
public
typoLink(string $linkText, array<string|int, mixed> $conf) : string
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
- $linkText : string
-
The string (text) to link
- $conf : array<string|int, mixed>
-
TypoScript configuration (see link below)
Tags
Return values
string —A link-wrapped string.
typoLink_URL()
Based on the input "TypoLink" TypoScript configuration this will return the generated URL
public
typoLink_URL(array<string|int, mixed> $conf) : string
Parameters
- $conf : array<string|int, mixed>
-
TypoScript properties for "typolink
Tags
Return values
string —The URL of the link-tag that typolink() would by itself return
wrap()
Wrapping a string.
public
wrap(string $content, string $wrap[, string $char = '|' ]) : string
Implements the TypoScript "wrap" property. Example: $content = "HELLO WORLD" and $wrap = " | ", result: "HELLO WORLD"
Parameters
- $content : string
-
The content to wrap
- $wrap : string
-
The wrap value, eg. " |
- $char : string = '|'
-
The char used to split the wrapping value, default is "|
Tags
Return values
string —Wrapped input string
addDefaultFrontendJavaScript()
protected
addDefaultFrontendJavaScript() : void
addSecurityRelValues()
protected
addSecurityRelValues(array<string|int, mixed> $tagAttributes, string|null $target, string $url) : array<string|int, mixed>
Parameters
- $tagAttributes : array<string|int, mixed>
- $target : string|null
- $url : string
Return values
array<string|int, mixed>calculateCacheKey()
Applies stdWrap to the cache key
protected
calculateCacheKey(array<string|int, mixed> $configuration) : string
Parameters
- $configuration : array<string|int, mixed>
Return values
stringcalculateCacheLifetime()
Calculates the lifetime of a cache entry based on the given configuration
protected
calculateCacheLifetime(array<string|int, mixed> $configuration) : int|null
Parameters
- $configuration : array<string|int, mixed>
Return values
int|nullcalculateCacheTags()
Calculates the tags for a cache entry bases on the given configuration
protected
calculateCacheTags(array<string|int, mixed> $configuration) : array<string|int, mixed>
Parameters
- $configuration : array<string|int, mixed>
Return values
array<string|int, mixed>createCropAreaFromJsonString()
Takes a JSON string and creates CropVariantCollection and fetches the corresponding CropArea for that.
protected
createCropAreaFromJsonString(string $cropSettings, string $cropVariant) : Area
Parameters
- $cropSettings : string
- $cropVariant : string
Return values
AreacreateExceptionHandler()
Creates the content object exception handler from local content object configuration or, from global configuration if not explicitly disabled in local configuration
protected
createExceptionHandler([array<string|int, mixed> $configuration = [] ]) : ExceptionHandlerInterface|null
Parameters
- $configuration : array<string|int, mixed> = []
Tags
Return values
ExceptionHandlerInterface|nulldetermineExceptionHandlerClassName()
Determine exception handler class name from global and content object configuration
protected
determineExceptionHandlerClassName(array<string|int, mixed> $configuration) : string|null
Parameters
- $configuration : array<string|int, mixed>
Return values
string|nullencryptCharcode()
Encryption (or decryption) of a single character.
protected
encryptCharcode(int $n, int $start, int $end, int $offset) : string
Within the given range the character is shifted with the supplied offset.
Parameters
- $n : int
-
Ordinal of input character
- $start : int
-
Start of range
- $end : int
-
End of range
- $offset : int
-
Offset
Return values
string —encoded/decoded version of character
encryptEmail()
Encryption of email addresses for <A>-tags See the spam protection setup in TS 'config.'
protected
encryptEmail(string $string, mixed $type) : string
Parameters
- $string : string
-
Input string to en/decode: "mailto:some@example.com
- $type : mixed
-
- either "ascii" or a number between -10 and 10, taken from config.spamProtectEmailAddresses
Return values
string —encoded version of $string
getContentLengthOfCurrentTag()
Get content length of the current tag that could also contain nested tag contents
protected
getContentLengthOfCurrentTag(string $theValue, int $pointer, string $currentTag) : int
Parameters
- $theValue : string
- $pointer : int
- $currentTag : string
Return values
intgetCropAreaFromFileReference()
Returns an ImageManipulation\Area object for the given cropVariant (or 'default') or null if the crop settings or crop area is empty.
protected
getCropAreaFromFileReference(FileReference $fileReference, array<string|int, mixed> $fileArray) : Area|null
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
- $fileArray : array<string|int, mixed>
-
TypoScript properties for the imgResource type
Return values
Area|nullgetCropAreaFromFromTypoScriptSettings()
Returns an ImageManipulation\Area object for the given cropVariant (or 'default') or null if the crop settings or crop area is empty.
protected
getCropAreaFromFromTypoScriptSettings(FileInterface $file, array<string|int, mixed> $fileArray) : Area|null
Parameters
- $file : FileInterface
- $fileArray : array<string|int, mixed>
Return values
Area|nullgetEnvironmentVariable()
Wrapper function for GeneralUtility::getIndpEnv()
protected
getEnvironmentVariable(string $key) : string
Parameters
- $key : string
-
Name of the "environment variable"/"server variable" you wish to get.
Tags
Return values
stringgetFileDataKey()
Gets file information. This is a helper function for the getData() method above, which resolves e.g.
protected
getFileDataKey(string $key) : string|int
page.10.data = file:current:title or page.10.data = file:17:title
Parameters
- $key : string
-
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.)
Return values
string|int —The value as retrieved from the file object.
getFromCache()
Fetches content from cache
protected
getFromCache(array<string|int, mixed> $configuration) : string|bool
Parameters
- $configuration : array<string|int, mixed>
-
Array
Tags
Return values
string|bool —FALSE on cache miss
getFrontendBackendUser()
Returns the current BE user.
protected
getFrontendBackendUser() : FrontendBackendUserAuthentication
Return values
FrontendBackendUserAuthenticationgetGetImgResourceHookObjects()
Gets the 'getImgResource' hook objects.
protected
getGetImgResourceHookObjects() : array<string|int, mixed>
The first call initializes the accordant objects.
Return values
array<string|int, mixed> —The 'getImgResource' hook objects (if any)
getLanguageRestriction()
Adds parts to the WHERE clause that are related to language.
protected
getLanguageRestriction(ExpressionBuilder $expressionBuilder, string $table, array<string|int, mixed> $conf, Context $context) : string|CompositeExpression|null
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
- $table : string
- $conf : array<string|int, mixed>
- $context : Context
Tags
Return values
string|CompositeExpression|nullgetQueryArray()
Helper to transform a QueryBuilder object into a queryParts array that can be used with exec_SELECT_queryArray
protected
getQueryArray(QueryBuilder $queryBuilder) : array<string|int, mixed>
Parameters
- $queryBuilder : QueryBuilder
Tags
Return values
array<string|int, mixed>getQueryArrayJoinHelper()
Helper to transform the QueryBuilder join part into a SQL fragment.
protected
getQueryArrayJoinHelper(string $fromAlias, array<string|int, mixed> $joinParts, array<string|int, mixed> &$knownAliases) : string
Parameters
- $fromAlias : string
- $joinParts : array<string|int, mixed>
- $knownAliases : array<string|int, mixed>
Tags
Return values
stringgetQueryConstraints()
Helper function for getQuery(), creating the WHERE clause of the SELECT query
protected
getQueryConstraints(string $table, array<string|int, mixed> $conf) : array<string|int, mixed>
Parameters
- $table : string
-
The table name
- $conf : array<string|int, mixed>
-
The TypoScript configuration properties
Tags
Return values
array<string|int, mixed> —Associative array containing the prepared data for WHERE, ORDER BY and GROUP BY fragments
getResourceFactory()
Get instance of FAL resource factory
protected
getResourceFactory() : ResourceFactory
Return values
ResourceFactorygetTimeTracker()
protected
getTimeTracker() : TimeTracker
Return values
TimeTrackerisInternalUrl()
Checks whether the given url is an internal url.
protected
isInternalUrl(string $url) : bool
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
- $url : string
-
The url to check.
Tags
Return values
boolmergeExceptionHandlerConfiguration()
Merges global exception handler configuration with the one from the content object and returns the merged exception handler configuration
protected
mergeExceptionHandlerConfiguration(array<string|int, mixed> $configuration) : array<string|int, mixed>
Parameters
- $configuration : array<string|int, mixed>
Return values
array<string|int, mixed>processUrl()
Loops over all configured URL modifier hooks (if available) and returns the generated URL or NULL if no URL was generated.
protected
processUrl(string $context, string $url[, array<string|int, mixed> $typolinkConfiguration = [] ]) : string|null
Parameters
- $context : string
-
The context in which the method is called (e.g. typoLink).
- $url : string
-
The URL that should be processed.
- $typolinkConfiguration : array<string|int, mixed> = []
-
The current link configuration array.
Tags
Return values
string|null —Returns NULL if URL was not processed or the processed URL as a string.
replacement()
Processes ordered replacements on content data.
protected
replacement(string $content, array<string|int, mixed> $configuration) : string
Parameters
- $content : string
-
The content to be processed
- $configuration : array<string|int, mixed>
-
The TypoScript configuration for stdWrap.replacement
Return values
string —The processed content data
replacementSingle()
Processes a single search/replace on content data.
protected
replacementSingle(string $content, array<string|int, mixed> $configuration) : string
Parameters
- $content : string
-
The content to be processed
- $configuration : array<string|int, mixed>
-
The TypoScript of the search/replace action to be processed
Return values
string —The processed content data
resolveMixedLinkParameter()
called from the typoLink() function
protected
resolveMixedLinkParameter(string $linkText, string $mixedLinkParameter[, array<string|int, mixed> &$configuration = [] ]) : array<string|int, mixed>|string
does the magic to split the full "typolink" string like "15,13 _blank myclass &more=1" into separate parts
Parameters
- $linkText : string
-
The string (text) to link
- $mixedLinkParameter : string
-
destination data like "15,13 _blank myclass &more=1" used to create the link
- $configuration : array<string|int, mixed> = []
-
TypoScript configuration
Tags
Return values
array<string|int, mixed>|stringround()
Implements the "round" property of stdWrap This is a Wrapper function for PHP's rounding functions (round,ceil,floor), defaults to round()
protected
round(string $content[, array<string|int, mixed> $conf = [] ]) : string
Parameters
- $content : string
-
Value to process
- $conf : array<string|int, mixed> = []
-
TypoScript configuration for round
Return values
string —The formatted number
sanitizeSelectPart()
Helper function for getQuery, sanitizing the select part
protected
sanitizeSelectPart(string $selectPart, string $table) : string
This functions checks if the necessary fields are part of the select and adds them if necessary.
Parameters
- $selectPart : string
-
Select part
- $table : string
-
Table to select from
Tags
Return values
string —Sanitized select part
shallDebug()
protected
shallDebug() : bool
Return values
boolshallExportDefaultFrontendJavaScript()
protected
shallExportDefaultFrontendJavaScript() : bool
Return values
boolshallRemoveDefaultFrontendJavaScript()
protected
shallRemoveDefaultFrontendJavaScript() : bool