MediaWiki  master
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->getRevisionRecord() );
43  $comment = Linker::revComment( $this->getRevisionRecord() );
44  if ( $this->isDeleted() ) {
46  $revlink = "<span class=\"$class\">$revlink</span>";
47  }
48 
49  $content = "$difflink $revlink $userlink $comment";
50  $attribs = [];
51  $tags = $this->getTags();
52  if ( $tags ) {
53  list( $tagSummary, $classes ) = ChangeTags::formatSummaryRow(
54  $tags,
55  'edittags',
56  $this->list->getContext()
57  );
58  $content .= " $tagSummary";
59  $attribs['class'] = implode( ' ', $classes );
60  }
61  return Xml::tags( 'li', $attribs, $content );
62  }
63 }
Item class for a live revision table row with its associated change tags.
static formatSummaryRow( $tags, $page, MessageLocalizer $localizer=null)
Creates HTML for the given tags.
Definition: ChangeTags.php:193
static getRevisionDeletedClass(RevisionRecord $revisionRecord)
Returns css class of a deleted revision.
Definition: Linker.php:1307
static revComment(RevisionRecord $revRecord, $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:1563
static revUserLink(RevisionRecord $revRecord, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition: Linker.php:1279
Item class for a live revision table row.
getRevisionLink()
Get the HTML link to the revision text.
getDiffLink()
Get the HTML link to the diff.
getRevisionRecord()
Get the RevisionRecord for the item.
static tags( $element, $attribs, $contents)
Same as Xml::element(), but does not escape contents.
Definition: Xml.php:134
$content
Definition: router.php:76