PHP Класс Contao\FrontendTemplate

Наследование: extends Template
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$blnCheckRequest boolean Unsued $_GET check

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
setCacheHeaders ( Response $response ) : Response Set the cache headers according to the page settings.

Описание методов

addToCache() защищенный Метод

Add the template output to the cache and add the cache headers
Устаревший: Deprecated since Contao 4.3, to be removed in Contao 5.0. Use proper response caching headers instead.
protected addToCache ( )

addToSearchIndex() защищенный Метод

Add the template output to the search index
Устаревший: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use the kernel.terminate event instead.
protected addToSearchIndex ( )

addToUrl() публичный статический Метод

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
Результат string The new URI string

compile() защищенный Метод

Compile the template
protected compile ( )

getCustomSection() публичный Метод

Return a custom layout section
Устаревший: 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
Результат string The section markup

getCustomSections() публичный Метод

Return all custom layout sections
Устаревший: 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
Результат string The section markup

getResponse() публичный Метод

Return a response object
public getResponse ( boolean $blnCheckRequest = false ) : Response
$blnCheckRequest boolean If true, check for unsued $_GET parameters
Результат Symfony\Component\HttpFoundation\Response The response object

hasAuthenticatedBackendUser() публичный Метод

Check whether there is an authenticated back end user
public hasAuthenticatedBackendUser ( ) : boolean
Результат boolean True if there is an authenticated back end user

output() публичный Метод

Send the response to the client
Устаревший: 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() публичный Метод

Add a hook to modify the template output
public parse ( ) : string
Результат string The template markup

section() публичный Метод

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

sections() публичный Метод

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

Описание свойств

$blnCheckRequest защищенное свойство

Unsued $_GET check
protected bool $blnCheckRequest
Результат boolean