PHP Class tl_page

Provide miscellaneous methods that are used by the data configuration array.
Inheritance: extends Backend
Exibir arquivo Open project: contao/core-bundle Class Usage Examples

Public Methods

Method Description
__construct ( ) Import the back end user object
addAliasButton ( array $arrButtons, DataContainer $dc ) : array Automatically generate the folder URL aliases
addBreadcrumb ( ) Add the breadcrumb menu
addIcon ( array $row, string $label, DataContainer $dc = null, string $imageAttribute = '', boolean $blnReturnImage = false, boolean $blnProtected = false ) : string Add an image to each page in the tree
checkDns ( mixed $varValue ) : mixed Check the DNS settings
checkFallback ( mixed $varValue, DataContainer $dc ) : mixed Make sure there is only one fallback per domain (thanks to Andreas Schempp)
checkFeedAlias ( mixed $varValue, DataContainer $dc ) : mixed Check the sitemap alias
checkJumpTo ( mixed $varValue, DataContainer $dc ) : mixed Prevent circular references
checkPermission ( ) Check permissions to edit table tl_page
checkRootType ( mixed $varValue, DataContainer $dc ) : mixed Make sure that top-level pages are root pages
checkStaticUrl ( mixed $varValue ) : mixed Check a static URL
copyPage ( array $row, string $href, string $label, string $title, string $icon, string $attributes, string $table ) : string Return the copy page button
copyPageWithSubpages ( array $row, string $href, string $label, string $title, string $icon, string $attributes, string $table ) : string Return the copy page with subpages button
cutPage ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string Return the cut page button
deletePage ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string Return the delete page button
editArticles ( array $row, string $href, string $label, string $title, string $icon ) : string Generate an "edit articles" button and return it as string
editPage ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string Return the edit page button
generateAlias ( mixed $varValue, DataContainer $dc ) : string Auto-generate a page alias if it has not been set yet
generateArticle ( DataContainer $dc ) Automatically create an article in the main column of a new page
getPageLayouts ( ) : array Return all page layouts grouped by theme
getPageTypes ( DataContainer $dc ) : string Returns all allowed page types as array
makeRedirectPageMandatory ( DataContainer $dc ) : mixed Make the redirect page mandatory if the page is a logout page
pastePage ( DataContainer $dc, array $row, string $table, boolean $cr, array $arrClipboard = null ) : string Return the paste page button
purgeSearchIndex ( DataContainer $dc ) Purge the search index if a page is being deleted
setRootType ( DataContainer $dc ) Make new top-level pages root pages
showFallbackWarning ( ) Show a warning if there is no language fallback page
toggleIcon ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string Return the "toggle visibility" button
toggleVisibility ( integer $intId, boolean $blnVisible, DataContainer $dc = null ) Disable/enable a user group
updateSitemap ( DataContainer $dc ) Recursively add pages to a sitemap

Method Details

__construct() public method

Import the back end user object
public __construct ( )

addAliasButton() public method

Automatically generate the folder URL aliases
public addAliasButton ( array $arrButtons, DataContainer $dc ) : array
$arrButtons array
$dc DataContainer
return array

addBreadcrumb() public method

Add the breadcrumb menu
public addBreadcrumb ( )

addIcon() public method

Add an image to each page in the tree
public addIcon ( array $row, string $label, DataContainer $dc = null, string $imageAttribute = '', boolean $blnReturnImage = false, boolean $blnProtected = false ) : string
$row array
$label string
$dc DataContainer
$imageAttribute string
$blnReturnImage boolean
$blnProtected boolean
return string

checkDns() public method

Check the DNS settings
public checkDns ( mixed $varValue ) : mixed
$varValue mixed
return mixed

checkFallback() public method

Make sure there is only one fallback per domain (thanks to Andreas Schempp)
public checkFallback ( mixed $varValue, DataContainer $dc ) : mixed
$varValue mixed
$dc DataContainer
return mixed

checkFeedAlias() public method

Check the sitemap alias
public checkFeedAlias ( mixed $varValue, DataContainer $dc ) : mixed
$varValue mixed
$dc DataContainer
return mixed

checkJumpTo() public method

Prevent circular references
public checkJumpTo ( mixed $varValue, DataContainer $dc ) : mixed
$varValue mixed
$dc DataContainer
return mixed

checkPermission() public method

Check permissions to edit table tl_page
public checkPermission ( )

checkRootType() public method

Make sure that top-level pages are root pages
public checkRootType ( mixed $varValue, DataContainer $dc ) : mixed
$varValue mixed
$dc DataContainer
return mixed

checkStaticUrl() public method

Check a static URL
public checkStaticUrl ( mixed $varValue ) : mixed
$varValue mixed
return mixed

copyPage() public method

Return the copy page button
public copyPage ( array $row, string $href, string $label, string $title, string $icon, string $attributes, string $table ) : string
$row array
$href string
$label string
$title string
$icon string
$attributes string
$table string
return string

copyPageWithSubpages() public method

Return the copy page with subpages button
public copyPageWithSubpages ( array $row, string $href, string $label, string $title, string $icon, string $attributes, string $table ) : string
$row array
$href string
$label string
$title string
$icon string
$attributes string
$table string
return string

cutPage() public method

Return the cut page button
public cutPage ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string
$row array
$href string
$label string
$title string
$icon string
$attributes string
return string

deletePage() public method

Return the delete page button
public deletePage ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string
$row array
$href string
$label string
$title string
$icon string
$attributes string
return string

editArticles() public method

Generate an "edit articles" button and return it as string
public editArticles ( array $row, string $href, string $label, string $title, string $icon ) : string
$row array
$href string
$label string
$title string
$icon string
return string

editPage() public method

Return the edit page button
public editPage ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string
$row array
$href string
$label string
$title string
$icon string
$attributes string
return string

generateAlias() public method

Auto-generate a page alias if it has not been set yet
public generateAlias ( mixed $varValue, DataContainer $dc ) : string
$varValue mixed
$dc DataContainer
return string

generateArticle() public method

Automatically create an article in the main column of a new page
public generateArticle ( DataContainer $dc )
$dc DataContainer

getPageLayouts() public method

Return all page layouts grouped by theme
public getPageLayouts ( ) : array
return array

getPageTypes() public method

Returns all allowed page types as array
public getPageTypes ( DataContainer $dc ) : string
$dc DataContainer
return string

makeRedirectPageMandatory() public method

Make the redirect page mandatory if the page is a logout page
public makeRedirectPageMandatory ( DataContainer $dc ) : mixed
$dc DataContainer
return mixed

pastePage() public method

Return the paste page button
public pastePage ( DataContainer $dc, array $row, string $table, boolean $cr, array $arrClipboard = null ) : string
$dc DataContainer
$row array
$table string
$cr boolean
$arrClipboard array
return string

purgeSearchIndex() public method

Purge the search index if a page is being deleted
public purgeSearchIndex ( DataContainer $dc )
$dc DataContainer

setRootType() public method

Make new top-level pages root pages
public setRootType ( DataContainer $dc )
$dc DataContainer

showFallbackWarning() public method

Show a warning if there is no language fallback page
public showFallbackWarning ( )

toggleIcon() public method

Return the "toggle visibility" button
public toggleIcon ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string
$row array
$href string
$label string
$title string
$icon string
$attributes string
return string

toggleVisibility() public method

Disable/enable a user group
public toggleVisibility ( integer $intId, boolean $blnVisible, DataContainer $dc = null )
$intId integer
$blnVisible boolean
$dc DataContainer

updateSitemap() public method

Recursively add pages to a sitemap
public updateSitemap ( DataContainer $dc )
$dc DataContainer