Manual:Hooks/ApiFeedContributions::feedItem

ApiFeedContributions::feedItem
Available from version 1.25.0 (r185062)
Called to convert the result of ContribsPager into a FeedItem instance that ApiFeedContributions can consume.
Define function:
public static function onApiFeedContributions_feedItem( stdClass $row, IContextSource $context, FeedItem &$feedItem ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ApiFeedContributions::feedItem": "MyExtensionHooks::onApiFeedContributionsfeedItem"
	}
}
Called from:File(s): api/ApiFeedContributions.php
Interface:ApiFeedContributions__feedItemHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ApiFeedContributions::feedItem extensions.

DetailsEdit

  • $row: A row of data from ContribsPager. The set of data returned by ContribsPager can be adjusted by handling the ContribsPager::reallyDoQuery hook.
  • $context: an IContextSource instance
  • &$feedItem: Set 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.