PageRenderer implements SingletonInterface
TYPO3 pageRender class This class render the HTML of a webpage, usable for BE and FE
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Constants
- PART_COMPLETE = 0
- PART_FOOTER = 2
- PART_HEADER = 1
Properties
- $applyNonceHint : bool
- $assetCollector : AssetCollector
- $assetRenderer : AssetRenderer
- $assetsCache : FrontendInterface
- $bodyContent : string
- $context : Context
- $cssFiles : array<string, array<string|int, mixed>>
- $cssInline : array<string, array<string|int, mixed>>
- $cssLibs : array<string, array<string|int, mixed>>
- $directiveHashCollection : DirectiveHashCollection
- $docType : DocType
- $endingSlash : string
- Is empty string for HTML and ' /' for XHTML rendering
- $favIcon : string
- $footerData : array<string|int, mixed>
- $headerData : array<string|int, mixed>
- $headTag : string
- $htmlTag : string
- $iconMimeType : string
- $iconRegistry : IconRegistry
- $inlineComments : array<string|int, mixed>
- $inlineLanguageLabelFiles : array<string|int, mixed>
- $inlineLanguageLabels : array<string|int, mixed>
- $inlineSettings : array<string|int, mixed>
- $javaScriptRenderer : JavaScriptRenderer
- $jsFiles : array<string, array<string|int, mixed>>
- $jsInline : array<string, array<string|int, mixed>>
- $jsLibs : array<string|int, mixed>
- $languageServiceFactory : LanguageServiceFactory
- $locale : Locale
- The locale, used for the <html> tag (depending on the DocType) and possible translation files.
- $metaTagRegistry : MetaTagManagerRegistry
- $moveJsFromHeaderToFooter : bool
- $nonce : ConsumableNonce|null
- $relativeCssPathFixer : RelativeCssPathFixer
- $resourceHashCollection : ResourceHashCollection
- $resourcePublisher : SystemResourcePublisherInterface
- $responseFactory : ResponseFactoryInterface
- $shortcutTag : string
- $streamFactory : StreamFactoryInterface
- $systemResourceFactory : SystemResourceFactory
- $templateFile : string
- $templateService : MarkerBasedTemplateService
- $title : string
- $titleTag : string
- $xmlPrologAndDocType : string
Methods
- __construct() : mixed
- addBodyContent() : void
- Adds content to body content
- addCssFile() : void
- Adds CSS file
- addCssInlineBlock() : void
- Adds CSS inline code
- addCssLibrary() : void
- Adds CSS library
- addFooterData() : void
- Adds footer data
- addHeaderData() : void
- Adds header data
- addInlineComment() : void
- Adds inline HTML comment
- addInlineLanguageDomain() : void
- Loads all labels from a language domain and prefixes them with the domain name.
- addInlineLanguageLabel() : void
- Adds Javascript Inline Label. This will occur in TYPO3.lang - object The label can be used in scripts with TYPO3.lang.<key>
- addInlineLanguageLabelArray() : void
- Adds Javascript Inline Label Array. This will occur in TYPO3.lang - object The label can be used in scripts with TYPO3.lang.<key> Array will be merged with existing array.
- addInlineLanguageLabelFile() : void
- Gets labels to be used in JavaScript fetched from a locallang file.
- addInlineSetting() : void
- Adds Javascript Inline Setting. This will occur in TYPO3.settings - object The label can be used in scripts with TYPO3.setting.<key>
- addInlineSettingArray() : void
- Adds Javascript Inline Setting. This will occur in TYPO3.settings - object The label can be used in scripts with TYPO3.setting.<key> Array will be merged with existing array.
- addJsFile() : void
- Adds JS file
- addJsFooterFile() : void
- Adds JS file to footer
- addJsFooterInlineCode() : void
- Adds JS inline code to footer
- addJsFooterLibrary() : void
- Adds JS Library to Footer. JS Library block is rendered on top of the Footer JS files.
- addJsInlineCode() : void
- Adds JS inline code
- addJsLibrary() : void
- Adds JS Library. JS Library block is rendered on top of the JS files.
- disableMoveJsFromHeaderToFooter() : void
- Disables MoveJsFromHeaderToFooter
- enableMoveJsFromHeaderToFooter() : void
- Enables MoveJsFromHeaderToFooter
- getBodyContent() : string
- getDocType() : DocType
- getFavIcon() : string
- getHeadTag() : string
- getHtmlTag() : string
- getIconMimeType() : string
- getInlineLanguageLabelFiles() : array<string|int, mixed>
- getInlineLanguageLabels() : array<string|int, mixed>
- getJavaScriptRenderer() : JavaScriptRenderer
- getLanguage() : string
- getMetaTag() : array<string|int, mixed>
- getMoveJsFromHeaderToFooter() : bool
- getState() : array<string|int, mixed>
- getTemplateFile() : string
- getTitle() : string
- loadJavaScriptModule() : void
- Includes an ES6/ES11 compatible JavaScript module by resolving the specifier to an import-mapped filename.
- removeMetaTag() : void
- render() : string
- Render the page
- renderJavaScriptAndCssForProcessingOfUncachedContentObjects() : string
- Renders the JavaScript and CSS files that have been added during processing of uncached content objects (USER_INT, COA_INT)
- renderPageWithUncachedObjects() : string
- Frontend related rendering of the main page HTML scaffold with placeholders for dynamic sections finished by uncached element ("INT") processing later.
- renderResponse() : ResponseInterface
- setApplyNonceHint() : void
- setBodyContent() : void
- Sets Content for Body
- setDocType() : void
- setFavIcon() : void
- Sets favicon
- setHeadTag() : void
- Sets HTML head tag
- setHtmlTag() : void
- Sets html tag
- setIconMimeType() : void
- Sets icon mime type
- setLanguage() : void
- Sets language
- setMetaTag() : void
- Sets a given meta tag
- setNonce() : void
- setTemplateFile() : void
- Sets template file
- setTitle() : void
- Content of <title> tag in <html><head>
- setXmlPrologAndDocType() : void
- Sets xml prolog and docType
- updateState() : void
- addAjaxUrlsToInlineSettings() : void
- Make URLs to all backend ajax handlers available as inline setting.
- addGlobalCSSUrlsToInlineSettings() : void
- createInlineCssTagFromFile() : string
- Creates a CSS inline tag
- executePostRenderHook() : void
- Execute postRenderHook for possible manipulation
- executePreRenderHook() : void
- Execute PreRenderHook for possible manipulation
- executeRenderPostTransformHook() : void
- PostTransform for possible manipulation of concatenated and compressed files
- getApplicationType() : string
- String 'FE' if in FrontendApplication, 'BE' otherwise (also in CLI without request object)
- getPublicUrlForFile() : string
- This function acts as a wrapper to allow relative and paths starting with EXT: to be dealt with in this very case to always return the "absolute web path" to be included directly before output.
- getTemplate() : string
- Reads the template file and returns the requested part as string
- loadJavaScriptLanguageStrings() : void
- Load the language strings into JavaScript
- parseLanguageLabelsForJavaScript() : array<string|int, mixed>
- Converts the language labels for usage in JavaScript
- prepareRendering() : void
- Remove ending slashes from static header block if the page is being rendered as html (not xhtml) and define property $this->endingSlash for further use
- readLLfile() : array<string|int, mixed>
- Reads a locallang file.
- renderAdditionalJavaScriptLibraries() : array<string|int, string>
- Render JavaScript libraries
- renderCssFiles() : string
- Render CSS files
- renderCssInline() : string
- Render inline CSS
- renderCssLibraries() : string
- Render CSS library files
- renderInlineJavaScript() : array<string|int, string>
- Render inline JavaScript (must not apply `nonce="..."` if defined).
- renderJavaScriptAndCss() : array<string|int, string>
- Renders all JavaScript and CSS
- renderJavaScriptFiles() : array<string|int, string>
- Render JavaScript files
- renderMainJavaScriptLibraries() : string
- Helper function for render the main JavaScript libraries
- renderMetaTagsFromAPI() : array<string|int, mixed>
- Renders metaTags based on tags added via the API
- reset() : void
- Reset all vars to initial values
- setDefaultHtmlTag() : void
- Internal method to set a basic <html> tag when in HTML5 with the proper language/locale and "dir" attributes.
- wrapInlineScript() : string
- wrapInlineStyle() : string
Constants
PART_COMPLETE
protected
mixed
PART_COMPLETE
= 0
PART_FOOTER
protected
mixed
PART_FOOTER
= 2
PART_HEADER
protected
mixed
PART_HEADER
= 1
Properties
$applyNonceHint
protected
bool
$applyNonceHint
= false
$assetCollector read-only
protected
AssetCollector
$assetCollector
$assetRenderer read-only
protected
AssetRenderer
$assetRenderer
$assetsCache read-only
protected
FrontendInterface
$assetsCache
Attributes
- #[Autowire]
- $service: 'cache.assets'
$bodyContent
protected
string
$bodyContent
= ''
$context read-only
protected
Context
$context
$cssFiles
protected
array<string, array<string|int, mixed>>
$cssFiles
= []
$cssInline
protected
array<string, array<string|int, mixed>>
$cssInline
= []
$cssLibs
protected
array<string, array<string|int, mixed>>
$cssLibs
= []
$directiveHashCollection read-only
protected
DirectiveHashCollection
$directiveHashCollection
$docType
protected
DocType
$docType
= \TYPO3\CMS\Core\Type\DocType::html5
$endingSlash
Is empty string for HTML and ' /' for XHTML rendering
protected
string
$endingSlash
= ''
$favIcon
protected
string
$favIcon
= ''
$footerData
protected
array<string|int, mixed>
$footerData
= []
$headerData
protected
array<string|int, mixed>
$headerData
= []
$headTag
protected
string
$headTag
= '<head>'
$htmlTag
protected
string
$htmlTag
= '<html>'
$iconMimeType
protected
string
$iconMimeType
= ''
$iconRegistry read-only
protected
IconRegistry
$iconRegistry
$inlineComments
protected
array<string|int, mixed>
$inlineComments
= []
$inlineLanguageLabelFiles
protected
array<string|int, mixed>
$inlineLanguageLabelFiles
= []
$inlineLanguageLabels
protected
array<string|int, mixed>
$inlineLanguageLabels
= []
$inlineSettings
protected
array<string|int, mixed>
$inlineSettings
= []
$javaScriptRenderer
protected
JavaScriptRenderer
$javaScriptRenderer
$jsFiles
protected
array<string, array<string|int, mixed>>
$jsFiles
= []
$jsInline
protected
array<string, array<string|int, mixed>>
$jsInline
= []
$jsLibs
protected
array<string|int, mixed>
$jsLibs
= []
$languageServiceFactory read-only
protected
LanguageServiceFactory
$languageServiceFactory
$locale
The locale, used for the <html> tag (depending on the DocType) and possible translation files.
protected
Locale
$locale
$metaTagRegistry read-only
protected
MetaTagManagerRegistry
$metaTagRegistry
$moveJsFromHeaderToFooter
protected
bool
$moveJsFromHeaderToFooter
= false
$nonce
protected
ConsumableNonce|null
$nonce
= null
$relativeCssPathFixer read-only
protected
RelativeCssPathFixer
$relativeCssPathFixer
$resourceHashCollection read-only
protected
ResourceHashCollection
$resourceHashCollection
$resourcePublisher read-only
protected
SystemResourcePublisherInterface
$resourcePublisher
$responseFactory read-only
protected
ResponseFactoryInterface
$responseFactory
$shortcutTag
protected
string
$shortcutTag
= '<link rel="icon" href="%1$s"%2$s />'
$streamFactory read-only
protected
StreamFactoryInterface
$streamFactory
$systemResourceFactory read-only
protected
SystemResourceFactory
$systemResourceFactory
$templateFile
protected
string
$templateFile
= 'PKG:typo3/cms-core:Resources/Private/Templates/PageRenderer.html'
$templateService read-only
protected
MarkerBasedTemplateService
$templateService
$title
protected
string
$title
= ''
$titleTag
protected
string
$titleTag
= '<title>|</title>'
$xmlPrologAndDocType
protected
string
$xmlPrologAndDocType
= ''
Methods
__construct()
public
__construct(Context $context, FrontendInterface $assetsCache, MarkerBasedTemplateService $templateService, MetaTagManagerRegistry $metaTagRegistry, AssetRenderer $assetRenderer, AssetCollector $assetCollector, RelativeCssPathFixer $relativeCssPathFixer, LanguageServiceFactory $languageServiceFactory, ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory, IconRegistry $iconRegistry, SystemResourcePublisherInterface $resourcePublisher, SystemResourceFactory $systemResourceFactory, ResourceHashCollection $resourceHashCollection, DirectiveHashCollection $directiveHashCollection) : mixed
Parameters
- $context : Context
- $assetsCache : FrontendInterface
- $templateService : MarkerBasedTemplateService
- $metaTagRegistry : MetaTagManagerRegistry
- $assetRenderer : AssetRenderer
- $assetCollector : AssetCollector
- $relativeCssPathFixer : RelativeCssPathFixer
- $languageServiceFactory : LanguageServiceFactory
- $responseFactory : ResponseFactoryInterface
- $streamFactory : StreamFactoryInterface
- $iconRegistry : IconRegistry
- $resourcePublisher : SystemResourcePublisherInterface
- $systemResourceFactory : SystemResourceFactory
- $resourceHashCollection : ResourceHashCollection
- $directiveHashCollection : DirectiveHashCollection
addBodyContent()
Adds content to body content
public
addBodyContent(string $content) : void
Parameters
- $content : string
addCssFile()
Adds CSS file
public
addCssFile(string|StaticResourceInterface $file[, string $rel = 'stylesheet' ][, string $media = 'all' ][, string $title = '' ][, mixed $_ = null ][, bool $forceOnTop = false ][, string $allWrap = '' ][, mixed $__ = null ][, string $splitChar = '|' ][, bool $inline = false ][, array<string, string> $tagAttributes = [] ][, string $integrity = '' ][, string $crossorigin = '' ]) : void
Parameters
- $file : string|StaticResourceInterface
- $rel : string = 'stylesheet'
- $media : string = 'all'
- $title : string = ''
- $_ : mixed = null
- $forceOnTop : bool = false
- $allWrap : string = ''
- $__ : mixed = null
- $splitChar : string = '|'
-
The char used to split the allWrap value, default is "|"
- $inline : bool = false
- $tagAttributes : array<string, string> = []
-
Key => value list of tag attributes
- $integrity : string = ''
-
Subresource Integrity (SRI)
- $crossorigin : string = ''
-
CORS settings attribute
addCssInlineBlock()
Adds CSS inline code
public
addCssInlineBlock(string $name, string $block[, mixed $_ = null ][, bool $forceOnTop = false ][, bool $csp = false ]) : void
Parameters
- $name : string
- $block : string
- $_ : mixed = null
- $forceOnTop : bool = false
- $csp : bool = false
addCssLibrary()
Adds CSS library
public
addCssLibrary(string|StaticResourceInterface $file[, string $rel = 'stylesheet' ][, string $media = 'all' ][, string $title = '' ][, mixed $_ = null ][, bool $forceOnTop = false ][, string $allWrap = '' ][, mixed $__ = null ][, string $splitChar = '|' ][, bool $inline = false ][, array<string, string> $tagAttributes = [] ][, string $integrity = '' ][, string $crossorigin = '' ]) : void
Parameters
- $file : string|StaticResourceInterface
- $rel : string = 'stylesheet'
- $media : string = 'all'
- $title : string = ''
- $_ : mixed = null
- $forceOnTop : bool = false
- $allWrap : string = ''
- $__ : mixed = null
- $splitChar : string = '|'
-
The char used to split the allWrap value, default is "|"
- $inline : bool = false
- $tagAttributes : array<string, string> = []
-
Key => value list of tag attributes
- $integrity : string = ''
-
Subresource Integrity (SRI)
- $crossorigin : string = ''
-
CORS settings attribute
addFooterData()
Adds footer data
public
addFooterData(string $data) : void
Parameters
- $data : string
-
Free footer data for HTML footer before closing body tag
addHeaderData()
Adds header data
public
addHeaderData(string $data) : void
Parameters
- $data : string
-
Free header data for HTML header
addInlineComment()
Adds inline HTML comment
public
addInlineComment(string $comment) : void
Parameters
- $comment : string
addInlineLanguageDomain()
Loads all labels from a language domain and prefixes them with the domain name.
public
addInlineLanguageDomain(string $domain) : void
since TYPO3 v14, will be removed in TYPO3 v15.
The domain name follows the format "extension.domain" (e.g. 'core.common', 'core.modules.media'). The language file is resolved automatically by the LanguageService, e.g. 'EXT:core/Resources/Private/Language/locallang_common.xlf', 'EXT:core/Resources/Private/Language/Modules/media.xlf'.
Labels are accessible in JavaScript as TYPO3.lang['domain:key'], e.g. TYPO3.lang['core.common:notAvailableAbbreviation'].
Parameters
- $domain : string
-
The domain name in format "extension.domain" (e.g. 'core.common', 'core.modules.media')
addInlineLanguageLabel()
Adds Javascript Inline Label. This will occur in TYPO3.lang - object The label can be used in scripts with TYPO3.lang.<key>
public
addInlineLanguageLabel(string $key, string $value) : void
Parameters
- $key : string
- $value : string
addInlineLanguageLabelArray()
Adds Javascript Inline Label Array. This will occur in TYPO3.lang - object The label can be used in scripts with TYPO3.lang.<key> Array will be merged with existing array.
public
addInlineLanguageLabelArray(array<string|int, mixed> $array) : void
Parameters
- $array : array<string|int, mixed>
addInlineLanguageLabelFile()
Gets labels to be used in JavaScript fetched from a locallang file.
public
addInlineLanguageLabelFile(string $fileRef[, string $selectionPrefix = '' ][, string $stripFromSelectionName = '' ]) : void
Parameters
- $fileRef : string
-
Input is a file-reference (see GeneralUtility::getFileAbsFileName). That file is expected to be a 'locallang.xlf' file containing a valid XML TYPO3 language structure.
- $selectionPrefix : string = ''
-
Prefix to select the correct labels (default: '')
- $stripFromSelectionName : string = ''
-
String to be removed from the label names in the output. (default: '')
addInlineSetting()
Adds Javascript Inline Setting. This will occur in TYPO3.settings - object The label can be used in scripts with TYPO3.setting.<key>
public
addInlineSetting(string|null $namespace, string $key, mixed $value) : void
Parameters
- $namespace : string|null
- $key : string
- $value : mixed
addInlineSettingArray()
Adds Javascript Inline Setting. This will occur in TYPO3.settings - object The label can be used in scripts with TYPO3.setting.<key> Array will be merged with existing array.
public
addInlineSettingArray(string $namespace, array<string|int, mixed> $array) : void
Parameters
- $namespace : string
- $array : array<string|int, mixed>
addJsFile()
Adds JS file
public
addJsFile(string|StaticResourceInterface $file[, string|null $type = '' ][, mixed $_ = null ][, bool $forceOnTop = false ][, string $allWrap = '' ][, mixed $__ = null ][, string $splitChar = '|' ][, bool $async = false ][, string $integrity = '' ][, bool $defer = false ][, string $crossorigin = '' ][, bool $nomodule = false ][, array<string, string> $tagAttributes = [] ]) : void
Parameters
- $file : string|StaticResourceInterface
-
File name
- $type : string|null = ''
-
Content Type
- $_ : mixed = null
- $forceOnTop : bool = false
- $allWrap : string = ''
- $__ : mixed = null
- $splitChar : string = '|'
-
The char used to split the allWrap value, default is "|"
- $async : bool = false
-
Flag if property 'async="async"' should be added to JavaScript tags
- $integrity : string = ''
-
Subresource Integrity (SRI)
- $defer : bool = false
-
Flag if property 'defer="defer"' should be added to JavaScript tags
- $crossorigin : string = ''
-
CORS settings attribute
- $nomodule : bool = false
-
Flag if property 'nomodule="nomodule"' should be added to JavaScript tags
- $tagAttributes : array<string, string> = []
-
Key => value list of tag attributes
addJsFooterFile()
Adds JS file to footer
public
addJsFooterFile(string|StaticResourceInterface $file[, string|null $type = '' ][, mixed $_ = null ][, bool $forceOnTop = false ][, string $allWrap = '' ][, mixed $__ = null ][, string $splitChar = '|' ][, bool $async = false ][, string $integrity = '' ][, bool $defer = false ][, string $crossorigin = '' ][, bool $nomodule = false ][, array<string, string> $tagAttributes = [] ]) : void
Parameters
- $file : string|StaticResourceInterface
-
File name
- $type : string|null = ''
-
Content Type
- $_ : mixed = null
- $forceOnTop : bool = false
- $allWrap : string = ''
- $__ : mixed = null
- $splitChar : string = '|'
-
The char used to split the allWrap value, default is "|"
- $async : bool = false
-
Flag if property 'async="async"' should be added to JavaScript tags
- $integrity : string = ''
-
Subresource Integrity (SRI)
- $defer : bool = false
-
Flag if property 'defer="defer"' should be added to JavaScript tags
- $crossorigin : string = ''
-
CORS settings attribute
- $nomodule : bool = false
-
Flag if property 'nomodule="nomodule"' should be added to JavaScript tags
- $tagAttributes : array<string, string> = []
-
Key => value list of tag attributes
addJsFooterInlineCode()
Adds JS inline code to footer
public
addJsFooterInlineCode(string $name, string $block[, mixed $_ = null ][, bool $forceOnTop = false ][, bool $csp = false ]) : void
Parameters
- $name : string
- $block : string
- $_ : mixed = null
- $forceOnTop : bool = false
- $csp : bool = false
addJsFooterLibrary()
Adds JS Library to Footer. JS Library block is rendered on top of the Footer JS files.
public
addJsFooterLibrary(string $name, string|StaticResourceInterface $file[, string|null $type = '' ][, mixed $_ = null ][, bool $forceOnTop = false ][, string $allWrap = '' ][, mixed $__ = null ][, string $splitChar = '|' ][, bool $async = false ][, string $integrity = '' ][, bool $defer = false ][, string $crossorigin = '' ][, bool $nomodule = false ][, array<string, string> $tagAttributes = [] ]) : void
Parameters
- $name : string
-
Arbitrary identifier
- $file : string|StaticResourceInterface
-
File name
- $type : string|null = ''
-
Content Type
- $_ : mixed = null
- $forceOnTop : bool = false
-
Flag if added library should be inserted at begin of this block
- $allWrap : string = ''
- $__ : mixed = null
- $splitChar : string = '|'
-
The char used to split the allWrap value, default is "|"
- $async : bool = false
-
Flag if property 'async="async"' should be added to JavaScript tags
- $integrity : string = ''
-
Subresource Integrity (SRI)
- $defer : bool = false
-
Flag if property 'defer="defer"' should be added to JavaScript tags
- $crossorigin : string = ''
-
CORS settings attribute
- $nomodule : bool = false
-
Flag if property 'nomodule="nomodule"' should be added to JavaScript tags
- $tagAttributes : array<string, string> = []
-
Key => value list of tag attributes
addJsInlineCode()
Adds JS inline code
public
addJsInlineCode(string $name, string $block[, mixed $_ = null ][, bool $forceOnTop = false ][, bool $csp = false ]) : void
Parameters
- $name : string
- $block : string
- $_ : mixed = null
- $forceOnTop : bool = false
- $csp : bool = false
addJsLibrary()
Adds JS Library. JS Library block is rendered on top of the JS files.
public
addJsLibrary(string $name, string|StaticResourceInterface $file[, string|null $type = '' ][, mixed $_ = null ][, bool $forceOnTop = false ][, string $allWrap = '' ][, mixed $__ = null ][, string $splitChar = '|' ][, bool $async = false ][, string $integrity = '' ][, bool $defer = false ][, string $crossorigin = '' ][, bool $nomodule = false ][, array<string, string> $tagAttributes = [] ]) : void
Parameters
- $name : string
-
Arbitrary identifier
- $file : string|StaticResourceInterface
-
File name
- $type : string|null = ''
-
Content Type
- $_ : mixed = null
- $forceOnTop : bool = false
-
Flag if added library should be inserted at begin of this block
- $allWrap : string = ''
- $__ : mixed = null
- $splitChar : string = '|'
-
The char used to split the allWrap value, default is "|"
- $async : bool = false
-
Flag if property 'async="async"' should be added to JavaScript tags
- $integrity : string = ''
-
Subresource Integrity (SRI)
- $defer : bool = false
-
Flag if property 'defer="defer"' should be added to JavaScript tags
- $crossorigin : string = ''
-
CORS settings attribute
- $nomodule : bool = false
-
Flag if property 'nomodule="nomodule"' should be added to JavaScript tags
- $tagAttributes : array<string, string> = []
-
Key => value list of tag attributes
disableMoveJsFromHeaderToFooter()
Disables MoveJsFromHeaderToFooter
public
disableMoveJsFromHeaderToFooter() : void
enableMoveJsFromHeaderToFooter()
Enables MoveJsFromHeaderToFooter
public
enableMoveJsFromHeaderToFooter() : void
getBodyContent()
public
getBodyContent() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringgetDocType()
public
getDocType() : DocType
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
DocTypegetFavIcon()
public
getFavIcon() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringgetHeadTag()
public
getHeadTag() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringgetHtmlTag()
public
getHtmlTag() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringgetIconMimeType()
public
getIconMimeType() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringgetInlineLanguageLabelFiles()
public
getInlineLanguageLabelFiles() : array<string|int, mixed>
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
array<string|int, mixed>getInlineLanguageLabels()
public
getInlineLanguageLabels() : array<string|int, mixed>
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
array<string|int, mixed>getJavaScriptRenderer()
public
getJavaScriptRenderer() : JavaScriptRenderer
Return values
JavaScriptRenderergetLanguage()
public
getLanguage() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringgetMetaTag()
public
getMetaTag(string $type, string $name) : array<string|int, mixed>
since TYPO3 v14, will be removed in TYPO3 v15.
Parameters
- $type : string
- $name : string
Return values
array<string|int, mixed>getMoveJsFromHeaderToFooter()
public
getMoveJsFromHeaderToFooter() : bool
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
boolgetState()
public
getState() : array<string|int, mixed>
Return values
array<string|int, mixed>getTemplateFile()
public
getTemplateFile() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringgetTitle()
public
getTitle() : string
since TYPO3 v14, will be removed in TYPO3 v15.
Return values
stringloadJavaScriptModule()
Includes an ES6/ES11 compatible JavaScript module by resolving the specifier to an import-mapped filename.
public
loadJavaScriptModule(string $specifier) : void
Parameters
- $specifier : string
-
Bare module identifier like @my/package/filename.js
removeMetaTag()
public
removeMetaTag(string $type, string $name) : void
since TYPO3 v14, will be removed in TYPO3 v15.
Parameters
- $type : string
- $name : string
render()
Render the page
public
render([ServerRequestInterface|null $request = null ]) : string
Parameters
- $request : ServerRequestInterface|null = null
Return values
string —Content of rendered page
renderJavaScriptAndCssForProcessingOfUncachedContentObjects()
Renders the JavaScript and CSS files that have been added during processing of uncached content objects (USER_INT, COA_INT)
public
renderJavaScriptAndCssForProcessingOfUncachedContentObjects(ServerRequestInterface $request, string $cachedPageContent, string $substituteHash) : string
Parameters
- $request : ServerRequestInterface
- $cachedPageContent : string
- $substituteHash : string
-
The hash that is used for the variables
Return values
stringrenderPageWithUncachedObjects()
Frontend related rendering of the main page HTML scaffold with placeholders for dynamic sections finished by uncached element ("INT") processing later.
public
renderPageWithUncachedObjects(string $substituteHash) : string
The result of this method is cached as content in page cache.
Parameters
- $substituteHash : string
-
The hash that is used for the placeholder markers
FE only. Never use in extensions.
Return values
stringrenderResponse()
public
renderResponse([ServerRequestInterface|int $requestOrCode = 200 ][, int|string $codeOrReasonPhrase = '' ][, string $reasonPhrase = '' ]) : ResponseInterface
Parameters
- $requestOrCode : ServerRequestInterface|int = 200
- $codeOrReasonPhrase : int|string = ''
- $reasonPhrase : string = ''
Return values
ResponseInterfacesetApplyNonceHint()
public
setApplyNonceHint(bool $applyNonceHint) : void
Parameters
- $applyNonceHint : bool
setBodyContent()
Sets Content for Body
public
setBodyContent(string $content) : void
Parameters
- $content : string
setDocType()
public
setDocType(DocType $docType[, ServerRequestInterface|null $request = null ]) : void
Parameters
- $docType : DocType
- $request : ServerRequestInterface|null = null
setFavIcon()
Sets favicon
public
setFavIcon(string $favIcon) : void
Parameters
- $favIcon : string
setHeadTag()
Sets HTML head tag
public
setHeadTag(string $headTag) : void
Parameters
- $headTag : string
setHtmlTag()
Sets html tag
public
setHtmlTag(string $htmlTag) : void
Parameters
- $htmlTag : string
setIconMimeType()
Sets icon mime type
public
setIconMimeType(string $iconMimeType) : void
Parameters
- $iconMimeType : string
setLanguage()
Sets language
public
setLanguage(Locale $locale[, ServerRequestInterface|null $request = null ]) : void
Parameters
- $locale : Locale
- $request : ServerRequestInterface|null = null
setMetaTag()
Sets a given meta tag
public
setMetaTag(string $type, string $name, string $content[, array<string|int, mixed> $subProperties = [] ][, bool $replace = true ]) : void
Parameters
- $type : string
-
The type of the meta tag. Allowed values are property, name or http-equiv
- $name : string
-
The name of the property to add
- $content : string
-
The content of the meta tag
- $subProperties : array<string|int, mixed> = []
-
Subproperties of the meta tag (like e.g. og:image:width)
- $replace : bool = true
-
Replace earlier set meta tag
setNonce()
public
setNonce(ConsumableNonce|null $nonce) : void
Parameters
- $nonce : ConsumableNonce|null
setTemplateFile()
Sets template file
public
setTemplateFile(string $file) : void
Parameters
- $file : string
setTitle()
Content of <title> tag in <html><head>
public
setTitle(string $title) : void
Parameters
- $title : string
setXmlPrologAndDocType()
Sets xml prolog and docType
public
setXmlPrologAndDocType(string $xmlPrologAndDocType) : void
Parameters
- $xmlPrologAndDocType : string
-
Complete tags for xml prolog and docType
updateState()
public
updateState(array<string|int, mixed> $state) : void
Parameters
- $state : array<string|int, mixed>
addAjaxUrlsToInlineSettings()
Make URLs to all backend ajax handlers available as inline setting.
protected
addAjaxUrlsToInlineSettings([bool $publicRoutesOnly = false ]) : void
Parameters
- $publicRoutesOnly : bool = false
addGlobalCSSUrlsToInlineSettings()
protected
addGlobalCSSUrlsToInlineSettings(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
createInlineCssTagFromFile()
Creates a CSS inline tag
protected
createInlineCssTagFromFile(string $file, array<string|int, mixed> $properties) : string
Parameters
- $file : string
-
the filename to process
- $properties : array<string|int, mixed>
Return values
stringexecutePostRenderHook()
Execute postRenderHook for possible manipulation
protected
executePostRenderHook(string &$jsLibs, string &$jsFiles, string &$jsFooterFiles, string &$cssLibs, string &$cssFiles, string &$jsInline, string &$cssInline, string &$jsFooterInline, string &$jsFooterLibs) : void
Parameters
- $jsLibs : string
- $jsFiles : string
- $jsFooterFiles : string
- $cssLibs : string
- $cssFiles : string
- $jsInline : string
- $cssInline : string
- $jsFooterInline : string
- $jsFooterLibs : string
executePreRenderHook()
Execute PreRenderHook for possible manipulation
protected
executePreRenderHook() : void
executeRenderPostTransformHook()
PostTransform for possible manipulation of concatenated and compressed files
protected
executeRenderPostTransformHook() : void
getApplicationType()
String 'FE' if in FrontendApplication, 'BE' otherwise (also in CLI without request object)
protected
getApplicationType(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
stringgetPublicUrlForFile()
This function acts as a wrapper to allow relative and paths starting with EXT: to be dealt with in this very case to always return the "absolute web path" to be included directly before output.
protected
getPublicUrlForFile(string $file, ServerRequestInterface $request) : string
This is mainly added so the EXT: syntax can be resolved for PageRenderer in one central place, and hopefully removed in the future by one standard API call.
The file is also prepared as version numbered file and prefixed as absolute webpath
Parameters
- $file : string
-
the filename to process
- $request : ServerRequestInterface
Return values
stringgetTemplate()
Reads the template file and returns the requested part as string
protected
getTemplate() : string
Return values
stringloadJavaScriptLanguageStrings()
Load the language strings into JavaScript
protected
loadJavaScriptLanguageStrings() : void
parseLanguageLabelsForJavaScript()
Converts the language labels for usage in JavaScript
protected
parseLanguageLabelsForJavaScript() : array<string|int, mixed>
Return values
array<string|int, mixed>prepareRendering()
Remove ending slashes from static header block if the page is being rendered as html (not xhtml) and define property $this->endingSlash for further use
protected
prepareRendering() : void
readLLfile()
Reads a locallang file.
protected
readLLfile(string $fileRef) : array<string|int, mixed>
Parameters
- $fileRef : string
-
Reference to a relative filename to include.
Return values
array<string|int, mixed> —Returns the $LOCAL_LANG array found in the file. If no array found, returns empty array.
renderAdditionalJavaScriptLibraries()
Render JavaScript libraries
protected
renderAdditionalJavaScriptLibraries(ServerRequestInterface $request) : array<string|int, string>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, string> —jsLibs and jsFooterLibs strings
renderCssFiles()
Render CSS files
protected
renderCssFiles(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
stringrenderCssInline()
Render inline CSS
protected
renderCssInline() : string
Return values
stringrenderCssLibraries()
Render CSS library files
protected
renderCssLibraries(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
stringrenderInlineJavaScript()
Render inline JavaScript (must not apply `nonce="..."` if defined).
protected
renderInlineJavaScript() : array<string|int, string>
Return values
array<string|int, string> —jsInline and jsFooterInline string
renderJavaScriptAndCss()
Renders all JavaScript and CSS
protected
renderJavaScriptAndCss(ServerRequestInterface $request) : array<string|int, string>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, string>renderJavaScriptFiles()
Render JavaScript files
protected
renderJavaScriptFiles(ServerRequestInterface $request) : array<string|int, string>
Parameters
- $request : ServerRequestInterface
Return values
array<string|int, string> —jsFiles and jsFooterFiles strings
renderMainJavaScriptLibraries()
Helper function for render the main JavaScript libraries
protected
renderMainJavaScriptLibraries(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
string —Content with JavaScript libraries
renderMetaTagsFromAPI()
Renders metaTags based on tags added via the API
protected
renderMetaTagsFromAPI(DocType $docType) : array<string|int, mixed>
Parameters
- $docType : DocType
Return values
array<string|int, mixed>reset()
Reset all vars to initial values
protected
reset(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
setDefaultHtmlTag()
Internal method to set a basic <html> tag when in HTML5 with the proper language/locale and "dir" attributes.
protected
setDefaultHtmlTag(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
wrapInlineScript()
protected
wrapInlineScript(string $content[, array<string|int, mixed> $attributes = [] ]) : string
Parameters
- $content : string
- $attributes : array<string|int, mixed> = []
Return values
stringwrapInlineStyle()
protected
wrapInlineStyle(string $content[, array<string|int, mixed> $attributes = [] ]) : string
Parameters
- $content : string
- $attributes : array<string|int, mixed> = []