Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Modules\CurrentSiteModule Class Reference
+ Inheritance diagram for Wikibase\Lib\Modules\CurrentSiteModule:
+ Collaboration diagram for Wikibase\Lib\Modules\CurrentSiteModule:

Public Member Functions

 __construct (?SettingsArray $clientSettings, ?SettingsArray $repoSettings, SiteLookup $siteLookup, BagOStuff $cache, LanguageNameLookupFactory $languageNameLookupFactory)
 
 getScript (RL\Context $context)
 Used to propagate information about sites to JavaScript.
 
- Public Member Functions inherited from Wikibase\Lib\Modules\SitesModuleBase
 __construct (?SettingsArray $clientSettings, ?SettingsArray $repoSettings, LanguageNameLookupFactory $languageNameLookupFactory)
 
 enableModuleContentVersion ()
 
 getSetting (string $settingName)
 Get a setting from the repo or client settings, with repo overriding client.
 
 computeSiteDetails (MediaWikiSite $site, array $specialGroups, MessageLocalizer $localizer)
 

Protected Member Functions

 makeScript (MessageLocalizer $localizer)
 

Private Attributes

const SITE_DETAILS_TTL = 3600
 How many seconds the result of getSiteDetails() is cached.
 
 $siteLookup
 
 $cache
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Modules\CurrentSiteModule::__construct ( ?SettingsArray $clientSettings,
?SettingsArray $repoSettings,
SiteLookup $siteLookup,
BagOStuff $cache,
LanguageNameLookupFactory $languageNameLookupFactory )
Parameters
SettingsArray | null$clientSettingsThe Client settings, if Client is enabled, else null.
SettingsArray | null$repoSettingsThe Repo settings, if Repo is enabled, else null.
SiteLookup$siteLookup
BagOStuff$cache
LanguageNameLookupFactory$languageNameLookupFactory

Member Function Documentation

◆ getScript()

Wikibase\Lib\Modules\CurrentSiteModule::getScript ( RL\Context $context)

Used to propagate information about sites to JavaScript.

Sites infos will be available in 'wbCurrentSiteDetails' config var.

See also
RL\Module::getScript
Parameters
RL\Context$context
Returns
string JavaScript Code

◆ makeScript()

Wikibase\Lib\Modules\CurrentSiteModule::makeScript ( MessageLocalizer $localizer)
protected
Parameters
MessageLocalizer$localizer
Returns
string JavaScript Code

Reimplemented from Wikibase\Lib\Modules\SitesModuleBase.

Member Data Documentation

◆ $cache

Wikibase\Lib\Modules\CurrentSiteModule::$cache
private

◆ $siteLookup

Wikibase\Lib\Modules\CurrentSiteModule::$siteLookup
private

◆ SITE_DETAILS_TTL

const Wikibase\Lib\Modules\CurrentSiteModule::SITE_DETAILS_TTL = 3600
private

How many seconds the result of getSiteDetails() is cached.


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