GlobalMenuExtension
extends AbstractExtension
in package
FinalYes
Table of Contents
Properties
- $menuCache : array<string, string>
- Contains cached menu html for each render context to prevent multiple rendering of the same menu.
- $nodeRenderer : NodeRenderer
Methods
- __construct() : mixed
- getFunctions() : TwigFunction[]
- renderMenu() : string
- getRenderContext() : RenderContext
Properties
$menuCache
Contains cached menu html for each render context to prevent multiple rendering of the same menu.
private
array<string, string>
$menuCache
= []
$nodeRenderer read-only
private
NodeRenderer
$nodeRenderer
Methods
__construct()
public
__construct(NodeRenderer<string|int, Node> $nodeRenderer) : mixed
Parameters
- $nodeRenderer : NodeRenderer<string|int, Node>
getFunctions()
public
getFunctions() : TwigFunction[]
Return values
TwigFunction[]renderMenu()
public
renderMenu(array{env: RenderContext} $context, string $menuType) : string
Parameters
- $context : array{env: RenderContext}
- $menuType : string
Return values
stringgetRenderContext()
private
getRenderContext(array{env: RenderContext} $context) : RenderContext
Parameters
- $context : array{env: RenderContext}