Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\WikibaseContentLanguages Class Reference

A collection of ContentLanguages objects for different contexts. More...

Public Member Functions

 __construct (array $contentLanguages)
 
 getContexts ()
 
 getContentLanguages ( $context)
 

Static Public Member Functions

static getDefaultInstance (HookContainer $hookContainer=null, LanguageNameUtils $languageNameUtils=null)
 
static getDefaultTermsLanguages (LanguageNameUtils $languageNameUtils=null)
 
static getDefaultMonolingualTextLanguages (LanguageNameUtils $languageNameUtils=null)
 

Public Attributes

const CONTEXT_TERM = 'term'
 
const CONTEXT_MONOLINGUAL_TEXT = 'monolingualtext'
 

Private Attributes

 $contentLanguages
 

Detailed Description

A collection of ContentLanguages objects for different contexts.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\WikibaseContentLanguages::__construct ( array $contentLanguages)

Member Function Documentation

◆ getContentLanguages()

Wikibase\Lib\WikibaseContentLanguages::getContentLanguages ( $context)
Parameters
string$context'term', 'monolingualtext', …
Returns
ContentLanguages
Exceptions
OutOfRangeExceptionif the $context is unknown

◆ getContexts()

Wikibase\Lib\WikibaseContentLanguages::getContexts ( )
Returns
string[]

◆ getDefaultInstance()

static Wikibase\Lib\WikibaseContentLanguages::getDefaultInstance ( HookContainer $hookContainer = null,
LanguageNameUtils $languageNameUtils = null )
static

◆ getDefaultMonolingualTextLanguages()

static Wikibase\Lib\WikibaseContentLanguages::getDefaultMonolingualTextLanguages ( LanguageNameUtils $languageNameUtils = null)
static

◆ getDefaultTermsLanguages()

static Wikibase\Lib\WikibaseContentLanguages::getDefaultTermsLanguages ( LanguageNameUtils $languageNameUtils = null)
static

Member Data Documentation

◆ $contentLanguages

Wikibase\Lib\WikibaseContentLanguages::$contentLanguages
private

◆ CONTEXT_MONOLINGUAL_TEXT

const Wikibase\Lib\WikibaseContentLanguages::CONTEXT_MONOLINGUAL_TEXT = 'monolingualtext'

◆ CONTEXT_TERM

const Wikibase\Lib\WikibaseContentLanguages::CONTEXT_TERM = 'term'

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