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, TitleFactory $titleFactory, DatabaseEntitySource $entitySource, SiteLinkLookup $siteLinkLookup, LoggerInterface $logger, ClientDomainDb $clientDb, string $siteGlobalID, bool $propagateChangesToRepo) |
| |
| | onPageDeleteComplete (ProperPageIdentity $page, Authority $deleter, string $reason, int $pageID, RevisionRecord $deletedRev, ManualLogEntry $logEntry, int $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.
|
| |
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()
| Wikibase\Client\Hooks\UpdateRepoHookHandler::__construct |
( |
NamespaceChecker | $namespaceChecker, |
|
|
JobQueueGroupFactory | $jobQueueGroupFactory, |
|
|
TitleFactory | $titleFactory, |
|
|
DatabaseEntitySource | $entitySource, |
|
|
SiteLinkLookup | $siteLinkLookup, |
|
|
LoggerInterface | $logger, |
|
|
ClientDomainDb | $clientDb, |
|
|
string | $siteGlobalID, |
|
|
bool | $propagateChangesToRepo ) |
◆ applyUpdateRepo()
| Wikibase\Client\Hooks\UpdateRepoHookHandler::applyUpdateRepo |
( |
UpdateRepo | $updateRepo | ) |
|
|
private |
Push the $updateRepo to the job queue if applicable.
◆ 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 |
◆ onPageDeleteComplete()
| Wikibase\Client\Hooks\UpdateRepoHookHandler::onPageDeleteComplete |
( |
ProperPageIdentity | $page, |
|
|
Authority | $deleter, |
|
|
string | $reason, |
|
|
int | $pageID, |
|
|
RevisionRecord | $deletedRev, |
|
|
ManualLogEntry | $logEntry, |
|
|
int | $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/PageDeleteComplete
- Parameters
-
| ProperPageIdentity | $page | Page that was deleted. This object represents state before deletion (e.g. $page->exists() will return true). |
| Authority | $deleter | Who deleted the page |
| string | $reason | Reason the page was deleted |
| int | $pageID | ID of the page that was deleted |
| RevisionRecord | $deletedRev | Last revision of the deleted page |
| ManualLogEntry | $logEntry | ManualLogEntry used to record the deletion |
| int | $archivedRevisionCount | Number of revisions archived during the deletion |
- Returns
- true|void
◆ 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 |
◆ $titleFactory
| TitleFactory Wikibase\Client\Hooks\UpdateRepoHookHandler::$titleFactory |
|
private |
The documentation for this class was generated from the following file: