MediaWiki  1.34.0
ChangeTagsRevisionItem.php
Go to the documentation of this file.
1 <?php
30  public function getTags() {
31  return $this->row->ts_tags;
32  }
33 
38  public function getHTML() {
39  $difflink = $this->list->msg( 'parentheses' )
40  ->rawParams( $this->getDiffLink() )->escaped();
41  $revlink = $this->getRevisionLink();
42  $userlink = Linker::revUserLink( $this->revision );
43  $comment = Linker::revComment( $this->revision );
44  if ( $this->isDeleted() ) {
45  $revlink = "<span class=\"history-deleted\">$revlink</span>";
46  }
47 
48  $content = "$difflink $revlink $userlink $comment";
49  $attribs = [];
50  $tags = $this->getTags();
51  if ( $tags ) {
52  list( $tagSummary, $classes ) = ChangeTags::formatSummaryRow(
53  $tags,
54  'edittags',
55  $this->list->getContext()
56  );
57  $content .= " $tagSummary";
58  $attribs['class'] = implode( ' ', $classes );
59  }
60  return Xml::tags( 'li', $attribs, $content );
61  }
62 }
Linker\revUserLink
static revUserLink( $rev, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition: Linker.php:1101
RevisionItem\isDeleted
isDeleted()
Definition: RevisionItem.php:69
Linker\revComment
static revComment(Revision $rev, $local=false, $isPublic=false, $useParentheses=true)
Wrap and format the given revision's comment block, if the current user is allowed to view it.
Definition: Linker.php:1577
ChangeTagsRevisionItem\getHTML
getHTML()
Definition: ChangeTagsRevisionItem.php:38
ChangeTagsRevisionItem
Item class for a live revision table row with its associated change tags.
Definition: ChangeTagsRevisionItem.php:26
$content
$content
Definition: router.php:78
Xml\tags
static tags( $element, $attribs, $contents)
Same as Xml::element(), but does not escape contents.
Definition: Xml.php:130
RevisionItem
Item class for a live revision table row.
Definition: RevisionItem.php:28
ChangeTagsRevisionItem\getTags
getTags()
Definition: ChangeTagsRevisionItem.php:30
RevisionItem\getRevisionLink
getRevisionLink()
Get the HTML link to the revision text.
Definition: RevisionItem.php:80
RevisionItem\getDiffLink
getDiffLink()
Get the HTML link to the diff.
Definition: RevisionItem.php:106
ChangeTags\formatSummaryRow
static formatSummaryRow( $tags, $page, IContextSource $context=null)
Creates HTML for the given tags.
Definition: ChangeTags.php:94