This class has a static interface for use with MediaWiki's hook mechanism; the static handler functions will create a new instance of UpdateRepoHookHandlers and then call the corresponding member function on that.
More...
|
| __construct (NamespaceChecker $namespaceChecker, JobQueueGroupFactory $jobQueueGroupFactory, DatabaseEntitySource $entitySource, SiteLinkLookup $siteLinkLookup, LoggerInterface $logger, ClientDomainDb $clientDb, string $siteGlobalID, bool $propagateChangesToRepo) |
|
| onArticleDeleteComplete ( $wikiPage, $user, $reason, $id, $content, $logEntry, $archivedRevisionCount) |
| After a page has been deleted also update the item on the repo.
|
|
| onPageMoveComplete ( $oldLinkTarget, $newLinkTarget, $userIdentity, $pageId, $redirid, $reason, $revisionRecord) |
| After a page has been moved also update the item on the repo.
|
|
|
| isWikibaseEnabled (int $namespace) |
|
| makeDelete (UserIdentity $user, LinkTarget $title) |
|
| makeMove (UserIdentity $user, LinkTarget $old, Linktarget $new) |
|
| applyUpdateRepo (UpdateRepo $updateRepo, LinkTarget $title, string $titleProperty=null) |
| Push the $updateRepo to the job queue if applicable, and if successful, set the $titleProperty on the $title.
|
|
This class has a static interface for use with MediaWiki's hook mechanism; the static handler functions will create a new instance of UpdateRepoHookHandlers and then call the corresponding member function on that.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
◆ __construct()
◆ applyUpdateRepo()
Wikibase\Client\Hooks\UpdateRepoHookHandler::applyUpdateRepo |
( |
UpdateRepo | $updateRepo, |
|
|
LinkTarget | $title, |
|
|
string | $titleProperty = null ) |
|
private |
Push the $updateRepo to the job queue if applicable, and if successful, set the $titleProperty on the $title.
Hook handlers later look at this property in an attempt to determine whether the update was successfully applied/enqueued or not.
◆ factory()
◆ isWikibaseEnabled()
Wikibase\Client\Hooks\UpdateRepoHookHandler::isWikibaseEnabled |
( |
int | $namespace | ) |
|
|
private |
- See also
- NamespaceChecker::isWikibaseEnabled
◆ makeDelete()
Wikibase\Client\Hooks\UpdateRepoHookHandler::makeDelete |
( |
UserIdentity | $user, |
|
|
LinkTarget | $title ) |
|
private |
◆ makeMove()
Wikibase\Client\Hooks\UpdateRepoHookHandler::makeMove |
( |
UserIdentity | $user, |
|
|
LinkTarget | $old, |
|
|
Linktarget | $new ) |
|
private |
◆ onArticleDeleteComplete()
Wikibase\Client\Hooks\UpdateRepoHookHandler::onArticleDeleteComplete |
( |
| $wikiPage, |
|
|
| $user, |
|
|
| $reason, |
|
|
| $id, |
|
|
| $content, |
|
|
| $logEntry, |
|
|
| $archivedRevisionCount ) |
After a page has been deleted also update the item on the repo.
This only works if there's a user account with the same name on the repo.
- See also
- https://www.mediawiki.org/wiki/Manual:Hooks/ArticleDeleteComplete
- Parameters
-
WikiPage | $wikiPage | WikiPage that was deleted |
User | $user | User that deleted the article |
string | $reason | Reason the article was deleted |
int | $id | ID of the article that was deleted |
Content | null | $content | Content of the deleted page (or null, when deleting a broken page) |
\ManualLogEntry | $logEntry | ManualLogEntry used to record the deletion |
int | $archivedRevisionCount | Number of revisions archived during the deletion |
- Returns
- bool|void True or no return value to continue or false to abort
◆ onPageMoveComplete()
Wikibase\Client\Hooks\UpdateRepoHookHandler::onPageMoveComplete |
( |
| $oldLinkTarget, |
|
|
| $newLinkTarget, |
|
|
| $userIdentity, |
|
|
| $pageId, |
|
|
| $redirid, |
|
|
| $reason, |
|
|
| $revisionRecord ) |
After a page has been moved also update the item on the repo.
This only works if there's a user account with the same name on the repo.
- See also
- https://www.mediawiki.org/wiki/Manual:Hooks/PageMoveComplete
- Parameters
-
LinkTarget | $oldLinkTarget | |
LinkTarget | $newLinkTarget | |
UserIdentity | $userIdentity | |
int | $pageId | database ID of the page that's been moved |
int | $redirid | ID of the created redirect |
string | $reason | |
RevisionRecord | $revisionRecord | revision created by the move |
- Returns
- bool
◆ $clientDb
◆ $entitySource
◆ $jobQueueGroupFactory
JobQueueGroupFactory Wikibase\Client\Hooks\UpdateRepoHookHandler::$jobQueueGroupFactory |
|
private |
◆ $logger
LoggerInterface Wikibase\Client\Hooks\UpdateRepoHookHandler::$logger |
|
private |
◆ $namespaceChecker
◆ $propagateChangesToRepo
bool Wikibase\Client\Hooks\UpdateRepoHookHandler::$propagateChangesToRepo |
|
private |
◆ $siteGlobalID
string Wikibase\Client\Hooks\UpdateRepoHookHandler::$siteGlobalID |
|
private |
◆ $siteLinkLookup
SiteLinkLookup Wikibase\Client\Hooks\UpdateRepoHookHandler::$siteLinkLookup |
|
private |
The documentation for this class was generated from the following file: