AdmonitionNode
extends CompoundNode
in package
Table of Contents
Properties
- $classes : string[]
- $options : array<string, scalar|scalar[]|null>
- $value : TValue
- $isTitled : bool
- $name : string
- $text : string
- $title : InlineCompoundNode|null
Methods
- __construct() : mixed
- addChildNode() : void
- addMetaData() : void
- Attaches data about this node that is not part of its content.
- getChildren() : TValue[]
- getClasses() : string[]
- getClassesString() : string
- getMetaData() : array<string, DataNode>
- getName() : string
- getOption() : mixed
- getOptions() : array<string, scalar|scalar[]|null>
- getText() : string
- getTitle() : InlineCompoundNode|null
- getValue() : TValue
- hasOption() : bool
- isTitled() : bool
- pushChildNode() : void
-
removeNode()
: static
-
replaceNode()
: static
- 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
$isTitled read-only
private
bool
$isTitled
= false
$name read-only
private
string
$name
$text read-only
private
string
$text
$title read-only
private
InlineCompoundNode|null
$title
Methods
__construct()
public
__construct(string $name, InlineCompoundNode|null $title, string $text, Node[] $value[, bool $isTitled = false ]) : mixed
Parameters
- $name : string
- $title : InlineCompoundNode|null
- $text : string
- $value : Node[]
- $isTitled : bool = false
addChildNode()
public
addChildNode(TValue $node) : void
Parameters
- $node : TValue
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
getChildren()
public
getChildren() : TValue[]
Return values
TValue[]getClasses()
public
getClasses() : string[]
Return values
string[]getClassesString()
public
getClassesString() : string
Return values
stringgetMetaData()
public
getMetaData() : array<string, DataNode>
Return values
array<string, DataNode> —keyed by name
getName()
public
getName() : 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|scalar[]|null>
Return values
array<string, scalar|scalar[]|null>getText()
public
getText() : string
Return values
stringgetTitle()
public
getTitle() : InlineCompoundNode|null
Return values
InlineCompoundNode|nullgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolisTitled()
public
isTitled() : bool
Return values
boolpushChildNode()
public
pushChildNode(TValue $node) : void
Parameters
- $node : TValue
removeNode()
public
removeNode(int $key) : static
Parameters
- $key : int
Return values
staticreplaceNode()
public
replaceNode(int $key, TValue $node) : static
Parameters
- $key : int
- $node : TValue
Return values
staticsetClasses()
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>