Documentation

NestedNavigationPageTree extends SigmaPageTree
in package

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;

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

CLOUDREXX Development Team info@cloudrexx.com

subpackage

core_pagetree

Table of Contents

Constants

CssPrefix  = "menu_level_"
StyleNameActive  = "active"
StyleNameNormal  = "inactive"

Properties

$activeNode  : mixed
$branchNodeIds  : mixed
$bytes  : mixed
$considerLogin  : mixed
$considerSeoEnabledOnly  : bool
Consider seo enabled pages alone
$currentPage  : mixed
$currentPageOnRootNode  : mixed
$currentPagePath  : mixed
$depth  : mixed
$em  : mixed
$lang  : mixed
$lastLevel  : mixed
$levelFrom  : mixed
$levelTo  : mixed
$license  : mixed
$listCompleteTree  : mixed
$navigationIds  : mixed
$nodeRepo  : mixed
$pageIdsAtCurrentPath  : mixed
$pageRepo  : mixed
$rootNode  : mixed
$skipInactive  : mixed
$skipInvisible  : mixed
$startLevel  : mixed
$startPath  : mixed
$template  : Sigma
$virtualLanguageDirectory  : mixed
$virtualPagesAdded  : mixed

Methods

__construct()  : mixed
isPagePathActive()  : bool
Tells wheter $pathToPage is in the active branch
postRenderLevel()  : mixed
preRenderLevel()  : mixed
render()  : string
returns the string representation of the tree.
setTemplate()  : mixed
setVirtualLanguageDirectory()  : mixed
getFirstLevel()  : mixed
getFullNavigation()  : bool
getLastLevel()  : mixed
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
postRenderElement()  : mixed
preRender()  : mixed
preRenderElement()  : mixed
realPreRender()  : mixed
renderElement()  : string
Override this to do your representation of the tree.
renderFooter()  : mixed
renderHeader()  : mixed
isLevelInsideLayerBound()  : mixed
isNodeInsideCurrentBranch()  : mixed
isParentNodeInsideCurrentBranch()  : mixed

Constants

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()

public __construct(mixed $entityManager, mixed $license[, mixed $maxDepth = 0 ][, mixed $activeNode = null ][, mixed $lang = null ][, mixed $currentPage = null ]) : mixed
Parameters
$entityManager : mixed

the doctrine em

$license : mixed

License used to check if a module is allowed in frontend

$maxDepth : mixed = 0

maximum depth to fetch, 0 means everything

$activeNode : mixed = null
$lang : mixed = null

the language

$currentPage : mixed = null

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

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

setTemplate()

public setTemplate(mixed $template) : mixed
Parameters
$template : mixed

the PEAR Sigma template.

setVirtualLanguageDirectory()

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

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

postRenderElement()

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

preRenderElement()

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

renderElement()

Override this to do your representation of the tree.

protected renderElement(mixed $title, mixed $level, mixed $hasChilds, mixed $lang, mixed $path, mixed $current, mixed $page) : string
Parameters
$title : mixed
$level : mixed

0-based level of the element

$hasChilds : mixed

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

$lang : mixed

language id

$path : mixed

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

$current : mixed

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 : mixed
Return values
string

your string representation of the element.


        
On this page

Search results