Guides

MenuNode extends CompoundNode
in package

AbstractYes
Tags
link
https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#table-of-contents

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

Methods

__construct()  : mixed
addChildNode()  : void
getCaption()  : InlineCompoundNode|null
getChildren()  : array<string|int, TValue>
getClasses()  : array<string|int, string>
getClassesString()  : string
getDepth()  : int
getMenuEntries()  : array<string|int, MenuEntryNode>
getOption()  : mixed
getOptions()  : array<string, scalar|null>
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
withKeepExistingOptions()  : static
Adds $options as default options without overriding any options already set.
withOptions()  : static

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 = []

Methods

addChildNode()

public addChildNode(TValue $node) : void
Parameters
$node : TValue

getChildren()

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
string

getDepth()

public abstract getDepth() : int
Return values
int

getOption()

public getOption(string $name[, TType|null $default = null ]) : mixed
Parameters
$name : string
$default : TType|null = null
Tags
phpstan-return

($default is null ? mixed|null: TType|null)

getOptions()

public getOptions() : array<string, scalar|null>
Return values
array<string, scalar|null>

getValue()

public getValue() : TValue
Return values
TValue

hasOption()

public hasOption(string $name) : bool
Parameters
$name : string
Return values
bool

isPageLevelOnly()

public abstract isPageLevelOnly() : bool
Return values
bool

pushChildNode()

public pushChildNode(TValue $node) : void
Parameters
$node : TValue

removeNode()

public removeNode(int $key) : self
Parameters
$key : int
Tags
@return

$this<TValue>

Return values
self

replaceNode()

public replaceNode(int $key, TValue $node) : self
Parameters
$key : int
$node : TValue
Tags
@return

$this<TValue>

Return values
self

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
static

withOptions()

public withOptions(array<string, scalar|null> $options) : static
Parameters
$options : array<string, scalar|null>
Return values
static

        
On this page

Search results