Class for generating views of DiffOp objects representing diffs of an Item’s site links (including badges).
More...
|
| __construct (array $path, Diff $diff, SiteLookup $siteLookup, EntityIdFormatter $entityIdFormatter, MessageLocalizer $messageLocalizer) |
|
| getHtml () |
| Builds and returns the HTML to represent the Diff.
|
|
|
| generateOpHtml (array $path, DiffOp $op) |
| Does the actual work.
|
|
| generateHtmlDiffTableRow (?string $oldHtml, ?string $newHtml) |
| Generates an HTML table row for a change diffOp given HTML snippets representing old and new sides of the Diff.
|
|
| generateDiffHeaderHtml (string $name) |
| Generates HTML for the header of the diff operation.
|
|
Class for generating views of DiffOp objects representing diffs of an Item’s site links (including badges).
Diffing of other Item data is done by BasicDiffView
.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Repo\Diff\SiteLinkDiffView::__construct |
( |
array | $path, |
|
|
Diff | $diff, |
|
|
SiteLookup | $siteLookup, |
|
|
EntityIdFormatter | $entityIdFormatter, |
|
|
MessageLocalizer | $messageLocalizer ) |
- Parameters
-
string[] | $path | |
Diff | $diff | |
SiteLookup | $siteLookup | |
EntityIdFormatter | $entityIdFormatter | that must return only HTML! otherwise injections might be possible |
MessageLocalizer | $messageLocalizer | |
◆ generateBadgeDiffOpHtml()
Wikibase\Repo\Diff\SiteLinkDiffView::generateBadgeDiffOpHtml |
( |
AtomicDiffOp | $op | ) |
|
|
private |
◆ generateDiffHeaderHtml()
Wikibase\Repo\Diff\SiteLinkDiffView::generateDiffHeaderHtml |
( |
string | $name | ) |
|
|
protected |
Generates HTML for the header of the diff operation.
◆ generateDiffOpHtml()
Wikibase\Repo\Diff\SiteLinkDiffView::generateDiffOpHtml |
( |
array | $path, |
|
|
AtomicDiffOp | $op ) |
|
private |
◆ generateHtmlDiffTableRow()
Wikibase\Repo\Diff\SiteLinkDiffView::generateHtmlDiffTableRow |
( |
?string | $oldHtml, |
|
|
?string | $newHtml ) |
|
protected |
Generates an HTML table row for a change diffOp given HTML snippets representing old and new sides of the Diff.
◆ generateLinkDiffOpHtml()
Wikibase\Repo\Diff\SiteLinkDiffView::generateLinkDiffOpHtml |
( |
string | $siteId, |
|
|
AtomicDiffOp | $op ) |
|
private |
◆ generateOpHtml()
Wikibase\Repo\Diff\SiteLinkDiffView::generateOpHtml |
( |
array | $path, |
|
|
DiffOp | $op ) |
|
protected |
Does the actual work.
- Parameters
-
- Returns
- string
◆ getAddedLine()
Wikibase\Repo\Diff\SiteLinkDiffView::getAddedLine |
( |
string | $html | ) |
|
|
private |
◆ getBadgeLinkElement()
Wikibase\Repo\Diff\SiteLinkDiffView::getBadgeLinkElement |
( |
string | $idString | ) |
|
|
private |
- Parameters
-
- Returns
- string HTML
◆ getChangedLine()
Wikibase\Repo\Diff\SiteLinkDiffView::getChangedLine |
( |
string | $tag, |
|
|
string | $html ) |
|
private |
◆ getDeletedLine()
Wikibase\Repo\Diff\SiteLinkDiffView::getDeletedLine |
( |
string | $html | ) |
|
|
private |
◆ getHtml()
Wikibase\Repo\Diff\SiteLinkDiffView::getHtml |
( |
| ) |
|
◆ getSiteLinkElement()
Wikibase\Repo\Diff\SiteLinkDiffView::getSiteLinkElement |
( |
string | $siteId, |
|
|
string | $pageName, |
|
|
string | $html = null ) |
|
private |
- Parameters
-
string | $siteId | |
string | $pageName | |
string | null | $html | Defaults to $pageName (HTML-escaped) |
- Returns
- string
◆ $diff
Wikibase\Repo\Diff\SiteLinkDiffView::$diff |
|
private |
◆ $entityIdFormatter
Wikibase\Repo\Diff\SiteLinkDiffView::$entityIdFormatter |
|
private |
◆ $messageLocalizer
Wikibase\Repo\Diff\SiteLinkDiffView::$messageLocalizer |
|
private |
◆ $path
Wikibase\Repo\Diff\SiteLinkDiffView::$path |
|
private |
◆ $siteLookup
Wikibase\Repo\Diff\SiteLinkDiffView::$siteLookup |
|
private |
The documentation for this class was generated from the following file: