Guides

ContainerDirective extends SubDirective
in package

FinalYes

Divs a sub document in a div with a given class or set of classes.

Tags
link
https://docutils.sourceforge.io/docs/ref/rst/directives.html#container

Table of Contents

Properties

$startingRule  : Rule

Methods

__construct()  : mixed
getAliases()  : array<string|int, string>
Allow a directive to be registered under multiple names.
getName()  : string
Get the directive name
process()  : Node|null
This is the function called by the parser to process the directive, it can be overloaded to do anything with the document, like tweaking nodes or change the parser context
processNode()  : Node
This can be overloaded to write a directive that just create one node for the document, which is common
getStartingRule()  : Rule<string|int, CollectionNode>
optionsToArray()  : array<string, scalar|null>
processSub()  : Node|null

Properties

Methods

getAliases()

Allow a directive to be registered under multiple names.

public getAliases() : array<string|int, string>
Return values
array<string|int, string>

process()

This is the function called by the parser to process the directive, it can be overloaded to do anything with the document, like tweaking nodes or change the parser context

public final process(BlockContext $blockContext, Directive $directive) : Node|null
Parameters
$blockContext : BlockContext

the current document context with the content of the directive

$directive : Directive

parsed directive containing options and variable

Return values
Node|null

processNode()

This can be overloaded to write a directive that just create one node for the document, which is common

public processNode(BlockContext $blockContext, Directive $directive) : Node

The arguments are the same that process

Parameters
$blockContext : BlockContext
$directive : Directive
Return values
Node

optionsToArray()

protected optionsToArray(array<string|int, DirectiveOption$options) : array<string, scalar|null>
Parameters
$options : array<string|int, DirectiveOption>
Return values
array<string, scalar|null>

        
On this page

Search results