TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
TypoScriptFrontendController Class Reference

Public Member Functions

 __construct ($_=null, $id, $type, $no_cache= '', $cHash= '', $_2=null, $MP= '', $RDCT= '')
 
 setContentType ($contentType)
 
 connectToDB ()
 
 sendRedirect ()
 
 initFEuser ()
 
 initUserGroups ()
 
 isUserOrGroupSet ()
 
 checkAlternativeIdMethods ()
 
 clear_preview ()
 
 isBackendUserLoggedIn ()
 
 determineId ()
 
 fetch_the_id ()
 
 getPageAndRootline ()
 
 getPageShortcut ($SC, $mode, $thisUid, $itera=20, $pageLog=[], $disableGroupCheck=false)
 
 checkRootlineForIncludeSection ()
 
 checkEnableFields ($row, $bypassGroupCheck=false)
 
 checkPageGroupAccess ($row, $groupList=null)
 
 checkPagerecordForIncludeSection ($row)
 
 checkIfLoginAllowedInBranch ()
 
 getPageAccessFailureReasons ()
 
 getPageAndRootlineWithDomain ($domainStartPage)
 
 setSysPageWhereClause ()
 
 findDomainRecord ($recursive=false)
 
 pageUnavailableAndExit ($reason= '', $header= '')
 
 pageNotFoundAndExit ($reason= '', $header= '')
 
 checkPageUnavailableHandler ()
 
 pageUnavailableHandler ($code, $header, $reason)
 
 pageNotFoundHandler ($code, $header= '', $reason= '')
 
 pageErrorHandler ($code, $header= '', $reason= '')
 
 checkAndSetAlias ()
 
 mergingWithGetVars ($GET_VARS)
 
 makeCacheHash ()
 
 reqCHash ()
 
 initTemplate ()
 
 getFromCache ()
 
 getFromCache_queryRow ()
 
 headerNoCache ()
 
 getHash ()
 
 getLockHash ()
 
 getConfigArray ()
 
 settingLanguage ()
 
 settingLocale ()
 
 handleDataSubmission ()
 
 redirectToExternalUrl ()
 
 setUrlIdToken ()
 
 calculateLinkVars ()
 
 checkPageForMountpointRedirect ()
 
 checkPageForShortcutRedirect ()
 
 isGeneratePage ()
 
 tempPageCacheContent ()
 
 realPageCacheContent ()
 
 setPageCacheContent ($content, $data, $expirationTstamp)
 
 clearPageCacheContent ()
 
 clearPageCacheContent_pidList ($pidList)
 
 setSysLastChanged ()
 
 releaseLocks ()
 
 addCacheTags (array $tags)
 
 generatePage_preProcessing ()
 
 generatePage_whichScript ()
 
 generatePage_postProcessing ()
 
 INTincScript_loadJSCode ()
 
 isINTincScript ()
 
 isOutputting ()
 
 processOutput ()
 
 sendCacheHeaders ()
 
 isStaticCacheble ()
 
 contentStrReplace ()
 
 storeSessionData ()
 
 setParseTime ()
 
 previewInfo ()
 
 hook_eofe ()
 
 beLoginLinkIPList ()
 
 addTempContentHttpHeaders ()
 
 encryptCharcode ($n, $start, $end, $offset)
 
 encryptEmail ($string, $back=false)
 
 newCObj ()
 
 baseUrlWrap ($url)
 
 logDeprecatedTyposcript ($typoScriptProperty, $explanation= '')
 
 updateMD5paramsRecord ($hash)
 
 doWorkspacePreview ()
 
 whichWorkspace ($returnTitle=false)
 
 includeLibraries (array $libraries)
 
 getPagesTSconfig ()
 
 setJS ($key, $content= '')
 
 setCSS ($key, $content)
 
 uniqueHash ($str= '')
 
 set_no_cache ($reason= '', $internal=false)
 
 set_cache_timeout_default ($seconds)
 
 getUniqueId ($desired= '')
 
 sL ($input)
 
 getLLL ($index, $LOCAL_LANG)
 
 domainNameMatchesCurrentRequest ($domainName)
 
 getDomainDataForPid ($targetPid)
 
 getDomainNameForPid ($targetPid)
 
 getRequestedId ()
 

Public Attributes

 $id = ''
 
 $type = ''
 
 $cHash = ''
 
 $no_cache = false
 
 $rootLine = ''
 
 $page = ''
 
 $contentPid = 0
 
 $sys_page = ''
 
 $pageNotFound = 0
 
 $domainStartPage = 0
 
 $pageAccessFailureHistory = []
 
 $MP = ''
 
 $RDCT = ''
 
 $page_cache_reg1 = 0
 
 $siteScript = ''
 
 $fe_user = ''
 
 $loginUser = false
 
 $gr_list = ''
 
 $beUserLogin = false
 
 $workspacePreview = 0
 
 $loginAllowedInBranch = true
 
 $loginAllowedInBranch_mode = ''
 
 $ADMCMD_preview_BEUSER_uid = 0
 
 $fePreview = 0
 
 $showHiddenPage = false
 
 $showHiddenRecords = false
 
 $simUserGroup = 0
 
 $config = ''
 
 $tmpl = null
 
 $cacheTimeOutDefault = false
 
 $cacheContentFlag = false
 
 $cacheExpires = 0
 
 $isClientCachable = false
 
 $all = []
 
 $sPre = ''
 
 $pSetup = ''
 
 $newHash = ''
 
 $getMethodUrlIdToken = ''
 
 $no_cacheBeforePageGen = false
 
 $tempContent = false
 
 $forceTemplateParsing = false
 
 $cHash_array = []
 
 $pagesTSconfig = ''
 
 $additionalHeaderData = []
 
 $additionalFooterData = []
 
 $additionalJavaScript = []
 
 $additionalCSS = []
 
 $JSCode
 
 $inlineJS
 
 $divSection = ''
 
 $debug = false
 
 $intTarget = ''
 
 $extTarget = ''
 
 $fileTarget = ''
 
 $MP_defaults = []
 
 $spamProtectEmailAddresses = 0
 
 $absRefPrefix = ''
 
 $compensateFieldWidth = ''
 
 $lockFilePath = ''
 
 $ATagParams = ''
 
 $sWordRegEx = ''
 
 $sWordList = ''
 
 $linkVars = ''
 
 $excludeCHashVars = ''
 
 $displayEditIcons = ''
 
 $displayFieldEditIcons = ''
 
 $sys_language_uid = 0
 
 $sys_language_mode = ''
 
 $sys_language_content = 0
 
 $sys_language_contentOL = 0
 
 $sys_language_isocode = ''
 
 $applicationData = []
 
 $register = []
 
 $registerStack = []
 
 $cObjectDepthCounter = 50
 
 $recordRegister = []
 
 $currentRecord = ''
 
 $accessKey = []
 
 $imagesOnPage = []
 
 $lastImageInfo = []
 
 $uniqueCounter = 0
 
 $uniqueString = ''
 
 $indexedDocTitle = ''
 
 $altPageTitle = ''
 
 $baseUrl = ''
 
 $cObj = ''
 
 $content = ''
 
 $scriptParseTime = 0
 
 $csConvObj
 
 $defaultCharSet = 'utf-8'
 
 $renderCharset = 'utf-8'
 
 $metaCharset = 'utf-8'
 
 $lang = ''
 
 $LL_labels_cache = []
 
 $LL_files_cache = []
 
 $xhtmlDoctype = ''
 
 $xhtmlVersion
 
 $dtdAllowsFrames
 

