| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use Wikimedia\Rdbms\IResultWrapper; |
| 6 | |
| 7 | // phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "CategoryViewer::doCategoryQuery" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface CategoryViewer__doCategoryQueryHook { |
| 16 | /** |
| 17 | * This hook is called after querying for pages to be displayed in a Category page. |
| 18 | * Use this hook to batch load any related data about the pages. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param string $type Category type, either 'page', 'file', or 'subcat' |
| 23 | * @param IResultWrapper $res Query result from Wikimedia\Rdbms\IDatabase::select() |
| 24 | * @return bool|void True or no return value to continue or false to abort |
| 25 | */ |
| 26 | public function onCategoryViewer__doCategoryQuery( $type, $res ); |
| 27 | } |