Guides

LangTextRole extends BaseTextRole
in package
uses ReportsViolations

FinalYes

Role to mark text as being in another language and, optionally, another text direction.

Example:

:lang:`مثال عربي (ar)`
:lang:`مثال عربي (ar, rtl)`

Table of Contents

Properties

$class  : string
$name  : string
$logger  : LoggerInterface|ViolationReporter

Methods

__construct()  : mixed
getAliases()  : string[]
getClass()  : string
getName()  : string
processNode()  : InlineNode
setClass()  : void
withName()  : BaseTextRole
reportViolation()  : void

Properties

Methods

getAliases()

public getAliases() : string[]
Return values
string[]

getClass()

public getClass() : string
Return values
string

getName()

public getName() : string
Return values
string

processNode()

public processNode(DocumentParserContext $documentParserContext, string $role, string $content, string $rawContent) : InlineNode
Parameters
$documentParserContext : DocumentParserContext
$role : string
$content : string

the content with backslash escapes removed per spec

$rawContent : string

the raw content, including backslash escapes

Return values
InlineNode

setClass()

public setClass(string $class) : void
Parameters
$class : string
On this page

Search results