PHP Класс Contao\Frontend

Provide methods to manage front end controllers.
Наследование: extends Controller
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$arrAux array Aux array
$arrMeta array Meta array
$arrProcessed array Processed files array

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

Метод Описание
__construct ( ) Load the database object
addToUrl ( string $strRequest, boolean $blnIgnoreParams = false, array $arrUnset = [] ) : string Overwrite the parent method as front end URLs are handled differently
getCronTimeout ( ) : integer Return the cron timeout in seconds
getMetaData ( string $strData, string $strLanguage ) : array Get the meta data from a serialized string
getPageIdFromUrl ( ) : mixed Split the current request into fragments, strip the URL suffix, recreate the $_GET array and return the page ID
getResponseFromCache ( ) : Response | null Check whether there is a cached version of the page and return a response object
getRootIdFromUrl ( ) : integer Return the root page ID
getRootPageFromUrl ( ) : PageModel Try to find a root page based on language and URL
indexPageIfApplicable ( Response $objResponse ) Index a page if applicable

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

Метод Описание
getLoginStatus ( string $strCookie ) : boolean Check whether a back end or front end user is logged in
jumpToOrReload ( integer | array $intId, string $strParams = null, string $strForceLang = null ) Redirect to a jumpTo page or reload the current page
prepareMetaDescription ( string $strText ) : string Prepare a text to be used in the meta description tag

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

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

Make the constructor public, so pages can be instantiated (see #6182)
public __construct ( )

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

Overwrite the parent method as front end URLs are handled differently
public static addToUrl ( string $strRequest, boolean $blnIgnoreParams = false, array $arrUnset = [] ) : string
$strRequest string
$blnIgnoreParams boolean
$arrUnset array
Результат string

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

Return the cron timeout in seconds
public static getCronTimeout ( ) : integer
Результат integer

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

Check whether a back end or front end user is logged in
protected getLoginStatus ( string $strCookie ) : boolean
$strCookie string
Результат boolean

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

Get the meta data from a serialized string
public static getMetaData ( string $strData, string $strLanguage ) : array
$strData string
$strLanguage string
Результат array

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

Split the current request into fragments, strip the URL suffix, recreate the $_GET array and return the page ID
public static getPageIdFromUrl ( ) : mixed
Результат mixed

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

Check whether there is a cached version of the page and return a response object
Устаревший: Deprecated since Contao 4.3, to be removed in Contao 5.0. Use proper response caching headers instead.
public static getResponseFromCache ( ) : Response | null
Результат Symfony\Component\HttpFoundation\Response | null

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

Return the root page ID
Устаревший: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use Frontend::getRootPageFromUrl()->id instead.
public static getRootIdFromUrl ( ) : integer
Результат integer

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

Try to find a root page based on language and URL
public static getRootPageFromUrl ( ) : PageModel
Результат PageModel

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

Index a page if applicable
public static indexPageIfApplicable ( Response $objResponse )
$objResponse Symfony\Component\HttpFoundation\Response

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

Redirect to a jumpTo page or reload the current page
protected jumpToOrReload ( integer | array $intId, string $strParams = null, string $strForceLang = null )
$intId integer | array
$strParams string
$strForceLang string

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

Prepare a text to be used in the meta description tag
protected prepareMetaDescription ( string $strText ) : string
$strText string
Результат string

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

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

Aux array
protected array $arrAux
Результат array

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

Meta array
protected array $arrMeta
Результат array

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

Processed files array
protected array $arrProcessed
Результат array