Manual:Hooks/Collation::factory
From MediaWiki.org
| Collation::factory | |
|---|---|
| Available from version 1.18.0 (r91436) Called if Collation::factory cannot find what class implements a collation. |
|
Define function: |
public static function onCollation::factory( $categoryName, &$categoryObj ) { ... }
|
Attach hook: |
$wgHooks['Collation::factory'][] = 'MyExtensionHooks::onCollation::factory'; |
| Called from: | Collation.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:Collation::factory extensions.
[edit] Details
- $categoryName: A (string) name of the collation requested. What would go in $wgCategoryCollation
- &$categoryObj: Replace this with an instance of a Collation class that corresponds to $categoryName, if your extension supports the collation given in $categoryName.
[edit] Notes
- $collationObj must be a subclass of the Collation class in order to be used.