|
| | __construct (public string $language, public array $classes=[], public string $dir='ltr', public bool $inline=false, public bool $includeLineNumbers=false, public int $startingLineNumber=1, public bool $includeLineLinks=false, public string $linkLinkAnchorPrefix='L', public string $highlightLines='', public bool $isCopiable=false) |
| |
- Stability: newable
- Since
- 1.47
Definition at line 10 of file CodeHighlighterOptions.php.
◆ __construct()
| MediaWiki\Content\CodeHighlighterOptions::__construct |
( |
public string | $language, |
|
|
public array | $classes = [], |
|
|
public string | $dir = 'ltr', |
|
|
public bool | $inline = false, |
|
|
public bool | $includeLineNumbers = false, |
|
|
public int | $startingLineNumber = 1, |
|
|
public bool | $includeLineLinks = false, |
|
|
public string | $linkLinkAnchorPrefix = 'L', |
|
|
public string | $highlightLines = '', |
|
|
public bool | $isCopiable = false ) |
- Parameters
-
| string | $language | Language code |
| string[] | $classes | Classes to apply to the output HTML element |
| string | $dir | HTML dir attribute to apply to the output HTML element |
| bool | $inline | Whether the code block should be rendered inline with text |
| bool | $includeLineNumbers | Whether the code block should include line numbers |
| int | $startingLineNumber | Line number for the first line of the code block |
| bool | $includeLineLinks | Whether the line numbers should have links |
| string | $linkLinkAnchorPrefix | Prefix for the anchor for each line number (if $includeLineLinks is enabled) |
| string | $highlightLines | Comma-separated list of line numbers and line number-ranges to be highlighted |
| bool | $isCopiable | Whether a button should be shown for copying the code to the clipboard |
Definition at line 24 of file CodeHighlighterOptions.php.
The documentation for this class was generated from the following file: