| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Output\Hook; |
| 4 | |
| 5 | use MediaWiki\Output\OutputPage; |
| 6 | |
| 7 | /** |
| 8 | * This is a hook handler interface, see docs/Hooks.md. |
| 9 | * Use the hook name "OutputPageMakeCategoryLinks" to register handlers implementing this interface. |
| 10 | * |
| 11 | * @deprecated since 1.43, use OutputPageRenderCategoryLinkHook instead. |
| 12 | * @ingroup Hooks |
| 13 | */ |
| 14 | interface OutputPageMakeCategoryLinksHook { |
| 15 | /** |
| 16 | * This hook is called when links are about to be generated for the page's categories. |
| 17 | * |
| 18 | * @since 1.35 |
| 19 | * |
| 20 | * @param OutputPage $out |
| 21 | * @param string[] $categories Associative array in which keys are category names and |
| 22 | * values are category types ("normal" or "hidden") |
| 23 | * @param array &$links Intended to hold the result. Associative array with |
| 24 | * category types as keys and arrays of HTML links as values. |
| 25 | * @return bool|void True or no return value to continue. Implementations should return |
| 26 | * false if they generate the category links, so the default link generation is skipped. |
| 27 | */ |
| 28 | public function onOutputPageMakeCategoryLinks( $out, $categories, &$links ); |
| 29 | } |
| 30 | |
| 31 | /** @deprecated class alias since 1.42 */ |
| 32 | class_alias( OutputPageMakeCategoryLinksHook::class, 'MediaWiki\Hook\OutputPageMakeCategoryLinksHook' ); |