MediaWiki master
ChangeTagsRevisionItem.php
Go to the documentation of this file.
1<?php
25
36 public function getTags() {
37 return $this->row->ts_tags;
38 }
39
44 public function getHTML() {
45 $difflink = $this->list->msg( 'parentheses' )
46 ->rawParams( $this->getDiffLink() )->escaped();
47 $revlink = $this->getRevisionLink();
48 $userlink = Linker::revUserLink( $this->getRevisionRecord() );
49 $comment = MediaWikiServices::getInstance()->getCommentFormatter()
50 ->formatRevision( $this->getRevisionRecord(), $this->list->getAuthority() );
51 if ( $this->isDeleted() ) {
52 $class = Linker::getRevisionDeletedClass( $this->getRevisionRecord() );
53 $revlink = "<span class=\"$class\">$revlink</span>";
54 }
55
56 $content = "$difflink $revlink $userlink $comment";
57 $attribs = [];
58 $tags = $this->getTags();
59 if ( $tags ) {
60 [ $tagSummary, $classes ] = ChangeTags::formatSummaryRow(
61 $tags,
62 'edittags',
63 $this->list->getContext()
64 );
65 $content .= " $tagSummary";
66 $attribs['class'] = implode( ' ', $classes );
67 }
68 return Html::rawElement( 'li', $attribs, $content );
69 }
70}
Item class for a live revision table row with its associated change tags.
static formatSummaryRow( $tags, $unused, MessageLocalizer $localizer=null)
Creates HTML for the given tags.
This class is a collection of static functions that serve two purposes:
Definition Html.php:56
Some internal bits split of from Skin.php.
Definition Linker.php:63
Service locator for MediaWiki core services.
Item class for a live revision table row.
getDiffLink()
Get the HTML link to the diff.
getRevisionRecord()
Get the RevisionRecord for the item.
getRevisionLink()
Get the HTML link to the revision text.