Documentation

XmlSitemapPageTree extends PageTree
in package

Handler to generate XML sitemaps

Instances of this class correspond to a single XML sitemap file. Whereas the static method XmlSitemapPageTree::write() does generate all XML sitemap files.

Tags
copyright

Cloudrexx AG

author

Michael Ritter michael.ritter@cloudrexx.com

author

Thomas Wirz thomas.wirz@cloudrexx.com

subpackage

core_pagetree

Table of Contents

Properties

$bytes  : mixed
$considerLogin  : mixed
$considerSeoEnabledOnly  : bool
Consider seo enabled pages alone
$currentPage  : mixed
$currentPageOnRootNode  : mixed
$currentPagePath  : mixed
$depth  : mixed
$em  : mixed
$file  : File
$lang  : mixed
$license  : mixed
$localeCode  : string
$nodeRepo  : mixed
$pageIdsAtCurrentPath  : mixed
$pageRepo  : mixed
$rootNode  : mixed
$skipInactive  : mixed
$skipInvisible  : mixed
$startLevel  : mixed
$startPath  : mixed
$virtualLanguageDirectory  : mixed
$virtualPagesAdded  : mixed
$strFileName  : mixed
$strFileNameWithLang  : mixed

Methods

__construct()  : mixed
Override the constructor from the PageTree
getFile()  : File
Return file instance of XML sitemap file
getLocaleCode()  : string
Return locale code of XML sitemap file
getUrl()  : Url
Return URL of this XML sitemap's location
isPagePathActive()  : bool
Tells wheter $pathToPage is in the active branch
postRenderLevel()  : mixed
preRenderLevel()  : mixed
render()  : string
returns the string representation of the tree.
setVirtualLanguageDirectory()  : mixed
write()  : bool
Writes the XML-Sitemap in all langs (if activated in config)
cleanUp()  : void
Drop XML sitemaps from filesystem that are no longer in use.
getChangingFrequency()  : string
Returns the changing-frequency of the page depending on the database values. If the page is a module page, the frequency is set to 'hourly', for normal pages to 'weekly'.
getFirstLevel()  : mixed
getFullNavigation()  : bool
getLastLevel()  : mixed
getLastModificationDate()  : string
Creates the modification-date of a page as a string which can be processed by google. The method uses for module-pages the current date, for normale pages the date of last modification.
getMetaImageOfPage()  : string
Get the path of the set meta image of $page. If $page does not have a meta image set, then the path to the default meta image set by the basic configuration is returned instead.
init()  : mixed
Called on construction. Override if you do not want to override the ctor.
postRender()  : mixed
PageTree override (unused)
postRenderElement()  : string
PageTree override (unused)
preRender()  : mixed
PageTree override (unused)
preRenderElement()  : mixed
renderElement()  : type
Renders the PageTree element
renderFooter()  : string
Renders the foot of the PageTree
renderHeader()  : type
Renders the head of the PageTree
writeXML()  : mixed
Write sitemap-file

Properties

$considerSeoEnabledOnly

Consider seo enabled pages alone

protected bool $considerSeoEnabledOnly

$currentPageOnRootNode

protected mixed $currentPageOnRootNode = false

$pageIdsAtCurrentPath

protected mixed $pageIdsAtCurrentPath = array()

$virtualLanguageDirectory

protected mixed $virtualLanguageDirectory

$virtualPagesAdded

protected static mixed $virtualPagesAdded = false

Methods

__construct()

Override the constructor from the PageTree

public __construct(type $entityManager, type $license[, type $maxDepth = 0 ][, type $rootNode = null ][, type $lang = null ][, type $currentPage = null ][, type $skipInvisible = false ][, type $considerLogin = false ][, bool $skipInactive = true ][, bool $considerSeoEnabledOnly = true ]) : mixed
Parameters
$entityManager : type
$license : type
$maxDepth : type = 0
$rootNode : type = null
$lang : type = null
$currentPage : type = null
$skipInvisible : type = false
$considerLogin : type = false
$skipInactive : bool = true

Skip inactive pages

$considerSeoEnabledOnly : bool = true

Consider seo enabled pages alone

Tags
see
PageTree::__construct()

getLocaleCode()

Return locale code of XML sitemap file

public getLocaleCode() : string
Return values
string

Value of static::$localeCode

isPagePathActive()

Tells wheter $pathToPage is in the active branch

public isPagePathActive(string $pathToPage) : bool
Parameters
$pathToPage : string
Return values
bool

True if active, false otherwise

postRenderLevel()

public postRenderLevel(mixed $level, mixed $lang, mixed $parentNode) : mixed
Parameters
$level : mixed
$lang : mixed
$parentNode : mixed

preRenderLevel()

public preRenderLevel(mixed $level, mixed $lang, mixed $parentNode) : mixed
Parameters
$level : mixed
$lang : mixed
$parentNode : mixed

render()

returns the string representation of the tree.

public render() : string
Return values
string

setVirtualLanguageDirectory()

public setVirtualLanguageDirectory(mixed $dir) : mixed
Parameters
$dir : mixed

write()

Writes the XML-Sitemap in all langs (if activated in config)

public static write() : bool
Tags
global

type $_CORELANG

Return values
bool

True on success (including deactivated), false otherwise

cleanUp()

Drop XML sitemaps from filesystem that are no longer in use.

protected static cleanUp() : void

getChangingFrequency()

Returns the changing-frequency of the page depending on the database values. If the page is a module page, the frequency is set to 'hourly', for normal pages to 'weekly'.

protected getChangingFrequency(mixed $page) : string
Parameters
$page : mixed
Return values
string

true, if the page is a module page. Otherwise false.

getFullNavigation()

protected getFullNavigation(int $level) : bool
Parameters
$level : int
Return values
bool

getLastModificationDate()

Creates the modification-date of a page as a string which can be processed by google. The method uses for module-pages the current date, for normale pages the date of last modification.

protected getLastModificationDate(mixed $page) : string
Parameters
$page : mixed
Return values
string

A date string which can be understood by google

getMetaImageOfPage()

Get the path of the set meta image of $page. If $page does not have a meta image set, then the path to the default meta image set by the basic configuration is returned instead.

protected getMetaImageOfPage(Page $page) : string
Parameters
$page : Page
Return values
string

Path to meta image

init()

Called on construction. Override if you do not want to override the ctor.

protected init() : mixed

postRender()

PageTree override (unused)

protected postRender(type $lang) : mixed
Parameters
$lang : type

postRenderElement()

PageTree override (unused)

protected postRenderElement(type $level, type $hasChilds, type $lang, type $page) : string
Parameters
$level : type
$hasChilds : type
$lang : type
$page : type
Return values
string

preRender()

PageTree override (unused)

protected preRender(type $lang) : mixed
Parameters
$lang : type

preRenderElement()

protected preRenderElement(mixed $level, mixed $hasChilds, mixed $lang, mixed $page) : mixed
Parameters
$level : mixed
$hasChilds : mixed
$lang : mixed
$page : mixed

renderElement()

Renders the PageTree element

protected renderElement(type $title, type $level, type $hasChilds, type $lang, type $path, type $current, type $page) : type
Parameters
$title : type
$level : type
$hasChilds : type
$lang : type
$path : type
$current : type
$page : type
Return values
type

renderFooter()

Renders the foot of the PageTree

protected renderFooter(type $lang) : string
Parameters
$lang : type
Return values
string

renderHeader()

Renders the head of the PageTree

protected renderHeader(type $lang) : type
Parameters
$lang : type
Return values
type

        
On this page

Search results