| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Html\FormOptions; |
| 6 | use MediaWiki\Pager\NewPagesPager; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "SpecialNewpagesConditions" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface SpecialNewpagesConditionsHook { |
| 16 | /** |
| 17 | * This hook is called when building the SQL query for Special:NewPages. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param NewPagesPager $special NewPagesPager object (subclass of ReverseChronologicalPager) |
| 22 | * @param FormOptions $opts FormOptions object containing special page options |
| 23 | * @param array &$conds array of WHERE conditionals for query |
| 24 | * @param array &$tables array of tables to be queried |
| 25 | * @param array &$fields array of columns to select |
| 26 | * @param array &$join_conds join conditions for the tables |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onSpecialNewpagesConditions( $special, $opts, &$conds, |
| 30 | &$tables, &$fields, &$join_conds |
| 31 | ); |
| 32 | } |