CardNode
extends GeneralDirectiveNode
in package
implements
LinkTargetNode, OptionalLinkTargetsNode, PrefixedLinkTargetNode
FinalYes
A catch-all directive Node containing all information about the original directive in rst.
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 = 'card-'
- LINK_TYPE = 'std:card'
Properties
- $classes : array<string|int, string>
- $content : InlineCompoundNode
- $name : string
- $options : array<string, scalar|null>
- $plainContent : string
- $title : TitleNode|null
- $value : TValue
- $cardFooter : CardFooterNode|null
- $cardHeader : CardHeaderNode|null
- $cardHeight : int
- $cardImage : CardImageNode|null
- $id : string
Methods
- __construct() : mixed
- addChildNode() : void
- getAnchor() : string
- getCardFooter() : CardFooterNode|null
- getCardHeader() : CardHeaderNode|null
- getCardHeight() : int
- getCardImage() : CardImageNode|null
- getChildren() : array<string|int, TValue>
- getClasses() : array<string|int, string>
- getClassesString() : string
- getContent() : InlineCompoundNode
- getId() : string
- getLinkText() : string
- getLinkType() : string
- getName() : string
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getPlainContent() : string
- getPrefix() : string
- getTitle() : TitleNode|null
- getValue() : TValue
- hasOption() : bool
- isNoindex() : bool
- pushChildNode() : void
- removeNode() : self
- replaceNode() : self
- setCardHeight() : CardNode
- 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
= 'card-'
LINK_TYPE
public
mixed
LINK_TYPE
= 'std:card'
Properties
$classes
protected
array<string|int, string>
$classes
= []
$content read-only
protected
InlineCompoundNode
$content
$name read-only
protected
string
$name
$options
protected
array<string, scalar|null>
$options
= []
$plainContent read-only
protected
string
$plainContent
$title read-only
protected
TitleNode|null
$title
= null
$value
protected
TValue
$value
$cardFooter read-only
private
CardFooterNode|null
$cardFooter
= null
$cardHeader read-only
private
CardHeaderNode|null
$cardHeader
= null
$cardHeight
private
int
$cardHeight
= 0
$cardImage read-only
private
CardImageNode|null
$cardImage
= null
$id read-only
private
string
$id
= ''
Methods
__construct()
public
__construct(string $name, string $plainContent, InlineCompoundNode $content[, TitleNode|null $title = null ][, array<int, Node> $value = [] ][, CardHeaderNode|null $cardHeader = null ][, CardImageNode|null $cardImage = null ][, CardFooterNode|null $cardFooter = null ][, string $id = '' ][, int $cardHeight = 0 ]) : mixed
Parameters
- $name : string
- $plainContent : string
- $content : InlineCompoundNode
- $title : TitleNode|null = null
- $value : array<int, Node> = []
- $cardHeader : CardHeaderNode|null = null
- $cardImage : CardImageNode|null = null
- $cardFooter : CardFooterNode|null = null
- $id : string = ''
- $cardHeight : int = 0
addChildNode()
public
addChildNode(TValue $node) : void
Parameters
- $node : TValue
getAnchor()
public
getAnchor() : string
Return values
stringgetCardFooter()
public
getCardFooter() : CardFooterNode|null
Return values
CardFooterNode|nullgetCardHeader()
public
getCardHeader() : CardHeaderNode|null
Return values
CardHeaderNode|nullgetCardHeight()
public
getCardHeight() : int
Return values
intgetCardImage()
public
getCardImage() : CardImageNode|null
Return values
CardImageNode|nullgetChildren()
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
stringgetContent()
public
getContent() : InlineCompoundNode
Return values
InlineCompoundNodegetId()
public
getId() : string
Return values
stringgetLinkText()
public
getLinkText() : string
Return values
stringgetLinkType()
public
getLinkType() : string
Return values
stringgetName()
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|null>
Return values
array<string, scalar|null>getPlainContent()
public
getPlainContent() : string
Return values
stringgetPrefix()
public
getPrefix() : string
Return values
stringgetTitle()
public
getTitle() : TitleNode|null
Return values
TitleNode|nullgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolisNoindex()
public
isNoindex() : 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
selfsetCardHeight()
public
setCardHeight(int $cardHeight) : CardNode
Parameters
- $cardHeight : int
Return values
CardNodesetClasses()
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>