- Copyright
- GPL-2.0-or-later
- Author
- Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
-
Daniel Kinzler
◆ __construct()
Wikibase\Client\RecentChanges\ExternalChangeFactory::__construct |
( |
|
$repoSiteId, |
|
|
Language |
$summaryLanguage, |
|
|
EntityIdParser |
$idParser |
|
) |
| |
- Parameters
-
string | $repoSiteId | |
Language | $summaryLanguage | Language to use when generating edit summaries |
EntityIdParser | $idParser | |
◆ countCompositeComments()
Wikibase\Client\RecentChanges\ExternalChangeFactory::countCompositeComments |
( |
array |
$comments | ) |
|
|
private |
normalizes for extra empty comment in rc_params (see bug T47812)
- Parameters
-
- Returns
- int
◆ extractChangeData()
Wikibase\Client\RecentChanges\ExternalChangeFactory::extractChangeData |
( |
array |
$rc_params | ) |
|
|
private |
- Parameters
-
- Exceptions
-
- Returns
- array
◆ extractChangeType()
Wikibase\Client\RecentChanges\ExternalChangeFactory::extractChangeType |
( |
|
$type | ) |
|
|
private |
◆ extractEntityId()
Wikibase\Client\RecentChanges\ExternalChangeFactory::extractEntityId |
( |
|
$prefixedId | ) |
|
|
private |
- Parameters
-
- Exceptions
-
- Returns
- EntityId
◆ formatComment()
Wikibase\Client\RecentChanges\ExternalChangeFactory::formatComment |
( |
array |
$comment | ) |
|
|
private |
◆ generateComment()
Wikibase\Client\RecentChanges\ExternalChangeFactory::generateComment |
( |
array |
$changeParams | ) |
|
|
private |
◆ newFromRecentChange()
Wikibase\Client\RecentChanges\ExternalChangeFactory::newFromRecentChange |
( |
RecentChange |
$recentChange | ) |
|
◆ newRevisionData()
Wikibase\Client\RecentChanges\ExternalChangeFactory::newRevisionData |
( |
RecentChange |
$recentChange, |
|
|
array |
$changeParams, |
|
|
|
$commentHtml = null |
|
) |
| |
|
private |
- Parameters
-
RecentChange | $recentChange | |
array | $changeParams | |
string | null | $commentHtml | Pre-formatted comment HTML |
- Returns
- RevisionData
◆ parseAutoComment()
Wikibase\Client\RecentChanges\ExternalChangeFactory::parseAutoComment |
( |
|
$comment, |
|
|
|
$type |
|
) |
| |
|
private |
This method transforms the comments field into rc_params into an appropriate comment value for ExternalChange.
$comment can be a string or an array with some additional data.
String comments are either 'wikibase-comment-update' (legacy) or have comments from the repo, such as '/ wbsetclaim-update:2||1 / [[Property:P213]]: [[Q850]]'.
We don't yet parse repo comments in the client, so for now, we use the generic 'wikibase-comment-update' for these.
Comment arrays may contain a message key that provide autocomments for stuff like log actions (item deletion) or edits that have no meaningful summary to use in the client.
- 'wikibase-comment-unlinked' (when the sitelink to the given page is removed on the repo)
- 'wikibase-comment-add' (when the item is created, with sitelink to the given page)
- 'wikibase-comment-remove' (when the item is deleted, the page becomes unconnected)
- 'wikibase-comment-restore' (when the item is undeleted and reconnected to the page)
- 'wikibase-comment-sitelink-add' (and other sitelink messages, unused)
- 'wikibase-comment-update' (legacy, generic, item updated commment)
- Parameters
-
array | string | $comment | |
string | $type | |
- Returns
- array
◆ validateChangeData()
Wikibase\Client\RecentChanges\ExternalChangeFactory::validateChangeData |
( |
|
$changeParams | ) |
|
|
private |
- Parameters
-
- Exceptions
-
- Returns
- bool
◆ $idParser
Wikibase\Client\RecentChanges\ExternalChangeFactory::$idParser |
|
private |
◆ $repoSiteId
Wikibase\Client\RecentChanges\ExternalChangeFactory::$repoSiteId |
|
private |
◆ $summaryLanguage
Wikibase\Client\RecentChanges\ExternalChangeFactory::$summaryLanguage |
|
private |
The documentation for this class was generated from the following file: