SectionMenuEntryNode
extends MenuEntryNode
in package
FinalYes
Table of Contents
Properties
- $classes : array<string|int, string>
- $options : array<string, scalar|null>
- $value : TValue
- $anchor : string
- $level : int
- $sections : array<string|int, SectionMenuEntryNode>
- $url : string
Methods
- __construct() : mixed
- __toString() : string
- addSection() : void
- getAnchor() : string
- getClasses() : array<string|int, string>
- getClassesString() : string
- getDocumentLink() : string
- getLevel() : int
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getSections() : array<string|int, SectionMenuEntryNode>
- getUrl() : string
- getValue() : TValue
- hasOption() : 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
array<string|int, string>
$classes
= []
$options
protected
array<string, scalar|null>
$options
= []
$value
protected
TValue
$value
$anchor read-only
private
string
$anchor
= ''
$level read-only
private
int
$level
= 1
$sections
private
array<string|int, SectionMenuEntryNode>
$sections
= []
$url read-only
private
string
$url
Methods
__construct()
public
__construct(string $url[, TitleNode|null $title = null ][, int $level = 1 ][, string $anchor = '' ]) : mixed
Parameters
- $url : string
- $title : TitleNode|null = null
- $level : int = 1
- $anchor : string = ''
__toString()
public
__toString() : string
Return values
stringaddSection()
public
addSection(SectionMenuEntryNode $section) : void
Parameters
- $section : SectionMenuEntryNode
getAnchor()
public
getAnchor() : string
Return values
stringgetClasses()
public
getClasses() : array<string|int, string>
Return values
array<string|int, string>getClassesString()
public
getClassesString() : string
Return values
stringgetDocumentLink()
public
getDocumentLink() : string
Return values
stringgetLevel()
public
getLevel() : int
Return values
intgetOption()
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>getSections()
public
getSections() : array<string|int, SectionMenuEntryNode>
Return values
array<string|int, SectionMenuEntryNode>getUrl()
public
getUrl() : string
Return values
stringgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolsetClasses()
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
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|null> $options) : static
Parameters
- $options : array<string, scalar|null>