DocumentEntryNode
extends EntryNode
in package
FinalYes
Table of Contents
Properties
- $classes : string[]
- $options : array<string, scalar|scalar[]|null>
- $value : TValue
- $additionalData : array
- $entries : (DocumentEntryNode|ExternalEntryNode)[]
- $file : string
- $isRoot : bool
- $orphan : bool
- $sections : SectionEntryNode[]
- $titleNode : TitleNode
Methods
- __construct() : mixed
- addAdditionalData() : void
- addChild() : void
- addMetaData() : void
- Attaches data about this node that is not part of its content.
- addSection() : void
- findSectionEntry() : SectionEntryNode|null
- getAdditionalData() : Node|null
- getChildren() : DocumentEntryNode[]
- getClasses() : string[]
- getClassesString() : string
- getFile() : string
- getInternalTarget() : InternalTarget|null
- Returns the internal target for heading id if exists
- getMenuEntries() : (DocumentEntryNode|ExternalEntryNode)[]
- getMetaData() : array<string, DataNode>
- getOption() : mixed
- getOptions() : array<string, scalar|scalar[]|null>
- getParent() : DocumentEntryNode|null
- getSections() : SectionEntryNode[]
- getTitle() : TitleNode
- getValue() : TValue
- hasOption() : bool
- isOrphan() : bool
- isRoot() : bool
- setClasses() : void
- Normalizes class names following the rules of identifier-normalization
- setMenuEntries() : void
- setParent() : void
- setValue() : void
- withKeepExistingOptions() : static
- Adds $options as default options without overriding any options already set.
- withOptions() : static
- findSectionEntryById() : SectionEntryNode|null
Properties
$classes
protected
string[]
$classes
= []
$options
protected
array<string, scalar|scalar[]|null>
$options
= []
$value
protected
TValue
$value
$additionalData
private
array
$additionalData
= []
$entries
private
(DocumentEntryNode|ExternalEntryNode)[]
$entries
= []
$file read-only
private
string
$file
$isRoot read-only
private
bool
$isRoot
= false
$orphan
private
bool
$orphan
= false
$sections
private
SectionEntryNode[]
$sections
= []
$titleNode read-only
private
TitleNode
$titleNode
Methods
__construct()
public
__construct(string $file, TitleNode $titleNode[, bool $isRoot = false ][, array<string, Node> $additionalData = [] ][, bool $orphan = false ]) : mixed
Parameters
addAdditionalData()
public
addAdditionalData(string $key, Node $value) : void
Parameters
- $key : string
- $value : Node
addChild()
public
addChild(DocumentEntryNode|ExternalEntryNode $child) : void
Parameters
- $child : DocumentEntryNode|ExternalEntryNode
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(SectionEntryNode $section) : void
Parameters
- $section : SectionEntryNode
findSectionEntry()
public
findSectionEntry(SectionNode $sectionNode) : SectionEntryNode|null
Parameters
- $sectionNode : SectionNode
Return values
SectionEntryNode|nullgetAdditionalData()
public
getAdditionalData(string $key) : Node|null
Parameters
- $key : string
Return values
Node|nullgetChildren()
public
getChildren() : DocumentEntryNode[]
Return values
DocumentEntryNode[]getClasses()
public
getClasses() : string[]
Return values
string[]getClassesString()
public
getClassesString() : string
Return values
stringgetFile()
public
getFile() : string
Return values
stringgetInternalTarget()
Returns the internal target for heading id if exists
public
getInternalTarget(string $id) : InternalTarget|null
Parameters
- $id : string
Return values
InternalTarget|nullgetMenuEntries()
public
getMenuEntries() : (DocumentEntryNode|ExternalEntryNode)[]
Return values
(DocumentEntryNode|ExternalEntryNode)[]getMetaData()
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>getParent()
public
getParent() : DocumentEntryNode|null
Return values
DocumentEntryNode|nullgetSections()
public
getSections() : SectionEntryNode[]
Return values
SectionEntryNode[]getTitle()
public
getTitle() : TitleNode
Return values
TitleNodegetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolisOrphan()
public
isOrphan() : bool
Return values
boolisRoot()
public
isRoot() : bool
Return values
boolsetClasses()
Normalizes class names following the rules of identifier-normalization
public
setClasses(string[] $classes) : void
Parameters
- $classes : string[]
Tags
setMenuEntries()
public
setMenuEntries((DocumentEntryNode|ExternalEntryNode)[] $entries) : void
Parameters
- $entries : (DocumentEntryNode|ExternalEntryNode)[]
setParent()
public
setParent(DocumentEntryNode|null $parent) : void
Parameters
- $parent : DocumentEntryNode|null
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>
Return values
staticfindSectionEntryById()
private
findSectionEntryById(string $id, SectionEntryNode[] $sectionEntries) : SectionEntryNode|null
Parameters
- $id : string
- $sectionEntries : SectionEntryNode[]