|
MediaWiki master
|
Default metadata implementation for highlighted code. More...
Inherits MediaWiki\Content\ICodeHighlighterMetadata.

Public Member Functions | |
| __construct (protected array $modules=[], protected array $moduleStyles=[], protected array $categories=[], protected array $warnings=[],) | |
| addToOutputPage (OutputPage $outputPage) | |
| Add this metadata to an OutputPage. | |
| addToParserOutput (ParserOutput $parserOutput) | |
| Add this metadata to a ParserOutput. | |
Default metadata implementation for highlighted code.
Providers can use this class directly, or extend it when they need to carry additional metadata without changing CodeHighlighter callers.
Definition at line 20 of file CodeHighlighterMetadata.php.
| MediaWiki\Content\CodeHighlighterMetadata::__construct | ( | protected array | $modules = [], |
| protected array | $moduleStyles = [], | ||
| protected array | $categories = [], | ||
| protected array | $warnings = [] ) |
| string[] | $modules | ResourceLoader modules necessary to render the highlighted code |
| string[] | $moduleStyles | ResourceLoader style modules necessary to render the highlighted code |
| string[] | $categories | Any tracking categories to be added to the output |
| MessageSpecifier[] | $warnings | Any warnings from syntax highlighting |
Definition at line 28 of file CodeHighlighterMetadata.php.
| MediaWiki\Content\CodeHighlighterMetadata::addToOutputPage | ( | OutputPage | $outputPage | ) |
Add this metadata to an OutputPage.
| OutputPage | $outputPage |
Implements MediaWiki\Content\ICodeHighlighterMetadata.
Definition at line 47 of file CodeHighlighterMetadata.php.
| MediaWiki\Content\CodeHighlighterMetadata::addToParserOutput | ( | ParserOutput | $parserOutput | ) |
Add this metadata to a ParserOutput.
| ParserOutput | $parserOutput |
Implements MediaWiki\Content\ICodeHighlighterMetadata.
Definition at line 36 of file CodeHighlighterMetadata.php.
References MediaWiki\Parser\ParserOutput\addCategory().