MediaWiki master
ChangeTagsRevisionItem.php
Go to the documentation of this file.
1<?php
8
13
24 public function getTags() {
25 return $this->row->ts_tags;
26 }
27
32 public function getHTML() {
33 $difflink = $this->list->msg( 'parentheses' )
34 ->rawParams( $this->getDiffLink() )->escaped();
35 $revlink = $this->getRevisionLink();
36 $userlink = Linker::revUserLink( $this->getRevisionRecord() );
37 $comment = MediaWikiServices::getInstance()->getCommentFormatter()
38 ->formatRevision( $this->getRevisionRecord(), $this->list->getAuthority() );
39 if ( $this->isDeleted() ) {
40 $class = Linker::getRevisionDeletedClass( $this->getRevisionRecord() );
41 $revlink = "<span class=\"$class\">$revlink</span>";
42 }
43
44 $content = "$difflink $revlink $userlink $comment";
45 $attribs = [];
46 $tags = $this->getTags();
47 if ( $tags ) {
48 [ $tagSummary, $classes ] = ChangeTags::formatSummaryRow(
49 $tags,
50 'edittags',
51 $this->list->getContext()
52 );
53 $content .= " $tagSummary";
54 $attribs['class'] = $classes;
55 }
56 return Html::rawElement( 'li', $attribs, $content );
57 }
58}
59
61class_alias( ChangeTagsRevisionItem::class, 'ChangeTagsRevisionItem' );
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:43
Some internal bits split of from Skin.php.
Definition Linker.php:47
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
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.