ExternalMenuEntryNodeTransformer
extends AbstractMenuEntryNodeTransformer
in package
uses
MenuEntryManagement, SubSectionHierarchyHandler
FinalYes
Table of Contents
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
- attachDocumentEntriesToParents() : void
- isAbsoluteFile() : bool
- isCurrent() : bool
- isInRootline() : bool
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
attachDocumentEntriesToParents()
private
attachDocumentEntriesToParents(array<string|int, DocumentEntryNode|ExternalEntryNode> $entryNodes, CompilerContextInterface $compilerContext, string $currentPath) : void
Parameters
- $entryNodes : array<string|int, DocumentEntryNode|ExternalEntryNode>
- $compilerContext : CompilerContextInterface
- $currentPath : string
isAbsoluteFile()
private
static isAbsoluteFile(string $expectedFile) : bool
Parameters
- $expectedFile : string
Return values
boolisCurrent()
private
static isCurrent(DocumentEntryNode $menuEntry, string $currentPath) : bool
Parameters
- $menuEntry : DocumentEntryNode
- $currentPath : string
Return values
boolisInRootline()
private
static isInRootline(DocumentEntryNode $menuEntry, DocumentEntryNode $currentDoc) : bool
Parameters
- $menuEntry : DocumentEntryNode
- $currentDoc : DocumentEntryNode