Wikibase
MediaWiki Wikibase extension
|
Class for generating HTML for Claim Diffs. More...
Public Member Functions | |
__construct (DifferencesSnakVisualizer $snakVisualizer, $languageCode) | |
visualizeClaimChange (ClaimDifference $claimDifference, Statement $baseStatement, array $path=[]) | |
Generates HTML of a statement change. More... | |
visualizeNewClaim (Statement $statement, array $path=[]) | |
Get diff html for a new claim. More... | |
visualizeRemovedClaim (Statement $statement, array $path=[]) | |
Get diff html for a removed claim. More... | |
Private Member Functions | |
visualizeMainSnakChange ( $headerPrefix, DiffOpChange $mainSnakChange, Snak $oldestMainSnak, Snak $newestMainSnak) | |
visualizeRankChange ( $headerPrefix, DiffOpChange $rankChange, Snak $oldestMainSnak, Snak $newestMainSnak) | |
getRankHtml ( $rank) | |
visualizeReferenceChanges ( $headerPrefix, Diff $changes, Snak $oldestMainSnak, Snak $newestMainSnak) | |
visualizeSnaks (SnakList $snaks) | |
visualizeQualifierChanges ( $headerPrefix, Diff $changes, Snak $oldestMainSnak, Snak $newestMainSnak) | |
Private Attributes | |
$snakVisualizer | |
$languageCode | |
Class for generating HTML for Claim Diffs.
Wikibase\Repo\Diff\ClaimDifferenceVisualizer::__construct | ( | DifferencesSnakVisualizer | $snakVisualizer, |
$languageCode | |||
) |
DifferencesSnakVisualizer | $snakVisualizer | |
string | $languageCode |
|
private |
string | int | null | $rank |
Wikibase\Repo\Diff\ClaimDifferenceVisualizer::visualizeClaimChange | ( | ClaimDifference | $claimDifference, |
Statement | $baseStatement, | ||
array | $path = [] |
||
) |
Generates HTML of a statement change.
ClaimDifference | $claimDifference | |
Statement | $baseStatement | The new statement, if it exists. Otherwise the old statement. |
string[] | $path | The path to prepend in the header |
|
private |
string | $headerPrefix | |
DiffOpChange | $mainSnakChange | |
Snak | $oldestMainSnak | The old main snak, if present; otherwise, the new main snak |
Snak | $newestMainSnak | The new main snak, if present; otherwise, the old main snak |
Wikibase\Repo\Diff\ClaimDifferenceVisualizer::visualizeNewClaim | ( | Statement | $statement, |
array | $path = [] |
||
) |
Get diff html for a new claim.
Statement | $statement | |
string[] | $path | The path to prepend in the header |
|
private |
string | $headerPrefix | |
Diff | $changes | |
Snak | $oldestMainSnak | The old main snak, if present; otherwise, the new main snak |
Snak | $newestMainSnak | The new main snak, if present; otherwise, the old main snak |
|
private |
string | $headerPrefix | |
DiffOpChange | $rankChange | |
Snak | $oldestMainSnak | The old main snak, if present; otherwise, the new main snak |
Snak | $newestMainSnak | The new main snak, if present; otherwise, the old main snak |
|
private |
string | $headerPrefix | |
Diff | $changes | |
Snak | $oldestMainSnak | The old main snak, if present; otherwise, the new main snak |
Snak | $newestMainSnak | The new main snak, if present; otherwise, the old main snak |
Wikibase\Repo\Diff\ClaimDifferenceVisualizer::visualizeRemovedClaim | ( | Statement | $statement, |
array | $path = [] |
||
) |
Get diff html for a removed claim.
Statement | $statement | |
string[] | $path | The path to prepend in the header |
|
private |
SnakList | $snaks |
|
private |
|
private |