Protected Member Functions

 initPageRenderer ()
 
 initCaches ()
 
 determineIdIsHiddenPage ()
 
 createHashBase ($createLockHashBase=false)
 
 updateRootLinesWithTranslations ()
 
 checkTranslatedShortcut ()
 
 regeneratePageTitle ()
 
 recursivelyReplaceIntPlaceholdersInContent ()
 
 INTincScript_process ($INTiS_config)
 
 disableCache ()
 
 calculatePageCacheTimeout ()
 
 getCurrentPageCacheConfiguration ()
 
 getFirstTimeValueForRecord ($tableDef, $now)
 
 acquireLock ($type, $key)
 
 releaseLock ($type)
 
 getBackendUser ()
 
 getTimeTracker ()
 
 getDocumentTemplate ()
 

Protected Attributes

 $originalMountPointPage = null
 
 $originalShortcutPage = null
 
 $activeUrlHandlers = []
 
 $languageDependencies = []
 
 $locks = []
 
 $pageRenderer = null
 
 $pageCache
 
 $pageCacheTags = []
 
 $cacheHash
 
 $domainDataCache = []
 
 $contentType = 'text/html'
 
 $requestedId
 

Private Attributes

 $usedUniqueIds = []
 

Detailed Description

Class for the built TypoScript based frontend. Instantiated in as the global object TSFE.

Main frontend class, instantiated in as the global object TSFE.

This class has a lot of functions and internal variable which are used from

The class is instantiated as $GLOBALS['TSFE'] in .

The use of this class should be inspired by the order of function calls as found in .

Definition at line 70 of file TypoScriptFrontendController.php.

Constructor & Destructor Documentation

__construct (   $_ = null,
  $id,
  $type,
  $no_cache = '',
  $cHash = '',
  $_2 = null,
  $MP = '',
  $RDCT = '' 
)

Class constructor Takes a number of GET/POST input variable as arguments and stores them internally. The processing of these variables goes on later in this class. Also sets a unique string (->uniqueString) for this script instance; A md5 hash of the microtime()

Parameters
array$_unused, previously defined to set TYPO3_CONF_VARS
mixed$idThe value of GeneralUtility::_GP('id')
int$typeThe value of GeneralUtility::_GP('type')
bool | string$no_cacheThe value of GeneralUtility::_GP('no_cache'), evaluated to 1/0
string$cHashThe value of GeneralUtility::_GP('cHash')
string$_2previously was used to define the jumpURL
string$MPThe value of GeneralUtility::_GP('MP')
string$RDCTThe value of GeneralUtility::_GP('RDCT')
See also

Definition at line 853 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$cHash, $GLOBALS, TypoScriptFrontendController\$id, TypoScriptFrontendController\$MP, TypoScriptFrontendController\$no_cache, TypoScriptFrontendController\$RDCT, TypoScriptFrontendController\$type, GeneralUtility\callUserFunction(), TypoScriptFrontendController\disableCache(), GeneralUtility\getIndpEnv(), TypoScriptFrontendController\getTimeTracker(), TypoScriptFrontendController\initCaches(), TypoScriptFrontendController\initPageRenderer(), GeneralUtility\makeInstance(), and GeneralUtility\SYSLOG_SEVERITY_WARNING.

Member Function Documentation

acquireLock (   $type,
  $key 
)
protected

Acquire a page specific lock

Parameters
string$type
string$key
Exceptions
InvalidArgumentException
RuntimeException
TYPO3

Definition at line 4727 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$type, LockingStrategyInterface\LOCK_CAPABILITY_EXCLUSIVE, LockingStrategyInterface\LOCK_CAPABILITY_NOBLOCK, and GeneralUtility\makeInstance().

Referenced by TypoScriptFrontendController\getFromCache().

addCacheTags ( array  $tags)

Adds tags to this page's cache entry, you can then f.e. remove cache entries by tag

Parameters
array$tagsAn array of tag
Returns
void

Definition at line 3215 of file TypoScriptFrontendController.php.

addTempContentHttpHeaders ( )

Sends HTTP headers for temporary content. These headers prevent search engines from caching temporary content and asks them to revisit this page again.

Returns
void

Definition at line 3779 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\processOutput().

baseUrlWrap (   $url)

Prefixing the input URL with ->baseUrl If ->baseUrl is set and the input url is not absolute in some way. Designed as a wrapper functions for use with all frontend links that are processed by JavaScript (for "realurl" compatibility!). So each time a URL goes into window.open, window.location.href or otherwise, wrap it with this function!

Parameters
string$urlInput URL, relative or absolute
Returns
string Processed input value.

Definition at line 3920 of file TypoScriptFrontendController.php.

beLoginLinkIPList ( )

Returns a link to the BE login screen with redirect to the front-end

Returns
string HTML, a tag for a link to the backend.

Definition at line 3756 of file TypoScriptFrontendController.php.

References GeneralUtility\cmpIP(), and GeneralUtility\getIndpEnv().

calculateLinkVars ( )

Calculates and sets the internal linkVars based upon the current $_GET parameters and the setting "config.linkVars".

Returns
void

Definition at line 2909 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$linkVars, GeneralUtility\_GET(), GeneralUtility\implodeArrayForUrl(), PageGenerator\isAllowedLinkVarValue(), and GeneralUtility\trimExplode().

calculatePageCacheTimeout ( )
protected

Calculates page cache timeout according to the records with starttime/endtime on the page.

Returns
int Page cache timeout or PHP_INT_MAX if cannot be determined

Definition at line 4470 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\getCurrentPageCacheConfiguration(), and TypoScriptFrontendController\getFirstTimeValueForRecord().

checkAlternativeIdMethods ( )

Provides ways to bypass the '?id=[xxx]&type=[xx]' format, using either PATH_INFO or virtual HTML-documents (using Apache mod_rewrite)

Two options: 1) Use PATH_INFO (also Apache) to extract id and type from that var. Does not require any special modules compiled with apache. (less typical) 2) Using hook which enables features like those provided from "realurl" extension (AKA "Speaking URLs")

Returns
void

Definition at line 1108 of file TypoScriptFrontendController.php.

References $GLOBALS, GeneralUtility\callUserFunction(), and GeneralUtility\getIndpEnv().

checkAndSetAlias ( )

Fetches the integer page id for a page alias. Looks if ->id is not an integer and if so it will search for a page alias and if found the page uid of that page is stored in $this->id

Returns
void private

Definition at line 2169 of file TypoScriptFrontendController.php.

References MathUtility\canBeInterpretedAsInteger().

Referenced by TypoScriptFrontendController\fetch_the_id().

checkEnableFields (   $row,
  $bypassGroupCheck = false 
)

Checks page record for enableFields Returns TRUE if enableFields does not disable the page record. Takes notice of the ->showHiddenPage flag and uses SIM_ACCESS_TIME for start/endtime evaluation

Parameters
array$rowThe page record to evaluate (needs fields: hidden, starttime, endtime, fe_group)
bool$bypassGroupCheckBypass group-check
Returns
bool TRUE, if record is viewable.
See also
TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList(), checkPagerecordForIncludeSection()

Definition at line 1763 of file TypoScriptFrontendController.php.

References $GLOBALS, GeneralUtility\callUserFunction(), and TypoScriptFrontendController\checkPageGroupAccess().

Referenced by TypoScriptFrontendController\checkPagerecordForIncludeSection().

checkIfLoginAllowedInBranch ( )

Checks if logins are allowed in the current branch of the page tree. Traverses the full root line and returns TRUE if logins are OK, otherwise FALSE (and then the login user must be unset!)

Returns
bool returns TRUE if logins are OK, otherwise FALSE (and then the login user must be unset!)

