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