Base class for all kinds of trees such as Sitemaps and Navigation.

copyright CONTREXX CMS - COMVATION AG
author Michael Ritter
package contrexx
subpackage core_pagetree

 Methods

__construct()

__construct($entityManager, \Cx\Core_Modules\License\License $license, int $maxDepth, \Cx\Core\ContentManager\Model\Entity\Node $rootNode, int $lang, \Cx\Core\ContentManager\Model\Entity\Page $currentPage, $skipInvisible) 

Parameters

$entityManager

the doctrine em

$license

\Cx\Core_Modules\License\License

License used to check if a module is allowed in frontend

$maxDepth

int

maximum depth to fetch, 0 means everything

$rootNode

\Cx\Core\ContentManager\Model\Entity\Node

node to use as root

$lang

int

the language

$currentPage

\Cx\Core\ContentManager\Model\Entity\Page

if set, renderElement() will receive a correctly set $current flag.

$skipInvisible

Tells wheter $pathToPage is in the active branch

isPagePathActive(String $pathToPage) : boolean

Parameters

$pathToPage

String

Returns

booleanTrue if active, false otherwise

postRenderLevel()

postRenderLevel($level, $lang, $parentNode) 

Parameters

$level

$lang

$parentNode

preRenderLevel()

preRenderLevel($level, $lang, $parentNode) 

Parameters

$level

$lang

$parentNode

returns the string representation of the tree.

render() : string

Returns

string

setVirtualLanguageDirectory()

setVirtualLanguageDirectory($dir) 

Parameters

$dir

getFirstLevel()

getFirstLevel() 

getFullNavigation()

getFullNavigation() 

getLastLevel()

getLastLevel() 

Called on construction.

init() 

Override if you do not want to override the ctor.

postRender()

postRender($lang) 

Parameters

$lang

postRenderElement()

postRenderElement($level, $hasChilds, $lang, $page) 

Parameters

$level

$hasChilds

$lang

$page

preRender()

preRender($lang) 

Parameters

$lang

preRenderElement()

preRenderElement($level, $hasChilds, $lang, $page) 

Parameters

$level

$hasChilds

$lang

$page

Override this to do your representation of the tree.

renderElement(string $title, int $level, boolean $hasChilds, int $lang, string $path, boolean $current, $page) : string

Parameters

$title

string

$level

int

0-based level of the element

$hasChilds

boolean

are there children of this element? if yes, they will be processed in the subsequent calls.

$lang

int

language id

$path

string

path to this element, e.g. '/CatA/CatB'

$current

boolean

if a $currentPage has been specified, this will be set to true if either a parent element of the current element or the current element itself is rendered.

$page

Returns

stringyour string representation of the element.

renderFooter()

renderFooter($lang) 

Parameters

$lang

renderHeader()

renderHeader($lang) 

Parameters

$lang

internalRender()

internalRender($node, \Cx\Core\PageTree\type $dontDescend) 
todo Virtual pages!

Parameters

$node

$dontDescend

\Cx\Core\PageTree\type

 Properties

 

$currentPage 
 

$currentPageOnRootNode 
 

$currentPagePath 
 

$depth 
 

$em 
 

$lang 
 

$license 
 

$pageIdsAtCurrentPath 
 

$pageRepo 
 

$rootNode 
 

$skipInvisible 
 

$virtualPagesAdded 
© Copyright 2014 by Comvation AG
Generated on 2014-07-11T08:39:24+02:00.