Definition at line 1819 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\determineId().

checkPageForMountpointRedirect ( )

Redirect to target page if the current page is an overlaid mountpoint.

If the current page is of type mountpoint and should be overlaid with the contents of the mountpoint page and is accessed directly, the user will be redirected to the mountpoint context.

Returns
void

Definition at line 2952 of file TypoScriptFrontendController.php.

References PageRepository\DOKTYPE_MOUNTPOINT.

checkPageForShortcutRedirect ( )

Redirect to target page, if the current page is a Shortcut.

If the current page is of type shortcut and accessed directly via its URL, this function redirects to the Shortcut target using a Location header.

Returns
void If page is not a Shortcut, redirects and exits otherwise

Definition at line 2967 of file TypoScriptFrontendController.php.

References PageRepository\DOKTYPE_SHORTCUT.

checkPageGroupAccess (   $row,
  $groupList = null 
)

Check group access against a page record

Parameters
array$rowThe page record to evaluate (needs field: fe_group)
mixed$groupListList of group id's (comma list or array). Default is $this->gr_list
Returns
bool TRUE, if group access is granted. private

Definition at line 1789 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$gr_list.

Referenced by TypoScriptFrontendController\checkEnableFields(), and TypoScriptFrontendController\getPageAccessFailureReasons().

checkPagerecordForIncludeSection (   $row)

Checks page record for include section

