Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Hooks\NoLangLinkHandler Class Reference

Handles the NOEXTERNALLANGLINKS parser function. More...

Public Member Functions

 __construct (NamespaceChecker $namespaceChecker)
 
 doHandle (Parser $parser, array $langs)
 Parser function.
 

Static Public Member Functions

static handle (Parser $parser,... $langs)
 Parser function.
 
static getNoExternalLangLinks (ParserOutput $parserOutput)
 Get the noexternallanglinks data from the ParserOutput, which is set by the {{#noexternallanglinks}} parser function.
 
static appendNoExternalLangLinks (ParserOutput $parserOutput, array $noexternallanglinks)
 Append new languages to the noexternallanglinks data in the ParserOutput, which is set by the {{#noexternallanglinks}} parser function.
 

Public Attributes

const EXTENSION_DATA_KEY = 'wikibase-noexternallanglinks'
 

Static Private Member Functions

static factory ()
 

Private Attributes

 $namespaceChecker
 

Detailed Description

Handles the NOEXTERNALLANGLINKS parser function.

Author
Nikola Smolenski smole.nosp@m.nsk@.nosp@m.eunet.nosp@m..rs
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Hooks\NoLangLinkHandler::__construct ( NamespaceChecker  $namespaceChecker)

Member Function Documentation

◆ appendNoExternalLangLinks()

static Wikibase\Client\Hooks\NoLangLinkHandler::appendNoExternalLangLinks ( ParserOutput  $parserOutput,
array  $noexternallanglinks 
)
static

Append new languages to the noexternallanglinks data in the ParserOutput, which is set by the {{#noexternallanglinks}} parser function.

Parameters
ParserOutput$parserOutput
string[]$noexternallanglinksa list of languages to suppress

◆ doHandle()

Wikibase\Client\Hooks\NoLangLinkHandler::doHandle ( Parser  $parser,
array  $langs 
)

Parser function.

Parameters
Parser$parser
string[]$langs
Returns
string

◆ factory()

static Wikibase\Client\Hooks\NoLangLinkHandler::factory ( )
staticprivate

◆ getNoExternalLangLinks()

static Wikibase\Client\Hooks\NoLangLinkHandler::getNoExternalLangLinks ( ParserOutput  $parserOutput)
static

Get the noexternallanglinks data from the ParserOutput, which is set by the {{#noexternallanglinks}} parser function.

Parameters
ParserOutput$parserOutput
Returns
string[] A list of language codes, identifying which repository links to ignore. Empty if {{#noexternallanglinks}} was not used on the page.

◆ handle()

static Wikibase\Client\Hooks\NoLangLinkHandler::handle ( Parser  $parser,
  $langs 
)
static

Parser function.

Parameters
Parser$parser
string...$langs Language codes or '*'

Member Data Documentation

◆ $namespaceChecker

Wikibase\Client\Hooks\NoLangLinkHandler::$namespaceChecker
private

◆ EXTENSION_DATA_KEY

const Wikibase\Client\Hooks\NoLangLinkHandler::EXTENSION_DATA_KEY = 'wikibase-noexternallanglinks'

The documentation for this class was generated from the following file: