Manual:Hooks/LocalisationCacheRecache

From Linux Web Expert

LocalisationCacheRecache
<translate> Available from <tvar name=1><translate> version <tvar (r52503, codereview)</tvar></translate>
Called when loading the localisation data into cache
<translate> Define function:</translate>
public static function onLocalisationCacheRecache( $cache, $code, &$alldata, $purgeBlobs ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"LocalisationCacheRecache": "MediaWiki\\Extension\\MyExtension\\Hooks::onLocalisationCacheRecache"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> cache/localisation/LocalisationCache.php
<translate> Function(s):</translate> recache
<translate> Interface:</translate> LocalisationCacheRecacheHook.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:LocalisationCacheRecache extensions</tvar>.</translate>


Details

  • $cache: The LocalisationCache object
  • $code: language code
  • &$alldata: The localisation data from core and extensions
  • &$purgeBlobs: whether to purge/update the message blob via MessageBlobStore::clear()