| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use OldChangesList; |
| 6 | use RecentChange; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "OldChangesListRecentChangesLine" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | */ |
| 15 | interface OldChangesListRecentChangesLineHook { |
| 16 | /** |
| 17 | * Use this hook to customize a recent changes line. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param OldChangesList $changeslist |
| 22 | * @param string &$s HTML of the form `<li>...</li>` containing one RC entry |
| 23 | * @param RecentChange $rc |
| 24 | * @param string[] &$classes Array of CSS classes for the `<li>` element |
| 25 | * @param string[] &$attribs Associative array of other HTML attributes for the `<li>` element. |
| 26 | * Currently only data attributes reserved to MediaWiki are allowed |
| 27 | * (see Sanitizer::isReservedDataAttribute). |
| 28 | * @return bool|void True or no return value to continue, or false to omit the line from |
| 29 | * RecentChanges and Watchlist special pages |
| 30 | */ |
| 31 | public function onOldChangesListRecentChangesLine( $changeslist, &$s, $rc, |
| 32 | &$classes, &$attribs |
| 33 | ); |
| 34 | } |