Manual:Hooks/LocalisationCacheRecacheFallback
From Linux Web Expert
LocalisationCacheRecacheFallback | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 158146)</tvar></translate> Called for each language when merging fallback data into the cache. | |
<translate> Define function:</translate> | public static function onLocalisationCacheRecacheFallback( $cache, $code, &$alldata ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"LocalisationCacheRecacheFallback": "MediaWiki\\Extension\\MyExtension\\Hooks::onLocalisationCacheRecacheFallback"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> cache/localisation/LocalisationCache.php <translate> Function(s):</translate> recache |
<translate> Interface:</translate> | LocalisationCacheRecacheFallbackHook.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:LocalisationCacheRecacheFallback extensions</tvar>.</translate>
Details
$cache
: The LocalisationCache object$code
: language code&$alldata
: The localisation data from core and extensions. Note some keys may be omitted if they won't be merged into the final result.