MediaWiki master
MediaWiki\Api\Hook\ApiFeedContributions__feedItemHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\Api\ApiHookRunner.

Public Member Functions

 onApiFeedContributions__feedItem ( $row, $context, &$feedItem)
 Use this hook to convert the result of ContribsPager into a MediaWiki\Feed\FeedItem instance that ApiFeedContributions can consume.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ApiFeedContributions::feedItem" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 16 of file ApiFeedContributions__feedItemHook.php.

Member Function Documentation

◆ onApiFeedContributions__feedItem()

MediaWiki\Api\Hook\ApiFeedContributions__feedItemHook::onApiFeedContributions__feedItem (   $row,
  $context,
$feedItem 
)

Use this hook to convert the result of ContribsPager into a MediaWiki\Feed\FeedItem instance that ApiFeedContributions can consume.

Implementors of this hook may cancel the hook to signal that the item is not viewable in the provided context.

Parameters
stdClass$rowA row of data from ContribsPager. The set of data returned by ContribsPager can be adjusted by handling the ContribsPager::reallyDoQuery hook.
IContextSource$context
\\MediaWiki\\Feed\\FeedItem | null&$feedItemSet this to a FeedItem instance if the callback can handle the provided row. This is provided to the hook as a null, if it is non-null then another callback has already handled the hook.
Returns
bool|void True or no return value to continue or false to abort
Since
1.35

Implemented in MediaWiki\Api\ApiHookRunner.


The documentation for this interface was generated from the following file: