< Manual:Hooks
Collation::factory
Available from version 1.18.0 (r91436, codereview)
Called if Collation::factory cannot find what class implements a collation.
Define function:
public static function onCollation_factory( $categoryName, &$categoryObj ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"Collation::factory": "MyExtensionHooks::onCollationfactory"
	}
}
Called from: File(s): collation/Collation.php
Interface: Collation__factoryHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:Collation::factory extensions.

Details

  • $collationName: A (string) name of the collation requested. What would go in $wgCategoryCollation
  • &$collationObj: Replace this with an instance of a Collation class that corresponds to $collationName, if your extension supports the collation given in $collationName.

Notes

  • $collationObj must be a subclass of the Collation class in order to be used.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.