Parameters
array$rowThe page record to evaluate (needs fields: extendToSubpages + hidden, starttime, endtime, fe_group)
Returns
bool Returns TRUE if either extendToSubpages is not checked or if the enableFields does not disable the page record. private
See also
checkEnableFields(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTreeList(), checkRootlineForIncludeSection()

Definition at line 1809 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\checkEnableFields().

Referenced by TypoScriptFrontendController\checkRootlineForIncludeSection().

checkPageUnavailableHandler ( )

Checks whether the pageUnavailableHandler should be used. To be used, pageUnavailable_handling must be set and devIPMask must not match the current visitor's IP address.

Returns
bool TRUE/FALSE whether the pageUnavailable_handler should be used.

Definition at line 1983 of file TypoScriptFrontendController.php.

References $GLOBALS, GeneralUtility\cmpIP(), and GeneralUtility\getIndpEnv().

Referenced by TypoScriptFrontendController\connectToDB(), TypoScriptFrontendController\fetch_the_id(), TypoScriptFrontendController\getConfigArray(), and TypoScriptFrontendController\getPageAndRootline().

checkRootlineForIncludeSection ( )
checkTranslatedShortcut ( )
protected

Checks whether a translated shortcut page has a different shortcut target than the original language page. If that is the case, things get corrected to follow that alternative shortcut

Returns
void

Definition at line 2799 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\fetch_the_id(), and TypoScriptFrontendController\getPageShortcut().

Referenced by TypoScriptFrontendController\settingLanguage().

clear_preview ( )

Clears the preview-flags, sets sim_exec_time to current time. Hidden pages must be hidden as default, $GLOBALS['SIM_EXEC_TIME'] is set to $GLOBALS['EXEC_TIME'] in bootstrap initializeGlobalTimeVariables(). Alter it by adding or subtracting seconds.

Returns
void

Definition at line 1127 of file TypoScriptFrontendController.php.

References $GLOBALS.

Referenced by TypoScriptFrontendController\determineId().

clearPageCacheContent ( )

Clears cache content (for $this->newHash)

Returns
void

Definition at line 3152 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\generatePage_postProcessing(), and TypoScriptFrontendController\reqCHash().

clearPageCacheContent_pidList (   $pidList)

Clears cache content for a list of page ids

Parameters
string$pidListA list of INTEGER numbers which points to page uids for which to clear entries in the cache_pages cache (page content cache)
Returns
void

Definition at line 3163 of file TypoScriptFrontendController.php.

References GeneralUtility\trimExplode().

connectToDB ( )

Connect to SQL database. May exit after outputting an error message or some JavaScript redirecting to the install tool.

Exceptions
RuntimeException
ServiceUnavailableException
Returns
void

Definition at line 914 of file TypoScriptFrontendController.php.

References $GLOBALS, GeneralUtility\callUserFunction(), TypoScriptFrontendController\checkPageUnavailableHandler(), GeneralUtility\makeInstance(), TypoScriptFrontendController\pageUnavailableAndExit(), and GeneralUtility\SYSLOG_SEVERITY_ERROR.

contentStrReplace ( )

Substitute various tokens in content. This should happen only if the content is not cached by proxies or client browsers.

Returns
void

Definition at line 3649 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$getMethodUrlIdToken, $GLOBALS, and GeneralUtility\callUserFunction().

Referenced by TypoScriptFrontendController\processOutput().

createHashBase (   $createLockHashBase = false)
protected

Calculates the cache-hash (or the lock-hash) This hash is unique to the template, the variables ->id, ->type, ->gr_list (list of groups), ->MP (Mount Points) and cHash array Used to get and later store the cached data.

Parameters
bool$createLockHashBaseWhether to create the lock hash, which doesn't contain the "this->all" (the template information)
Returns
string the serialized hash base

Definition at line 2494 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$all, TypoScriptFrontendController\$cHash_array, TypoScriptFrontendController\$domainStartPage, $GLOBALS, TypoScriptFrontendController\$MP, TypoScriptFrontendController\$type, and GeneralUtility\callUserFunction().

Referenced by TypoScriptFrontendController\getHash(), and TypoScriptFrontendController\getLockHash().

determineIdIsHiddenPage ( )
protected

Checks if the page is hidden in the active workspace. If it is hidden, preview flags will be set.

Returns
bool

Definition at line 1350 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\$page, MathUtility\canBeInterpretedAsInteger(), GeneralUtility\makeInstance(), and TypoScriptFrontendController\whichWorkspace().

Referenced by TypoScriptFrontendController\determineId().

domainNameMatchesCurrentRequest (   $domainName)

Whether the given domain name (potentially including a path segment) matches currently requested host or the host including the path segment

Parameters
string$domainName
Returns
bool

Definition at line 4656 of file TypoScriptFrontendController.php.

References GeneralUtility\getIndpEnv().

doWorkspacePreview ( )

Returns TRUE if workspace preview is enabled

Returns
bool Returns TRUE if workspace preview is enabled

Definition at line 3978 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\determineId(), TypoScriptFrontendController\processOutput(), TypoScriptFrontendController\sendCacheHeaders(), and TypoScriptFrontendController\whichWorkspace().

encryptCharcode (   $n,
  $start,
  $end,
  $offset 
)

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

Parameters
int$nOrdinal of input character
int$startStart of range
int$endEnd of range
int$offsetOffset
Returns
string encoded/decoded version of character

Definition at line 3803 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\encryptEmail().

encryptEmail (   $string,
  $back = false 
)

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

Parameters
string$stringInput string to en/decode: "blabl.nosp@m.a@bl.nosp@m.a.com
bool$backIf set, the process is reversed, effectively decoding, not encoding.
Returns
string encoded/decoded version of $string

Definition at line 3821 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\encryptCharcode().

findDomainRecord (   $recursive = false)

Looking up a domain record based on HTTP_HOST

Parameters
bool$recursiveIf set, it looks "recursively" meaning that a domain like "123.456.typo3.com" would find a domain record like "typo3.com" if "123.456.typo3.com" or "456.typo3.com" did not exist.
Returns
int Returns the page id of the page where the domain record was found. private

Definition at line 1930 of file TypoScriptFrontendController.php.

References GeneralUtility\getIndpEnv().

Referenced by TypoScriptFrontendController\fetch_the_id().

generatePage_postProcessing ( )

Does some processing AFTER the pagegen script is included. This includes caching the page, indexing the page (if configured) and setting sysLastChanged

Returns
void

Definition at line 3273 of file TypoScriptFrontendController.php.

References $GLOBALS, GeneralUtility\callUserFunction(), TypoScriptFrontendController\clearPageCacheContent(), GeneralUtility\getUserObj(), TypoScriptFrontendController\realPageCacheContent(), TypoScriptFrontendController\set_no_cache(), and TypoScriptFrontendController\setSysLastChanged().

generatePage_preProcessing ( )
generatePage_whichScript ( )

Determines to include custom or pagegen.php script returns script-filename if a TypoScript (config) script is defined and should be included instead of pagegen.php

Returns
string|NULL The relative filepath of "config.pageGenScript" if found and allowed

Definition at line 3259 of file TypoScriptFrontendController.php.

References $GLOBALS.

getBackendUser ( )
protected
getCurrentPageCacheConfiguration ( )
protected

Obtains a list of table/pid pairs to consider for page caching.

TS configuration looks like this:

The cache lifetime of all pages takes starttime and endtime of news records of page 14 into account: config.cache.all = tt_news:14

The cache lifetime of page 42 takes starttime and endtime of news records of page 15 and addresses of page 16 into account: config.cache.42 = tt_news:15,tt_address:16

Returns
array Array of 'tablename:pid' pairs. There is at least a current page id in the array
See also
TypoScriptFrontendController::calculatePageCacheTimeout()

Definition at line 4502 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$id, and GeneralUtility\trimExplode().

Referenced by TypoScriptFrontendController\calculatePageCacheTimeout().

getDocumentTemplate ( )
protected

Returns an instance of DocumentTemplate

Returns

Definition at line 4812 of file TypoScriptFrontendController.php.

References $GLOBALS.

getDomainDataForPid (   $targetPid)

Obtains domain data for the target pid. Domain data is an array with 'pid', 'domainName' and 'forced' members (see sys_domain table for meaning of these fields.

Parameters
int$targetPidTarget page id
Returns
mixed Return domain data or NULL

Definition at line 4671 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\getDomainNameForPid().

getDomainNameForPid (   $targetPid)

Obtains the domain name for the target pid. If there are several domains, the first is returned.

Parameters
int$targetPidTarget page id
Returns
mixed Return domain name or NULL if not found

Definition at line 4701 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\getDomainDataForPid().

getFirstTimeValueForRecord (   $tableDef,
  $now 
)
protected

Find the minimum starttime or endtime value in the table and pid that is greater than the current time.

Parameters
string$tableDefTable definition (format tablename:pid)
int$now"Now" time value
Exceptions
InvalidArgumentException
Returns
int Value of the next start/stop time or PHP_INT_MAX if not found
See also
TypoScriptFrontendController::calculatePageCacheTimeout()

Definition at line 4523 of file TypoScriptFrontendController.php.

References GeneralUtility\trimExplode().

Referenced by TypoScriptFrontendController\calculatePageCacheTimeout().

getFromCache_queryRow ( )

Returning the cached version of page with hash = newHash

Returns
array Cached row, if any. Otherwise void.

Definition at line 2423 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\getTimeTracker().

Referenced by TypoScriptFrontendController\getFromCache(), and TypoScriptFrontendController\tempPageCacheContent().

getHash ( )

Calculates the cache-hash This hash is unique to the template, the variables ->id, ->type, ->gr_list (list of groups), ->MP (Mount Points) and cHash array Used to get and later store the cached data.

Returns
string MD5 hash of serialized hash base from createHashBase() private
See also
getFromCache(), getLockHash()

Definition at line 2465 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\createHashBase().

Referenced by TypoScriptFrontendController\generatePage_preProcessing(), and TypoScriptFrontendController\getFromCache().

getLLL (   $index,
  $LOCAL_LANG 
)

Returns 'locallang' label - may need initializing by initLLvars

Parameters
string$indexLocal_lang key for which to return label (language is determined by $this->lang)
array$LOCAL_LANGThe locallang array in which to search
Returns
string Label value of $index key.

Definition at line 4364 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$lang.

Referenced by TypoScriptFrontendController\sL().

getLockHash ( )

Calculates the lock-hash This hash is unique to the above hash, except that it doesn't contain the template information in $this->all.

Returns
string MD5 hash private
See also
getFromCache(), getHash()

Definition at line 2478 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\createHashBase().

Referenced by TypoScriptFrontendController\getFromCache().

getPageAccessFailureReasons ( )

Analysing $this->pageAccessFailureHistory into a summary array telling which features disabled display and on which pages and conditions. That data can be used inside a page-not-found handler

Returns
array Summary of why page access was not allowed.

Definition at line 1848 of file TypoScriptFrontendController.php.

References $GLOBALS, and TypoScriptFrontendController\checkPageGroupAccess().

Referenced by TypoScriptFrontendController\pageErrorHandler().

getPageAndRootline ( )

Gets the page and rootline arrays based on the id, $this->id

If the id does not correspond to a proper page, the 'previous' valid page in the rootline is found If the page is a shortcut (doktype=4), the ->id is loaded with that id

Whether or not the ->id is changed to the shortcut id or the previous id in rootline (eg if a page is hidden), the ->page-array and ->rootline is found and must also be valid.

Sets or manipulates internal variables such as: $this->id, $this->page, $this->rootLine, $this->MP, $this->pageNotFound

Exceptions
ServiceUnavailableException
PageNotFoundException
Returns
void private

Definition at line 1510 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\$page, TypoScriptFrontendController\checkPageUnavailableHandler(), TypoScriptFrontendController\checkRootlineForIncludeSection(), PageRepository\DOKTYPE_MOUNTPOINT, PageRepository\DOKTYPE_SHORTCUT, PageRepository\DOKTYPE_SPACER, TypoScriptFrontendController\getPageShortcut(), TypoScriptFrontendController\pageNotFoundAndExit(), TypoScriptFrontendController\pageUnavailableAndExit(), GeneralUtility\SYSLOG_SEVERITY_ERROR, and TypoScriptFrontendController\whichWorkspace().

Referenced by TypoScriptFrontendController\getPageAndRootlineWithDomain().

getPageAndRootlineWithDomain (   $domainStartPage)

Gets ->page and ->rootline information based on ->id. ->id may change during this operation. If not inside domain, then default to first page in domain.

Parameters
int$domainStartPagePage uid of the page where the found domain record is (pid of the domain record)
Returns
void private

Definition at line 1883 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$domainStartPage, and TypoScriptFrontendController\getPageAndRootline().

Referenced by TypoScriptFrontendController\fetch_the_id().

getPageShortcut (   $SC,
  $mode,
  $thisUid,
  $itera = 20,
  $pageLog = [],
  $disableGroupCheck = false 
)

Get page shortcut; Finds the records pointed to by input value $SC (the shortcut value)

Parameters
int$SCThe value of the "shortcut" field from the pages record
int$modeThe shortcut mode: 1 will select first subpage, 2 a random subpage, 3 the parent page; default is the page pointed to by $SC
int$thisUidThe current page UID of the page which is a shortcut
int$iteraSafety feature which makes sure that the function is calling itself recursively max 20 times (since this function can find shortcuts to other shortcuts to other shortcuts...)
array$pageLogAn array filled with previous page uids tested by the function - new page uids are evaluated against this to avoid going in circles.
bool$disableGroupCheckIf true, the group check is disabled when fetching the target page (needed e.g. for menu generation)
Exceptions
RuntimeException
PageNotFoundException
Returns
mixed Returns the page record of the page that the shortcut pointed to. private
See also
getPageAndRootline()

Definition at line 1635 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$page, PageRepository\DOKTYPE_BE_USER_SECTION, PageRepository\DOKTYPE_SHORTCUT, GeneralUtility\intExplode(), PageRepository\SHORTCUT_MODE_FIRST_SUBPAGE, PageRepository\SHORTCUT_MODE_PARENT_PAGE, PageRepository\SHORTCUT_MODE_RANDOM_SUBPAGE, and GeneralUtility\SYSLOG_SEVERITY_ERROR.

Referenced by TypoScriptFrontendController\checkTranslatedShortcut(), and TypoScriptFrontendController\getPageAndRootline().

getPagesTSconfig ( )

Returns the pages TSconfig array based on the currect ->rootLine

Returns
array

Definition at line 4059 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\$pagesTSconfig, TypoScriptParser\checkIncludeLines_array(), and GeneralUtility\makeInstance().

getRequestedId ( )

Fetches the originally requested id, fallsback to $this->id

Returns
int the originally requested page uid
See also
fetch_the_id()

Definition at line 4713 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$id.

getUniqueId (   $desired = '')

Returns a unique id to be used as a XML ID (in HTML / XHTML mode)

Parameters
string$desiredThe desired id. If already used it is suffixed with a number
Returns
string The unique id

Definition at line 4268 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\uniqueHash().

handleDataSubmission ( )

Handle data submission This is done at this point, because we need the config values

Returns
void

Definition at line 2822 of file TypoScriptFrontendController.php.

References $GLOBALS, and GeneralUtility\getUserObj().

headerNoCache ( )

Detecting if shift-reload has been clicked Will not be called if re-generation of page happens by other reasons (for instance that the page is not in cache yet!) Also, a backend user MUST be logged in for the shift-reload to be detected due to DoS-attack-security reasons.

Returns
bool If shift-reload in client browser has been clicked, disable getting cached page (and regenerate it).

Definition at line 2438 of file TypoScriptFrontendController.php.

References $GLOBALS, and GeneralUtility\callUserFunction().

Referenced by TypoScriptFrontendController\getFromCache(), and TypoScriptFrontendController\tempPageCacheContent().

hook_eofe ( )

End-Of-Frontend hook

Returns
void

Definition at line 3740 of file TypoScriptFrontendController.php.

References $GLOBALS, and GeneralUtility\callUserFunction().

includeLibraries ( array  $libraries)

Includes a comma-separated list of library files by PHP function include_once.

Parameters
array$librariesThe libraries to be included.
Returns
void
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9, use proper class loading instead.

Definition at line 4031 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\getTimeTracker(), and GeneralUtility\logDeprecatedFunction().

initCaches ( )
protected

Initializes the caching system.

Returns
void

Definition at line 982 of file TypoScriptFrontendController.php.

References GeneralUtility\makeInstance().

Referenced by TypoScriptFrontendController\__construct().

initPageRenderer ( )
protected

Initializes the page renderer object

Definition at line 888 of file TypoScriptFrontendController.php.

References GeneralUtility\makeInstance().

Referenced by TypoScriptFrontendController\__construct().

initTemplate ( )

Initialize the TypoScript template parser

Returns
void

Definition at line 2284 of file TypoScriptFrontendController.php.

References GeneralUtility\makeInstance().

initUserGroups ( )

Initializes the front-end user groups. Sets ->loginUser and ->gr_list based on front-end user status.

Returns
void

Definition at line 1052 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$showHiddenRecords, and GeneralUtility\devLog().

Referenced by TypoScriptFrontendController\fetch_the_id().

INTincScript_loadJSCode ( )

Loads the JavaScript code for INTincScript

Returns
void

Definition at line 3449 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$additionalCSS, and TypoScriptFrontendController\$additionalJavaScript.

INTincScript_process (   $INTiS_config)
protected

Processes the INTinclude-scripts and substitue in content.

Parameters
array$INTiS_config$GLOBALS['TSFE']->config['INTincScript'] or part of it
Returns
void
See also
INTincScript()

Definition at line 3401 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\getTimeTracker().

Referenced by TypoScriptFrontendController\recursivelyReplaceIntPlaceholdersInContent().

isBackendUserLoggedIn ( )

Checks if a backend user is logged in

Returns
bool whether a backend user is logged in

Definition at line 1141 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$beUserLogin.

isGeneratePage ( )

Returns TRUE if the page should be generated. That is if no URL handler is active and the cacheContentFlag is not set.

Returns
bool

Definition at line 3012 of file TypoScriptFrontendController.php.

isINTincScript ( )

Determines if there are any INTincScripts to include.

Returns
bool Returns TRUE if scripts are found and no URL handler is active.

Definition at line 3484 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\isStaticCacheble(), and TypoScriptFrontendController\sendCacheHeaders().

isOutputting ( )

Determines if content should be outputted. Outputting content is done only if no URL handler is active and no hook disables the output.

Returns
bool Returns TRUE if no redirect URL is set and no hook disables the output.

Definition at line 3500 of file TypoScriptFrontendController.php.

References $GLOBALS, and GeneralUtility\callUserFunction().

isStaticCacheble ( )

Reporting status whether we can send cache control headers for proxy caching or publishing to static files

Rules are: no_cache cannot be set: If it is, the page might contain dynamic content and should never be cached. There can be no USER_INT objects on the page ("isINTincScript()") because they implicitly indicate dynamic content There can be no logged in user because user sessions are based on a cookie and thereby does not offer client caching a chance to know if the user is logged in. Actually, there will be a reverse problem here; If a page will somehow change when a user is logged in he may not see it correctly if the non-login version sent a cache-header! So do NOT use cache headers in page sections where user logins change the page content. (unless using such as realurl to apply a prefix in case of login sections)

Returns
bool

Definition at line 3638 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\isINTincScript(), and TypoScriptFrontendController\isUserOrGroupSet().

Referenced by TypoScriptFrontendController\sendCacheHeaders().

isUserOrGroupSet ( )

Checking if a user is logged in or a group constellation different from "0,-1"

Returns
bool TRUE if either a login user is found (array fe_user->user) OR if the gr_list is set to something else than '0,-1' (could be done even without a user being logged in!)

Definition at line 1094 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\determineId(), and TypoScriptFrontendController\isStaticCacheble().

logDeprecatedTyposcript (   $typoScriptProperty,
  $explanation = '' 
)

Logs access to deprecated TypoScript objects and properties.

Dumps message to the TypoScript message log (admin panel) and the TYPO3 deprecation log.

Parameters
string$typoScriptPropertyDeprecated object or property
string$explanationMessage or additional information
Returns
void

Definition at line 3940 of file TypoScriptFrontendController.php.

References GeneralUtility\deprecationLog(), and TypoScriptFrontendController\getTimeTracker().

Referenced by TypoScriptFrontendController\getConfigArray().

makeCacheHash ( )

Calculates a hash string based on additional parameters in the url.

Calculated hash is stored in $this->cHash_array. This is used to cache pages with more parameters than just id and type.

Returns
void
See also
reqCHash()

Definition at line 2229 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\$id, GeneralUtility\_GET(), TypoScriptFrontendController\disableCache(), TypoScriptFrontendController\getTimeTracker(), GeneralUtility\implodeArrayForUrl(), TypoScriptFrontendController\pageNotFoundAndExit(), and TypoScriptFrontendController\reqCHash().

mergingWithGetVars (   $GET_VARS)

Merging values into the global $_GET

Parameters
array$GET_VARSArray of key/value pairs that will be merged into the current GET-vars. (Non-escaped values)
Returns
void

Definition at line 2187 of file TypoScriptFrontendController.php.

References $GLOBALS, GeneralUtility\_GET(), GeneralUtility\_GETset(), ArrayUtility\mergeRecursiveWithOverrule(), and TypoScriptFrontendController\set_no_cache().

newCObj ( )

Creates an instance of ContentObjectRenderer in $this->cObj This instance is used to start the rendering of the TypoScript template structure

Returns
void
See also
pagegen.php

Definition at line 3860 of file TypoScriptFrontendController.php.

References GeneralUtility\makeInstance().

pageErrorHandler (   $code,
  $header = '',
  $reason = '' 
)

Generic error page handler. Exits.

Parameters
mixed$codeWhich type of handling; If a true PHP-boolean or TRUE then a is outputted. If integer an error message with that number is shown. Otherwise the $code value is expected to be a "Location:" header value.
string$headerIf set, this is passed directly to the PHP function, header()
string$reasonIf set, error messages will also mention this as the reason for the page-not-found.
Exceptions
RuntimeException
Returns
void (The function exits!)

Definition at line 2035 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$content, GeneralUtility\callUserFunction(), GeneralUtility\getFileAbsFileName(), GeneralUtility\getIndpEnv(), TypoScriptFrontendController\getPageAccessFailureReasons(), GeneralUtility\isFirstPartOfStr(), GeneralUtility\makeInstance(), and HttpUtility\redirect().

Referenced by TypoScriptFrontendController\pageNotFoundHandler(), and TypoScriptFrontendController\pageUnavailableHandler().

pageNotFoundAndExit (   $reason = '',
  $header = '' 
)

Page-not-found handler for use in frontend plugins from extensions.

Parameters
string$reasonReason text
string$headerHTTP header to send
Returns
void Function exits.

Definition at line 1970 of file TypoScriptFrontendController.php.

References $GLOBALS, and TypoScriptFrontendController\pageNotFoundHandler().

Referenced by TypoScriptFrontendController\fetch_the_id(), TypoScriptFrontendController\getPageAndRootline(), TypoScriptFrontendController\makeCacheHash(), TypoScriptFrontendController\reqCHash(), and TypoScriptFrontendController\settingLanguage().

pageNotFoundHandler (   $code,
  $header = '',
  $reason = '' 
)

Page not found handler. Acts a wrapper for the pageErrorHandler method.

Parameters
mixed$codeWhich type of handling; If a true PHP-boolean or TRUE then a is outputted. If integer an error message with that number is shown. Otherwise the $code value is expected to be a "Location:" header value.
string$headerIf set, this is passed directly to the PHP function, header()
string$reasonIf set, error messages will also mention this as the reason for the page-not-found.
Returns
void (The function exits!)

Definition at line 2020 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\pageErrorHandler().

Referenced by TypoScriptFrontendController\pageNotFoundAndExit().

pageUnavailableAndExit (   $reason = '',
  $header = '' 
)

Page unavailable handler for use in frontend plugins from extensions.

Parameters
string$reasonReason text
string$headerHTTP header to send
Returns
void Function exits.

Definition at line 1956 of file TypoScriptFrontendController.php.

References $GLOBALS, and TypoScriptFrontendController\pageUnavailableHandler().

Referenced by TypoScriptFrontendController\connectToDB(), TypoScriptFrontendController\fetch_the_id(), TypoScriptFrontendController\getConfigArray(), and TypoScriptFrontendController\getPageAndRootline().

pageUnavailableHandler (   $code,
  $header,
  $reason 
)

Page unavailable handler. Acts a wrapper for the pageErrorHandler method.

Parameters
mixed$codeWhich type of handling; If a true PHP-boolean or TRUE then a is outputted. If integer an error message with that number is shown. Otherwise the $code value is expected to be a "Location:" header value.
string$headerIf set, this is passed directly to the PHP function, header()
string$reasonIf set, error messages will also mention this as the reason for the page-not-found.
Returns
void (The function exits!)

Definition at line 2007 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\pageErrorHandler().

Referenced by TypoScriptFrontendController\pageUnavailableAndExit().

previewInfo ( )

Outputs preview info.

Returns
void

Definition at line 3721 of file TypoScriptFrontendController.php.

References $GLOBALS, and GeneralUtility\callUserFunction().

processOutput ( )

Process the output before it's actually outputted. Sends headers also.

This includes substituting the "username" comment, sending additional headers (as defined in the TypoScript "config.additionalheaders" object), XHTML cleaning content (if configured) Works on $this->content.

Returns
void

Definition at line 3523 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\addTempContentHttpHeaders(), GeneralUtility\callUserFunction(), TypoScriptFrontendController\contentStrReplace(), TypoScriptFrontendController\doWorkspacePreview(), and TypoScriptFrontendController\sendCacheHeaders().

realPageCacheContent ( )
recursivelyReplaceIntPlaceholdersInContent ( )
protected

Replaces INT placeholders (COA_INT and USER_INT) in $this->content In case the replacement adds additional placeholders, it loops until no new placeholders are found any more.

Definition at line 3383 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\INTincScript_process().

redirectToExternalUrl ( )

Loops over all registered URL handlers and lets them process the current URL.

If no handler has stopped the current process (e.g. by redirecting) and a the redirectUrl propert is not empty, the user will be redirected to this URL.

Definition at line 2876 of file TypoScriptFrontendController.php.

regeneratePageTitle ( )
protected

Generate the page title again as TSFE->altPageTitle might have been modified by an inc script

Returns
void

Definition at line 3326 of file TypoScriptFrontendController.php.

releaseLock (   $type)
protected

Release a page specific lock

Parameters
string$type
Exceptions
InvalidArgumentException
RuntimeException
TYPO3

Definition at line 4773 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$type.

Referenced by TypoScriptFrontendController\generatePage_preProcessing(), TypoScriptFrontendController\getFromCache(), and TypoScriptFrontendController\releaseLocks().

releaseLocks ( )

Release pending locks

Definition at line 3202 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\releaseLock().

reqCHash ( )

Will disable caching if the cHash value was not set. This function should be called to check the existence of "&cHash" whenever a plugin generating cacheable output is using extra GET variables. If there is a cHash value the validation of it automatically takes place in makeCacheHash() (see above)

Returns
void
See also
makeCacheHash(), ::pi_cHashCheck()

Definition at line 2264 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\clearPageCacheContent(), TypoScriptFrontendController\disableCache(), TypoScriptFrontendController\getTimeTracker(), and TypoScriptFrontendController\pageNotFoundAndExit().

Referenced by TypoScriptFrontendController\makeCacheHash().

sendCacheHeaders ( )

Send cache headers good for client/reverse proxy caching This function should not be called if the page content is temporary (like for "Page is being generated..." message, but in that case it is ok because the config-variables are not yet available and so will not allow to send cache headers)

Returns
void -author Ole Tange, Forbrugernes Hus, Denmark

Definition at line 3586 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\doWorkspacePreview(), TypoScriptFrontendController\getTimeTracker(), TypoScriptFrontendController\isINTincScript(), and TypoScriptFrontendController\isStaticCacheble().

Referenced by TypoScriptFrontendController\processOutput().

sendRedirect ( )

Looks up the value of $this->RDCT in the database and if it is found to be associated with a redirect URL then the redirection is carried out with a 'Location:' header May exit after sending a location-header.

Returns
void

Definition at line 946 of file TypoScriptFrontendController.php.

References GeneralUtility\makeInstance(), and TypoScriptFrontendController\updateMD5paramsRecord().

set_cache_timeout_default (   $seconds)

Sets the cache-timeout in seconds

Parameters
int$secondsCache-timeout in seconds
Returns
void

Definition at line 4210 of file TypoScriptFrontendController.php.

set_no_cache (   $reason = '',
  $internal = false 
)

Sets the cache-flag to 1. Could be called from user-included php-files in order to ensure that a page is not cached.

Parameters
string$reasonAn optional reason to be written to the syslog.
bool$internalWhether the call is done from core itself (should only be used by core).
Returns
void

Definition at line 4159 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\disableCache(), TypoScriptFrontendController\getTimeTracker(), GeneralUtility\SYSLOG_SEVERITY_NOTICE, and GeneralUtility\SYSLOG_SEVERITY_WARNING.

Referenced by TypoScriptFrontendController\fetch_the_id(), TypoScriptFrontendController\generatePage_postProcessing(), TypoScriptFrontendController\getConfigArray(), TypoScriptFrontendController\mergingWithGetVars(), and TypoScriptFrontendController\tempPageCacheContent().

setContentType (   $contentType)
Parameters
string$contentType

Definition at line 901 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$contentType.

setCSS (   $key,
  $content 
)

Sets CSS data in the additionalCSS array

Parameters
string$keyIs the key in the array, for num-key let the value be empty
string$contentIs the content if you want any
Returns
void
See also
setJS()

Definition at line 4133 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$content.

setJS (   $key,
  $content = '' 
)

Sets JavaScript code in the additionalJavaScript array

Parameters
string$keyis the key in the array, for num-key let the value be empty. Note reserved keys 'openPic' and 'mouseOver'
string$contentis the content if you want any
Returns
void
See also
::writeMenu(), ContentObjectRenderer::imageLinkWrap()

Definition at line 4095 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$content.

setPageCacheContent (   $content,
  $data,
  $expirationTstamp 
)

Sets cache content; Inserts the content string into the cache_pages cache.

Parameters
string$contentThe content to store in the HTML field of the cache table
mixed$dataThe additional cache_data array, fx. $this->config
int$expirationTstampExpiration timestamp
Returns
void
See also
realPageCacheContent(), tempPageCacheContent()

Definition at line 3117 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$altPageTitle, TypoScriptFrontendController\$content, $GLOBALS, TypoScriptFrontendController\$id, TypoScriptFrontendController\$indexedDocTitle, TypoScriptFrontendController\$newHash, TypoScriptFrontendController\$tempContent, and GeneralUtility\trimExplode().

Referenced by TypoScriptFrontendController\realPageCacheContent(), and TypoScriptFrontendController\tempPageCacheContent().

setParseTime ( )

Sets the parsetime of the page.

Returns
void private

Definition at line 3705 of file TypoScriptFrontendController.php.

References $GLOBALS, and TypoScriptFrontendController\getTimeTracker().

setSysLastChanged ( )

Sets sys last changed Setting the SYS_LASTCHANGED value in the pagerecord: This value will thus be set to the highest tstamp of records rendered on the page. This includes all records with no regard to hidden records, userprotection and so on.

Returns
void
See also
ContentObjectRenderer::lastChanged()

Definition at line 3178 of file TypoScriptFrontendController.php.

References GeneralUtility\makeInstance(), and TypoScriptFrontendController\whichWorkspace().

Referenced by TypoScriptFrontendController\generatePage_postProcessing().

setSysPageWhereClause ( )

Sets sys_page where-clause

Returns
void private

Definition at line 1911 of file TypoScriptFrontendController.php.

References GeneralUtility\makeInstance(), and QueryHelper\stripLogicalOperatorPrefix().

Referenced by TypoScriptFrontendController\fetch_the_id().

settingLanguage ( )
settingLocale ( )

Setting locale for frontend rendering

Returns
void

Definition at line 2767 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\getTimeTracker(), and GeneralUtility\trimExplode().

setUrlIdToken ( )

Sets the URL_ID_TOKEN in the internal var, $this->getMethodUrlIdToken This feature allows sessions to use a GET-parameter instead of a cookie.

Returns
void private

Definition at line 2894 of file TypoScriptFrontendController.php.

References $GLOBALS.

sL (   $input)

Split Label function for front-end applications.

Parameters
string$inputKey string. Accepts the "LLL:" prefix.
Returns
string Label value, if any.

Definition at line 4294 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\$lang, and TypoScriptFrontendController\getLLL().

storeSessionData ( )

Stores session data for the front end user

Returns
void

Definition at line 3694 of file TypoScriptFrontendController.php.

tempPageCacheContent ( )

Temp cache content The temporary cache will expire after a few seconds (typ. 30) or will be cleared by the rendered page, which will also clear and rewrite the cache.

Returns
void

Definition at line 3023 of file TypoScriptFrontendController.php.

References $GLOBALS, TypoScriptFrontendController\getFromCache_queryRow(), GeneralUtility\getIndpEnv(), TypoScriptFrontendController\headerNoCache(), TypoScriptFrontendController\set_no_cache(), and TypoScriptFrontendController\setPageCacheContent().

Referenced by TypoScriptFrontendController\generatePage_preProcessing().

uniqueHash (   $str = '')

Returns a unique md5 hash. There is no special magic in this, the only point is that you don't have to call md5(uniqid()) which is slow and by this you are sure to get a unique string each time in a little faster way.

Parameters
string$strSome string to include in what is hashed. Not significant at all.
Returns
string MD5 hash of ->uniqueString, input string and uniqueCounter

Definition at line 4147 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\getUniqueId().

updateMD5paramsRecord (   $hash)

Updates the tstamp field of a cache_md5params record to the current time.

Parameters
string$hashThe hash string identifying the cache_md5params record for which to update the "tstamp" field to the current time.
Returns
void private

Definition at line 3954 of file TypoScriptFrontendController.php.

References $GLOBALS, and GeneralUtility\makeInstance().

Referenced by TypoScriptFrontendController\sendRedirect().

updateRootLinesWithTranslations ( )
protected

Updating content of the two rootLines IF the language key is set!

Definition at line 2754 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\settingLanguage().

whichWorkspace (   $returnTitle = false)

Returns the name of the workspace

Parameters
bool$returnTitleIf set, returns title of current workspace being previewed
Returns
string|int|NULL If $returnTitle is set, returns string (title), otherwise workspace integer for which workspace is being preview. NULL if none.

Definition at line 3989 of file TypoScriptFrontendController.php.

References TypoScriptFrontendController\doWorkspacePreview(), TypoScriptFrontendController\getBackendUser(), ExtensionManagementUtility\isLoaded(), and GeneralUtility\makeInstance().

Referenced by TypoScriptFrontendController\determineId(), TypoScriptFrontendController\determineIdIsHiddenPage(), TypoScriptFrontendController\fetch_the_id(), TypoScriptFrontendController\getPageAndRootline(), and TypoScriptFrontendController\setSysLastChanged().

Member Data Documentation

$absRefPrefix = ''

Definition at line 487 of file TypoScriptFrontendController.php.

$accessKey = []

Definition at line 637 of file TypoScriptFrontendController.php.

$activeUrlHandlers = []
protected

Definition at line 150 of file TypoScriptFrontendController.php.

$additionalCSS = []
$additionalFooterData = []

Definition at line 413 of file TypoScriptFrontendController.php.

$additionalHeaderData = []

Definition at line 407 of file TypoScriptFrontendController.php.

$additionalJavaScript = []
$ADMCMD_preview_BEUSER_uid = 0

Definition at line 247 of file TypoScriptFrontendController.php.

$all = []
$altPageTitle = ''
$applicationData = []

Definition at line 595 of file TypoScriptFrontendController.php.

$ATagParams = ''

Definition at line 505 of file TypoScriptFrontendController.php.

$baseUrl = ''

Definition at line 683 of file TypoScriptFrontendController.php.

$beUserLogin = false
$cacheContentFlag = false

Definition at line 305 of file TypoScriptFrontendController.php.

$cacheExpires = 0

Definition at line 311 of file TypoScriptFrontendController.php.

$cacheHash
protected

Definition at line 793 of file TypoScriptFrontendController.php.

$cacheTimeOutDefault = false

Definition at line 298 of file TypoScriptFrontendController.php.

$cHash = ''
$cHash_array = []
$cObj = ''

Definition at line 696 of file TypoScriptFrontendController.php.

$cObjectDepthCounter = 50

Definition at line 614 of file TypoScriptFrontendController.php.

$compensateFieldWidth = ''

Definition at line 493 of file TypoScriptFrontendController.php.

$config = ''

Definition at line 284 of file TypoScriptFrontendController.php.

$contentPid = 0

Definition at line 114 of file TypoScriptFrontendController.php.

$contentType = 'text/html'
protected

Content type HTTP header being sent in the request.

Todo:
Ticket: #63642 Should be refactored to a request/response model later

Definition at line 809 of file TypoScriptFrontendController.php.

Referenced by TypoScriptFrontendController\setContentType().

$csConvObj

Definition at line 716 of file TypoScriptFrontendController.php.

$currentRecord = ''

Definition at line 630 of file TypoScriptFrontendController.php.

$debug = false

Definition at line 450 of file TypoScriptFrontendController.php.

$defaultCharSet = 'utf-8'

Definition at line 723 of file TypoScriptFrontendController.php.

$displayEditIcons = ''

Definition at line 543 of file TypoScriptFrontendController.php.

$displayFieldEditIcons = ''

Definition at line 551 of file TypoScriptFrontendController.php.

$divSection = ''

Definition at line 444 of file TypoScriptFrontendController.php.

$domainDataCache = []
protected

Definition at line 800 of file TypoScriptFrontendController.php.

$dtdAllowsFrames

Definition at line 835 of file TypoScriptFrontendController.php.

$excludeCHashVars = ''

Definition at line 536 of file TypoScriptFrontendController.php.

$extTarget = ''

Definition at line 462 of file TypoScriptFrontendController.php.

$fe_user = ''

Definition at line 201 of file TypoScriptFrontendController.php.

$fePreview = 0

Definition at line 256 of file TypoScriptFrontendController.php.

$fileTarget = ''

Definition at line 468 of file TypoScriptFrontendController.php.

$forceTemplateParsing = false
$getMethodUrlIdToken = ''
$gr_list = ''
$imagesOnPage = []

Definition at line 644 of file TypoScriptFrontendController.php.

$indexedDocTitle = ''
$inlineJS

Definition at line 438 of file TypoScriptFrontendController.php.

$intTarget = ''

Definition at line 456 of file TypoScriptFrontendController.php.

$isClientCachable = false

Definition at line 317 of file TypoScriptFrontendController.php.

$JSCode

Definition at line 433 of file TypoScriptFrontendController.php.

$languageDependencies = []
protected

Definition at line 763 of file TypoScriptFrontendController.php.

$lastImageInfo = []

Definition at line 651 of file TypoScriptFrontendController.php.

$linkVars = ''
$LL_files_cache = []

Definition at line 754 of file TypoScriptFrontendController.php.

$LL_labels_cache = []

Definition at line 749 of file TypoScriptFrontendController.php.

$lockFilePath = ''

Definition at line 499 of file TypoScriptFrontendController.php.

$locks = []
protected

Definition at line 768 of file TypoScriptFrontendController.php.

$loginAllowedInBranch = true

Definition at line 235 of file TypoScriptFrontendController.php.

$loginAllowedInBranch_mode = ''

Definition at line 241 of file TypoScriptFrontendController.php.

$loginUser = false

Definition at line 209 of file TypoScriptFrontendController.php.

$metaCharset = 'utf-8'

Definition at line 738 of file TypoScriptFrontendController.php.

$MP_defaults = []

Definition at line 475 of file TypoScriptFrontendController.php.

$newHash = ''
$no_cacheBeforePageGen = false

Definition at line 363 of file TypoScriptFrontendController.php.

$originalMountPointPage = null
protected

Definition at line 123 of file TypoScriptFrontendController.php.

$originalShortcutPage = null
protected

Definition at line 133 of file TypoScriptFrontendController.php.

$page_cache_reg1 = 0

Definition at line 186 of file TypoScriptFrontendController.php.

$pageAccessFailureHistory = []

Definition at line 168 of file TypoScriptFrontendController.php.

$pageCache
protected

Definition at line 781 of file TypoScriptFrontendController.php.

$pageCacheTags = []
protected

Definition at line 786 of file TypoScriptFrontendController.php.

$pageNotFound = 0

Definition at line 156 of file TypoScriptFrontendController.php.

$pageRenderer = null
protected

Definition at line 773 of file TypoScriptFrontendController.php.

$pagesTSconfig = ''
$pSetup = ''

Definition at line 338 of file TypoScriptFrontendController.php.

$RDCT = ''
$recordRegister = []

Definition at line 621 of file TypoScriptFrontendController.php.

$register = []

Definition at line 600 of file TypoScriptFrontendController.php.

$registerStack = []

Definition at line 607 of file TypoScriptFrontendController.php.

$renderCharset = 'utf-8'

Definition at line 730 of file TypoScriptFrontendController.php.

$requestedId
protected

Definition at line 830 of file TypoScriptFrontendController.php.

$rootLine = ''

Definition at line 101 of file TypoScriptFrontendController.php.

$scriptParseTime = 0

Definition at line 707 of file TypoScriptFrontendController.php.

$showHiddenPage = false

Definition at line 263 of file TypoScriptFrontendController.php.

$showHiddenRecords = false
$simUserGroup = 0
$siteScript = ''

Definition at line 194 of file TypoScriptFrontendController.php.

$spamProtectEmailAddresses = 0

Definition at line 481 of file TypoScriptFrontendController.php.

$sPre = ''

Definition at line 331 of file TypoScriptFrontendController.php.

$sWordList = ''

Definition at line 520 of file TypoScriptFrontendController.php.

$sWordRegEx = ''

Definition at line 513 of file TypoScriptFrontendController.php.

$sys_language_content = 0
$sys_language_contentOL = 0

Definition at line 581 of file TypoScriptFrontendController.php.

$sys_language_isocode = ''

Definition at line 588 of file TypoScriptFrontendController.php.

$sys_language_mode = ''

Definition at line 566 of file TypoScriptFrontendController.php.

$sys_language_uid = 0
$sys_page = ''

Definition at line 140 of file TypoScriptFrontendController.php.

$tempContent = false
$tmpl = null

Definition at line 291 of file TypoScriptFrontendController.php.

$uniqueCounter = 0

Definition at line 658 of file TypoScriptFrontendController.php.

$uniqueString = ''

Definition at line 663 of file TypoScriptFrontendController.php.

$usedUniqueIds = []
private

Definition at line 689 of file TypoScriptFrontendController.php.

$workspacePreview = 0

Definition at line 229 of file TypoScriptFrontendController.php.

$xhtmlDoctype = ''

Definition at line 818 of file TypoScriptFrontendController.php.

$xhtmlVersion

Definition at line 823 of file TypoScriptFrontendController.php.