Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/ApiFeedContributions::feedItem

From mediawiki.org
<Manual:Hooks
ApiFeedContributions::feedItem
Available fromversion 1.25.0 (r185062,CodeReview archive)
Called to convert the result of ContribsPager into a FeedItem instance that ApiFeedContributions can consume.
Define function:
publicstaticfunctiononApiFeedContributions_feedItem(stdClass$row,IContextSource$context,FeedItem&$feedItem){...}
Attach hook:Inextension.json:
{"Hooks":{"ApiFeedContributions::feedItem":"MediaWiki\\Extension\\MyExtension\\Hooks::onApiFeedContributionsfeedItem"}}
Called from:File(s):api/ApiFeedContributions.php
Interface:ApiFeedContributions__feedItemHook.php

For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:ApiFeedContributions::feedItem extensions.


Details

[edit]
  • $row: A row of data from ContribsPager. The set of data returned by ContribsPager can be adjusted by handling theContribsPager::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.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/ApiFeedContributions::feedItem&oldid=4043060"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp