ContentsMenuEntryNodeTransformer
extends AbstractMenuEntryNodeTransformer
in package
uses
SubSectionHierarchyHandler
FinalYes
Table of Contents
Constants
- DEFAULT_MAX_LEVELS = \PHP_INT_MAX
Properties
- $logger : LoggerInterface
Methods
- __construct() : mixed
- enterNode() : T
- getPriority() : int
- The higher the priority the earlier the NodeTransformer is executed.
- leaveNode() : T|null
- supports() : bool
- handleMenuEntry() : array<int, MenuEntryNode>
- addSubSections() : void
- addSubSectionsToMenuEntries() : void
Constants
DEFAULT_MAX_LEVELS
private
mixed
DEFAULT_MAX_LEVELS
= \PHP_INT_MAX
Properties
$logger read-only
protected
LoggerInterface
$logger
Methods
__construct()
public
__construct(LoggerInterface $logger) : mixed
Parameters
- $logger : LoggerInterface
enterNode()
public
final enterNode(Node $node, CompilerContextInterface $compilerContext) : T
Parameters
- $node : Node
- $compilerContext : CompilerContextInterface
Return values
TgetPriority()
The higher the priority the earlier the NodeTransformer is executed.
public
getPriority() : int
Return values
intleaveNode()
public
final leaveNode(MenuEntryNode $node, CompilerContextInterface $compilerContext) : T|null
Parameters
- $node : MenuEntryNode
- $compilerContext : CompilerContextInterface
Return values
T|nullsupports()
public
supports(Node $node) : bool
Parameters
- $node : Node
Return values
boolhandleMenuEntry()
protected
handleMenuEntry(MenuNode $currentMenu, MenuEntryNode $entryNode, CompilerContextInterface $compilerContext) : array<int, MenuEntryNode>
Parameters
- $currentMenu : MenuNode
- $entryNode : MenuEntryNode
- $compilerContext : CompilerContextInterface
Return values
array<int, MenuEntryNode>addSubSections()
private
addSubSections(SectionMenuEntryNode $sectionMenuEntry, SectionEntryNode $sectionEntryNode, DocumentEntryNode $documentEntry, int $currentLevel, int $maxLevel) : void
Parameters
- $sectionMenuEntry : SectionMenuEntryNode
- $sectionEntryNode : SectionEntryNode
- $documentEntry : DocumentEntryNode
- $currentLevel : int
- $maxLevel : int
addSubSectionsToMenuEntries()
private
addSubSectionsToMenuEntries(DocumentEntryNode $documentEntry, InternalMenuEntryNode|SectionMenuEntryNode $menuEntry, int $maxLevel) : void
Parameters
- $documentEntry : DocumentEntryNode
- $menuEntry : InternalMenuEntryNode|SectionMenuEntryNode
- $maxLevel : int