MediaWiki master
ChangeTagsRevisionItem.php
Go to the documentation of this file.
1<?php
25
34 public function getTags() {
35 return $this->row->ts_tags;
36 }
37
42 public function getHTML() {
43 $difflink = $this->list->msg( 'parentheses' )
44 ->rawParams( $this->getDiffLink() )->escaped();
45 $revlink = $this->getRevisionLink();
46 $userlink = Linker::revUserLink( $this->getRevisionRecord() );
47 $comment = MediaWikiServices::getInstance()->getCommentFormatter()
48 ->formatRevision( $this->getRevisionRecord(), $this->list->getAuthority() );
49 if ( $this->isDeleted() ) {
50 $class = Linker::getRevisionDeletedClass( $this->getRevisionRecord() );
51 $revlink = "<span class=\"$class\">$revlink</span>";
52 }
53
54 $content = "$difflink $revlink $userlink $comment";
55 $attribs = [];
56 $tags = $this->getTags();
57 if ( $tags ) {
58 [ $tagSummary, $classes ] = ChangeTags::formatSummaryRow(
59 $tags,
60 'edittags',
61 $this->list->getContext()
62 );
63 $content .= " $tagSummary";
64 $attribs['class'] = implode( ' ', $classes );
65 }
66 return Html::rawElement( 'li', $attribs, $content );
67 }
68}
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:65
Service locator for MediaWiki core services.
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.