GenIndexRow
extends AbstractNode
in package
FinalYes
One rendered row of a genindex term: either a direct link to a section ("link"), or a "see"/"seealso" cross-reference to another term.
Table of Contents
Properties
- $classes : string[]
- $options : array<string, scalar|scalar[]|null>
- $value : TValue
- $kind : GenIndexRowKind
- $main : bool
- $reference : ReferenceNode|null
- $seeText : string|null
Methods
- __construct() : mixed
- addMetaData() : void
- Attaches data about this node that is not part of its content.
- getClasses() : string[]
- getClassesString() : string
- getKind() : GenIndexRowKind
- getMetaData() : array<string, DataNode>
- getOption() : mixed
- getOptions() : array<string, scalar|scalar[]|null>
- getReference() : ReferenceNode|null
- getSeeText() : string|null
- The literal term text a "see"/"seealso" row points at.
- getValue() : TValue
- hasOption() : bool
- isMain() : 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
$kind read-only
private
GenIndexRowKind
$kind
$main read-only
private
bool
$main
= false
$reference read-only
private
ReferenceNode|null
$reference
= null
$seeText read-only
private
string|null
$seeText
= null
Methods
__construct()
public
__construct(GenIndexRowKind $kind[, bool $main = false ][, ReferenceNode|null $reference = null ][, string|null $seeText = null ]) : mixed
Parameters
- $kind : GenIndexRowKind
- $main : bool = false
- $reference : ReferenceNode|null = null
- $seeText : string|null = null
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
getClasses()
public
getClasses() : string[]
Return values
string[]getClassesString()
public
getClassesString() : string
Return values
stringgetKind()
public
getKind() : GenIndexRowKind
Return values
GenIndexRowKindgetMetaData()
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>getReference()
public
getReference() : ReferenceNode|null
Return values
ReferenceNode|nullgetSeeText()
The literal term text a "see"/"seealso" row points at.
public
getSeeText() : string|null
Return values
string|nullgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolisMain()
public
isMain() : 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>