| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use EnhancedChangesList; |
| 6 | use RecentChange; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "EnhancedChangesListModifyLineData" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface EnhancedChangesListModifyLineDataHook { |
| 16 | /** |
| 17 | * Use this hook to alter data used to build a grouped recent change inner line in |
| 18 | * EnhancedChangesList. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param EnhancedChangesList $changesList |
| 23 | * @param array &$data Array of components that will be joined in order to create the line |
| 24 | * @param RecentChange[] $block Array of RecentChange objects in that block |
| 25 | * @param RecentChange $rc RecentChange object for this line |
| 26 | * @param string[] &$classes Array of classes to change |
| 27 | * @param string[] &$attribs Associative array of other HTML attributes for the `<tr>` element. |
| 28 | * Currently only data attributes reserved to MediaWiki are allowed |
| 29 | * (see Sanitizer::isReservedDataAttribute). |
| 30 | * @return bool|void True or no return value to continue, or false to omit this line from |
| 31 | * recentchanges |
| 32 | */ |
| 33 | public function onEnhancedChangesListModifyLineData( $changesList, &$data, |
| 34 | $block, $rc, &$classes, &$attribs |
| 35 | ); |
| 36 | } |