PHP Class Contao\FrontendTemplate

Inheritance: extends Template
Afficher le fichier Open project: contao/core-bundle Class Usage Examples

Protected Properties

Свойство Type Description
$blnCheckRequest boolean Unsued $_GET check

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

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

Method Details

addToCache() protected méthode

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 méthode

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 méthode

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
Résultat string The new URI string

compile() protected méthode

Compile the template
protected compile ( )

getCustomSection() public méthode

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
Résultat string The section markup

getCustomSections() public méthode

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
Résultat string The section markup

getResponse() public méthode

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

hasAuthenticatedBackendUser() public méthode

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

output() public méthode

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 méthode

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

section() public méthode

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 méthode

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_oe property

Unsued $_GET check
protected bool $blnCheckRequest
Résultat boolean