PHP Class Contao\FrontendTemplate

Inheritance: extends Template
Show file Open project: contao/core-bundle Class Usage Examples

Protected Properties

Property Type Description
$blnCheckRequest boolean Unsued $_GET check

Public Methods

Method Description
addToUrl ( string $strRequest, boolean $blnIgnoreParams = false, array $arrUnset = [] ) : string Point to Frontend::addToUrl() in front end templates (see #6736)
getCustomSection ( string $strKey ) : string Return a custom layout section
getCustomSections ( string $strKey = null ) : string Return all custom layout sections
getResponse ( boolean $blnCheckRequest = false ) : Response Return a response object
hasAuthenticatedBackendUser ( ) : boolean Check whether there is an authenticated back end user
output ( boolean $blnCheckRequest = false ) Send the response to the client
parse ( ) : string Add a hook to modify the template output
section ( string $key, string $template = null ) Return a custom layout section
sections ( string $key = null, string $template = null ) Return the custom layout sections

Protected Methods

Method Description
addToCache ( ) Add the template output to the cache and add the cache headers
addToSearchIndex ( ) Add the template output to the search index
compile ( ) Compile the template

Private Methods

Method Description
setCacheHeaders ( Response $response ) : Response Set the cache headers according to the page settings.

Method Details

addToCache() protected method

Add the template output to the cache and add the cache headers
Deprecation: Deprecated since Contao 4.3, to be removed in Contao 5.0. Use proper response caching headers instead.
protected addToCache ( )

addToSearchIndex() protected method

Add the template output to the search index
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use the kernel.terminate event instead.
protected addToSearchIndex ( )

addToUrl() public static method

Point to Frontend::addToUrl() in front end templates (see #6736)
public static addToUrl ( string $strRequest, boolean $blnIgnoreParams = false, array $arrUnset = [] ) : string
$strRequest string The request string to be added
$blnIgnoreParams boolean If true, the $_GET parameters will be ignored
$arrUnset array An optional array of keys to unset
return string The new URI string

compile() protected method

Compile the template
protected compile ( )

getCustomSection() public method

Return a custom layout section
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use FrontendTemplate::section() instead.
public getCustomSection ( string $strKey ) : string
$strKey string The section name
return string The section markup

getCustomSections() public method

Return all custom layout sections
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use FrontendTemplate::sections() instead.
public getCustomSections ( string $strKey = null ) : string
$strKey string An optional section name
return string The section markup

getResponse() public method

Return a response object
public getResponse ( boolean $blnCheckRequest = false ) : Response
$blnCheckRequest boolean If true, check for unsued $_GET parameters
return Symfony\Component\HttpFoundation\Response The response object

hasAuthenticatedBackendUser() public method

Check whether there is an authenticated back end user
public hasAuthenticatedBackendUser ( ) : boolean
return boolean True if there is an authenticated back end user

output() public method

Send the response to the client
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use FrontendTemplate::getResponse() instead.
public output ( boolean $blnCheckRequest = false )
$blnCheckRequest boolean If true, check for unsued $_GET parameters

parse() public method

Add a hook to modify the template output
public parse ( ) : string
return string The template markup

section() public method

Return a custom layout section
public section ( string $key, string $template = null )
$key string The section name
$template string An optional template name

sections() public method

Return the custom layout sections
public sections ( string $key = null, string $template = null )
$key string An optional section name
$template string An optional template name

Property Details

$blnCheckRequest protected property

Unsued $_GET check
protected bool $blnCheckRequest
return boolean