InternalMenuEntryNode
extends MenuEntryNode
in package
FinalYes
Table of Contents
Properties
- $classes : string[]
- $options : array<string, scalar|scalar[]|null>
- $value : TValue
- $anchor : string
- $children : array
- $isCurrent : bool
- $isDocumentRoot : bool
- $isExternal : bool
- $isInRootline : bool
- $sections : SectionMenuEntryNode[]
- $url : string
Methods
- __construct() : mixed
- __toString() : string
- addMenuEntry() : void
- addMetaData() : void
- Attaches data about this node that is not part of its content.
- addSection() : void
- getAnchor() : string
- getChildren() : MenuEntryNode[]
- getClasses() : string[]
- getClassesString() : string
- getDocumentLink() : string
- getEntries() : MenuEntryNode[]
- getLevel() : int
- getMetaData() : array<string, DataNode>
- getOption() : mixed
- getOptions() : array<string, scalar|scalar[]|null>
- getSections() : SectionMenuEntryNode[]
- getUrl() : string
- getValue() : TValue
- hasOption() : bool
- isCurrent() : bool
- isDocumentRoot() : bool
- isExternal() : bool
- isInRootline() : bool
- setClasses() : void
- Normalizes class names following the rules of identifier-normalization
- setValue() : void
- withKeepExistingOptions() : static
- Adds $options as default options without overriding any options already set.
- withOptions() : static
Properties
$classes
protected
string[]
$classes
= []
$options
protected
array<string, scalar|scalar[]|null>
$options
= []
$value
protected
TValue
$value
$anchor read-only
private
string
$anchor
= ''
$children
private
array
$children
= []
$isCurrent read-only
private
bool
$isCurrent
= false
$isDocumentRoot read-only
private
bool
$isDocumentRoot
= false
$isExternal read-only
private
bool
$isExternal
= false
$isInRootline read-only
private
bool
$isInRootline
= false
$sections
private
SectionMenuEntryNode[]
$sections
= []
$url read-only
private
string
$url
Methods
__construct()
public
__construct(string $url[, TitleNode|null $title = null ][, MenuEntryNode[] $children = [] ][, bool $isDocumentRoot = false ][, int $level = 1 ][, string $anchor = '' ][, bool $isInRootline = false ][, bool $isCurrent = false ][, bool $isExternal = false ]) : mixed
Parameters
- $url : string
- $title : TitleNode|null = null
- $children : MenuEntryNode[] = []
- $isDocumentRoot : bool = false
- $level : int = 1
- $anchor : string = ''
- $isInRootline : bool = false
- $isCurrent : bool = false
- $isExternal : bool = false
__toString()
public
__toString() : string
Return values
stringaddMenuEntry()
public
addMenuEntry(MenuEntryNode $menuEntryNode) : void
Parameters
- $menuEntryNode : MenuEntryNode
addMetaData()
Attaches data about this node that is not part of its content.
public
addMetaData(DataNode $data) : void
Rendered as a data-* attribute where the node's template asks for
it. A name that is already taken gets the new values added to the ones
it has, rather than replaced by them. DataNode
Parameters
- $data : DataNode
addSection()
public
addSection(SectionMenuEntryNode $section) : void
Parameters
- $section : SectionMenuEntryNode
getAnchor()
public
getAnchor() : string
Return values
stringgetChildren()
public
getChildren() : MenuEntryNode[]
Return values
MenuEntryNode[]getClasses()
public
getClasses() : string[]
Return values
string[]getClassesString()
public
getClassesString() : string
Return values
stringgetDocumentLink()
public
getDocumentLink() : string
Return values
stringgetEntries()
public
getEntries() : MenuEntryNode[]
Return values
MenuEntryNode[]getLevel()
public
getLevel() : int
Return values
intgetMetaData()
public
getMetaData() : array<string, DataNode>
Return values
array<string, DataNode> —keyed by name
getOption()
public
getOption(string $name[, TType|null $default = null ]) : mixed
Parameters
- $name : string
- $default : TType|null = null
Tags
getOptions()
public
getOptions() : array<string, scalar|scalar[]|null>
Return values
array<string, scalar|scalar[]|null>getSections()
public
getSections() : SectionMenuEntryNode[]
Return values
SectionMenuEntryNode[]getUrl()
public
getUrl() : string
Return values
stringgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolisCurrent()
public
isCurrent() : bool
Return values
boolisDocumentRoot()
public
isDocumentRoot() : bool
Return values
boolisExternal()
public
isExternal() : bool
Return values
boolisInRootline()
public
isInRootline() : bool
Return values
boolsetClasses()
Normalizes class names following the rules of identifier-normalization
public
setClasses(string[] $classes) : void
Parameters
- $classes : string[]
Tags
setValue()
public
setValue(TValue $value) : void
Parameters
- $value : TValue
withKeepExistingOptions()
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|scalar[]|null> $options) : static
Parameters
- $options : array<string, scalar|scalar[]|null>