BreadCrumbNodeRenderer
in package
implements
NodeRenderer
FinalYes
Table of Contents
Interfaces
Properties
- $renderer : TemplateRenderer
- $template : string
Methods
- __construct() : mixed
- render() : string
- supports() : bool
- buildBreadcrumb() : array<string|int, MenuEntryNode>
- getBreadcrumbMaxLevel() : int
Properties
$renderer read-only
private
TemplateRenderer
$renderer
$template
private
string
$template
= 'body/menu/breadcrumb.html.twig'
Methods
__construct()
public
__construct(TemplateRenderer $renderer) : mixed
Parameters
- $renderer : TemplateRenderer
render()
public
render(T $node, RenderContext $renderContext) : string
Parameters
- $node : T
- $renderContext : RenderContext
Return values
stringsupports()
public
supports(string $nodeFqcn) : bool
Parameters
- $nodeFqcn : string
Return values
boolbuildBreadcrumb()
private
buildBreadcrumb(BreadCrumbNode $node, RenderContext $renderContext, DocumentEntryNode $documentEntry, array<string|int, MenuEntryNode> $currentBreadcrumb, int $level, bool $isCurrent) : array<string|int, MenuEntryNode>
Parameters
- $node : BreadCrumbNode
- $renderContext : RenderContext
- $documentEntry : DocumentEntryNode
- $currentBreadcrumb : array<string|int, MenuEntryNode>
- $level : int
- $isCurrent : bool
Return values
array<string|int, MenuEntryNode>getBreadcrumbMaxLevel()
private
getBreadcrumbMaxLevel(BreadCrumbNode $node, RenderContext $renderContext, DocumentEntryNode $documentEntry, int $level) : int
Parameters
- $node : BreadCrumbNode
- $renderContext : RenderContext
- $documentEntry : DocumentEntryNode
- $level : int