Manual:Hooks/ParserLogLinterData
From Linux Web Expert
<translate> Tracked in [[<tvar name=1>phabricator:</tvar>|Phabricator]]</translate>
<translate> Task <tvar name=1>T304740</tvar></translate>
<translate> Task <tvar name=1>T304740</tvar></translate>
ParserLogLinterData | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 774563)</tvar></translate> Report lints from Parsoid to the Linter extension | |
<translate> Define function:</translate> | public static function onParserLogLinterData( string $title, int $revId, array $lints ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ParserLogLinterData": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserLogLinterData"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> include/parser/Parsoid/Config/DataAccess.php <translate> Function(s):</translate> logLinterData |
<translate> Interface:</translate> | ParserLogLinterDataHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserLogLinterData extensions</tvar>.</translate>
Parameters
$title
: string representing a page title$revId
: int representing the revision ID of the page being parsed$lints
: array of linting data corresponding to the given revision of the page
Use cases
Currently, Linter uses this extension. The Linter will record the given lint information for the page. If the Linter extension is not installed, then the lints are discarded.
Notes
- This hook was moved from Parsoid to core in Gerrit change 774563.