ConfvalNode
extends CompoundNode
in package
implements
LinkTargetNode, OptionalLinkTargetsNode, PrefixedLinkTargetNode
FinalYes
The confval directive configuration values.
https://sphinx-toolbox.readthedocs.io/en/stable/extensions/confval.html
Table of Contents
Interfaces
- LinkTargetNode
- OptionalLinkTargetsNode
- Makes the implementing node an optional link target. If Noindex is true no references are generated, there is no entry in the objects index and no warning about duplicate ids.
- PrefixedLinkTargetNode
Constants
- LINK_PREFIX = 'confval-'
- LINK_TYPE = 'std:confval'
Properties
- $classes : array<string|int, string>
- $options : array<string, scalar|null>
- $value : TValue
- $additionalOptions : array<string|int, mixed>
- $default : InlineCompoundNode|null
- $id : string
- $noindex : bool
- $plainContent : string
- $required : bool
- $type : InlineCompoundNode|null
Methods
- __construct() : mixed
- addChildNode() : void
- getAdditionalOptions() : array<string, InlineCompoundNode>
- getAnchor() : string
- getChildren() : array<string|int, TValue>
- getClasses() : array<string|int, string>
- getClassesString() : string
- getDefault() : InlineCompoundNode|null
- getId() : string
- getLinkText() : string
- getLinkType() : string
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getPlainContent() : string
- getPrefix() : string
- getType() : InlineCompoundNode|null
- getValue() : TValue
- hasOption() : bool
- isNoindex() : bool
- isRequired() : bool
- pushChildNode() : void
- removeNode() : self
- replaceNode() : self
- 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
Constants
LINK_PREFIX
public
mixed
LINK_PREFIX
= 'confval-'
LINK_TYPE
public
mixed
LINK_TYPE
= 'std:confval'
Properties
$classes
protected
array<string|int, string>
$classes
= []
$options
protected
array<string, scalar|null>
$options
= []
$value
protected
TValue
$value
$additionalOptions read-only
private
array<string|int, mixed>
$additionalOptions
= []
$default read-only
private
InlineCompoundNode|null
$default
= null
$id read-only
private
string
$id
$noindex read-only
private
bool
$noindex
= false
$plainContent read-only
private
string
$plainContent
$required read-only
private
bool
$required
= false
$type read-only
private
InlineCompoundNode|null
$type
= null
Methods
__construct()
public
__construct(string $id, string $plainContent[, InlineCompoundNode|null $type = null ][, bool $required = false ][, InlineCompoundNode|null $default = null ][, array<string, InlineCompoundNode> $additionalOptions = [] ][, array<int, Node> $value = [] ][, bool $noindex = false ]) : mixed
Parameters
- $id : string
- $plainContent : string
- $type : InlineCompoundNode|null = null
- $required : bool = false
- $default : InlineCompoundNode|null = null
- $additionalOptions : array<string, InlineCompoundNode> = []
- $value : array<int, Node> = []
- $noindex : bool = false
addChildNode()
public
addChildNode(TValue $node) : void
Parameters
- $node : TValue
getAdditionalOptions()
public
getAdditionalOptions() : array<string, InlineCompoundNode>
Return values
array<string, InlineCompoundNode>getAnchor()
public
getAnchor() : string
Return values
stringgetChildren()
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
stringgetDefault()
public
getDefault() : InlineCompoundNode|null
Return values
InlineCompoundNode|nullgetId()
public
getId() : string
Return values
stringgetLinkText()
public
getLinkText() : string
Return values
stringgetLinkType()
public
getLinkType() : string
Return values
stringgetOption()
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>getPlainContent()
public
getPlainContent() : string
Return values
stringgetPrefix()
public
getPrefix() : string
Return values
stringgetType()
public
getType() : InlineCompoundNode|null
Return values
InlineCompoundNode|nullgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolisNoindex()
public
isNoindex() : bool
Return values
boolisRequired()
public
isRequired() : 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
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>