NavMenuNode
extends MenuNode
in package
FinalYes
Table of Contents
Constants
- DEFAULT_DEPTH = \PHP_INT_MAX
Properties
- $classes : array<string|int, string>
- $options : array<string, scalar|null>
- $value : TValue
- $caption : InlineCompoundNode|null
- $currentPath : string|null
- $rootlinePaths : array<string|int, string>
Methods
- __construct() : mixed
- addChildNode() : void
- getCaption() : InlineCompoundNode|null
- getChildren() : array<string|int, TValue>
- getClasses() : array<string|int, string>
- getClassesString() : string
- getCurrentPath() : string|null
- getDepth() : int
- getMenuEntries() : array<string|int, MenuEntryNode>
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getRootlinePaths() : array<string|int, string>
- getValue() : TValue
- hasOption() : bool
- isPageLevelOnly() : bool
- pushChildNode() : void
- removeNode() : self
- replaceNode() : self
- setClasses() : void
- Normalizes class names following the rules of identifier-normalization
- setValue() : void
- withCaption() : static
- withCurrentPath() : NavMenuNode
- withKeepExistingOptions() : static
- Adds $options as default options without overriding any options already set.
- withOptions() : static
- withRootlinePaths() : NavMenuNode
Constants
DEFAULT_DEPTH
protected
mixed
DEFAULT_DEPTH
= \PHP_INT_MAX
Properties
$classes
protected
array<string|int, string>
$classes
= []
$options
protected
array<string, scalar|null>
$options
= []
$value
protected
TValue
$value
$caption
private
InlineCompoundNode|null
$caption
= null
$currentPath
private
string|null
$currentPath
= null
$rootlinePaths
private
array<string|int, string>
$rootlinePaths
= []
Methods
__construct()
public
__construct(array<string|int, MenuEntryNode> $menuEntries) : mixed
Parameters
- $menuEntries : array<string|int, MenuEntryNode>
addChildNode()
public
addChildNode(TValue $node) : void
Parameters
- $node : TValue
getCaption()
public
getCaption() : InlineCompoundNode|null
Return values
InlineCompoundNode|nullgetChildren()
public
getChildren() : array<string|int, TValue>
Return values
array<string|int, TValue>getClasses()
public
getClasses() : array<string|int, string>
Return values
array<string|int, string>getClassesString()
public
getClassesString() : string
Return values
stringgetCurrentPath()
public
getCurrentPath() : string|null
Return values
string|nullgetDepth()
public
getDepth() : int
Return values
intgetMenuEntries()
public
getMenuEntries() : array<string|int, MenuEntryNode>
Return values
array<string|int, MenuEntryNode>getOption()
public
getOption(string $name[, TType|null $default = null ]) : mixed
Parameters
- $name : string
- $default : TType|null = null
Tags
getOptions()
public
getOptions() : array<string, scalar|null>
Return values
array<string, scalar|null>getRootlinePaths()
public
getRootlinePaths() : array<string|int, string>
Return values
array<string|int, string>getValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolisPageLevelOnly()
public
isPageLevelOnly() : bool
Return values
boolpushChildNode()
public
pushChildNode(TValue $node) : void
Parameters
- $node : TValue
removeNode()
public
removeNode(int $key) : self
Parameters
- $key : int
Tags
Return values
selfreplaceNode()
public
replaceNode(int $key, TValue $node) : self
Parameters
- $key : int
- $node : TValue
Tags
Return values
selfsetClasses()
Normalizes class names following the rules of identifier-normalization
public
setClasses(array<string|int, string> $classes) : void
Parameters
- $classes : array<string|int, string>
Tags
setValue()
public
setValue(TValue $value) : void
Parameters
- $value : TValue
withCaption()
public
withCaption(InlineCompoundNode|null $caption) : static
Parameters
- $caption : InlineCompoundNode|null
Return values
staticwithCurrentPath()
public
withCurrentPath(string|null $currentPath) : NavMenuNode
Parameters
- $currentPath : string|null
Return values
NavMenuNodewithKeepExistingOptions()
Adds $options as default options without overriding any options already set.
public
withKeepExistingOptions(array<string, scalar|null> $options) : static
Parameters
- $options : array<string, scalar|null>
Return values
staticwithOptions()
public
withOptions(array<string, scalar|null> $options) : static
Parameters
- $options : array<string, scalar|null>
Return values
staticwithRootlinePaths()
public
withRootlinePaths(array<string|int, string> $rootlinePaths) : NavMenuNode
Parameters
- $rootlinePaths : array<string|int, string>