NestedNavigationPageTree

Build nested navigation menu with unordered list if [[nested_navigation]] is placed in navbar. Formatting should be done with CSS. Tags (ul and li) are inserted by the code.

Navigation can be restricted to specific levels with the tag [[levels_AB]], where A and B can take following values: starting level A: [1-9] ending level B: [1-9], [+] or []; [+]: any level starting from A; [] : just level A; examples: [[levels_24]] means navigation levels 2 to 4; [[levels_3+]] means any navigation levels starting from 3; [[levels_1]] means navigation level 1 only;

copyright CONTREXX CMS - COMVATION AG
author COMVATION Development Team
package contrexx
subpackage core_pagetree

 Methods

__construct()

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

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

$activeNode

$lang

int

the language

$currentPage

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

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

Tells wheter $pathToPage is in the active branch

isPagePathActive(String $pathToPage) : boolean
Inherited
inherited_from \Cx\Core\PageTree\PageTree::isPagePathActive()
inherited_from \Cx\Core\PageTree\SigmaPageTree::isPagePathActive()

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
Inherited
inherited_from \Cx\Core\PageTree\PageTree::render()
inherited_from \Cx\Core\PageTree\SigmaPageTree::render()

Returns

string

setTemplate()

setTemplate($template) 
Inherited
inherited_from \Cx\Core\PageTree\SigmaPageTree::setTemplate()

Parameters

$template

the PEAR Sigma template.

setVirtualLanguageDirectory()

setVirtualLanguageDirectory($dir) 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::setVirtualLanguageDirectory()
inherited_from \Cx\Core\PageTree\SigmaPageTree::setVirtualLanguageDirectory()

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) 
Inherited
inherited_from \Cx\Core\PageTree\SigmaPageTree::preRender()

Parameters

$lang

preRenderElement()

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

Parameters

$level

$hasChilds

$lang

$page

realPreRender()

realPreRender($lang) 

Parameters

$lang

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) 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::internalRender()
inherited_from \Cx\Core\PageTree\SigmaPageTree::internalRender()

Parameters

$node

$dontDescend

\Cx\Core\PageTree\type

isLevelInsideLayerBound()

isLevelInsideLayerBound($level) 

Parameters

$level

isNodeInsideCurrentBranch()

isNodeInsideCurrentBranch($node) 

Parameters

$node

isParentNodeInsideCurrentBranch()

isParentNodeInsideCurrentBranch($node) 

Parameters

$node

 Properties

 

$branchNodeIds 
 

$currentPage 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$currentPage
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$currentPage
 

$currentPageOnRootNode 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$currentPageOnRootNode
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$currentPageOnRootNode
 

$currentPagePath 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$currentPagePath
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$currentPagePath
 

$depth 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$depth
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$depth
 

$em 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$em
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$em
 

$lang 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$lang
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$lang
 

$lastLevel 
 

$levelFrom 
 

$levelTo 
 

$license 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$license
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$license
 

$listCompleteTree 
 

$navigationIds 
 

$pageIdsAtCurrentPath 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$pageIdsAtCurrentPath
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$pageIdsAtCurrentPath
 

$pageRepo 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$pageRepo
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$pageRepo
 

$rootNode 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$rootNode
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$rootNode
 

$skipInvisible 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$skipInvisible
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$skipInvisible
 

$template : \Cx\Core\Html\Sigma
Inherited
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$template
 

$virtualPagesAdded 
Inherited
inherited_from \Cx\Core\PageTree\PageTree::$$virtualPagesAdded
inherited_from \Cx\Core\PageTree\SigmaPageTree::$$virtualPagesAdded

 Constants

 

CssPrefix

CssPrefix 
 

StyleNameActive

StyleNameActive 
 

StyleNameNormal

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