| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use MediaWiki\Title\Title; |
| 6 | |
| 7 | /** |
| 8 | * This is a hook handler interface, see docs/Hooks.md. |
| 9 | * Use the hook name "ArticleRevisionVisibilitySet" to register handlers implementing this interface. |
| 10 | * |
| 11 | * @stable to implement |
| 12 | * @ingroup Hooks |
| 13 | */ |
| 14 | interface ArticleRevisionVisibilitySetHook { |
| 15 | /** |
| 16 | * This hook is called when changing visibility of one or more |
| 17 | * revisions of an article. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param Title $title Title of the article |
| 22 | * @param int[] $ids IDs to set the visibility for |
| 23 | * @param array $visibilityChangeMap Map of revision ID to oldBits and newBits. |
| 24 | * This array can be examined to determine exactly what visibility bits |
| 25 | * have changed for each revision. This array is of the form: |
| 26 | * [id => ['oldBits' => $oldBits, 'newBits' => $newBits], ... ] |
| 27 | * @return bool|void True or no return value to continue or false to abort |
| 28 | */ |
| 29 | public function onArticleRevisionVisibilitySet( $title, $ids, |
| 30 | $visibilityChangeMap |
| 31 | ); |
| 32 | } |