Guides

CodeExtension extends AbstractExtension
in package

FinalYes

Table of Contents

Properties

$highlighter  : Highlighter

Methods

__construct()  : mixed
getFilters()  : array<string|int, mixed>
{@inheritDoc}
highlight()  : string
`CodeNode::getLanguage()` is nullable, and templates pass it straight into this filter, so null has to be accepted here and mean the same as an omitted language.

Properties

Methods

getFilters()

{@inheritDoc}

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

highlight()

`CodeNode::getLanguage()` is nullable, and templates pass it straight into this filter, so null has to be accepted here and mean the same as an omitted language.

public highlight(array<string, mixed> $context, string $code[, string|null $language = null ]) : string
Parameters
$context : array<string, mixed>
$code : string
$language : string|null = null
Return values
string
On this page

Search results