Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\RecentChanges\ChangeLineFormatter Class Reference

Formats a changes line for including changes from the Wikibase repo in the client's recent changes, watchlist and related changes special pages. More...

Public Member Functions

 __construct (RepoLinker $repoLinker, UserNameUtils $userNameUtils, LinkRenderer $linkRenderer, CommentFormatter $commentFormatter)
 
 format (ExternalChange $externalChange, Title $title, int $count, string $flag, Language $lang, User $user)
 
 formatDataForEnhancedLine (array &$data, ExternalChange $externalChange, Title $title, int $count, Language $lang, User $user)
 
 formatDataForEnhancedBlockLine (array &$data, ExternalChange $externalChange, Title $title, int $count, Language $lang, User $user)
 

Private Member Functions

 formatCommonDataForEnhancedLine (array &$data, ExternalChange $externalChange, Title $title, Language $lang, User $user)
 
 getFormattedCommentHTML (RevisionData $rev, Title $title, string $siteId, Authority $user)
 
 wrapCommentBlockHTML (string $commentHtml)
 
 getChangeSeparatorHTML ()
 
 formatTimestampHTML (string $timestamp, Language $lang, UserIdentity $user)
 
 formatUserLinksHTML (string $userName, int $visibility, Language $lang, Authority $user)
 
 formatIpUserLinksHTML (array $links)
 @fixme use shared bits of formatting from ChangesList and OldChangesList
 
 formatRegisteredUserLinksHTML (array $links, Language $lang)
 @fixme use shared bits of formatting from ChangesList and OldChangesList
 
 formatEntityLinkHTML (EntityId $entityId)
 
 formatDeletionLogLinkHTML ()
 
 formatDiffHistHTML (EntityId $entityId, RevisionData $rev, int $count, Language $lang)
 
 buildPermanentLinkHTML (EntityId $entityId, RevisionData $rev, Language $lang, UserIdentity $user)
 
 buildDiffLinkHTML (EntityId $entityId, RevisionData $rev, $count)
 
 buildHistoryLinkHTML (EntityId $entityId, RevisionData $rev)
 
 buildUserLinkHTML (string $userName)
 
 buildUserContribsLinkHTML (string $userName, ?string $text=null)
 
 buildUserTalkLinkHTML (string $userName)
 
 buildUserLinksHTML (string $userName)
 

Private Attributes

 $repoLinker
 
 $userNameUtils
 
 $linkRenderer
 
 $commentFormatter
 

Detailed Description

Formats a changes line for including changes from the Wikibase repo in the client's recent changes, watchlist and related changes special pages.

Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\RecentChanges\ChangeLineFormatter::__construct ( RepoLinker $repoLinker,
UserNameUtils $userNameUtils,
LinkRenderer $linkRenderer,
CommentFormatter $commentFormatter )

Member Function Documentation

◆ buildDiffLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::buildDiffLinkHTML ( EntityId $entityId,
RevisionData $rev,
$count )
private

◆ buildHistoryLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::buildHistoryLinkHTML ( EntityId $entityId,
RevisionData $rev )
private

◆ buildPermanentLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::buildPermanentLinkHTML ( EntityId $entityId,
RevisionData $rev,
Language $lang,
UserIdentity $user )
private

◆ buildUserContribsLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::buildUserContribsLinkHTML ( string $userName,
?string $text = null )
private

◆ buildUserLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::buildUserLinkHTML ( string $userName)
private

◆ buildUserLinksHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::buildUserLinksHTML ( string $userName)
private
Parameters
string$userName
Returns
string[] List of HTML links

◆ buildUserTalkLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::buildUserTalkLinkHTML ( string $userName)
private

◆ format()

Wikibase\Client\RecentChanges\ChangeLineFormatter::format ( ExternalChange $externalChange,
Title $title,
int $count,
string $flag,
Language $lang,
User $user )

◆ formatCommonDataForEnhancedLine()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatCommonDataForEnhancedLine ( array & $data,
ExternalChange $externalChange,
Title $title,
Language $lang,
User $user )
private

◆ formatDataForEnhancedBlockLine()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatDataForEnhancedBlockLine ( array & $data,
ExternalChange $externalChange,
Title $title,
int $count,
Language $lang,
User $user )

◆ formatDataForEnhancedLine()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatDataForEnhancedLine ( array & $data,
ExternalChange $externalChange,
Title $title,
int $count,
Language $lang,
User $user )

◆ formatDeletionLogLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatDeletionLogLinkHTML ( )
private

◆ formatDiffHistHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatDiffHistHTML ( EntityId $entityId,
RevisionData $rev,
int $count,
Language $lang )
private

◆ formatEntityLinkHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatEntityLinkHTML ( EntityId $entityId)
private

◆ formatIpUserLinksHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatIpUserLinksHTML ( array $links)
private

@fixme use shared bits of formatting from ChangesList and OldChangesList

Parameters
string[]$links
Returns
string[] array of HTML

◆ formatRegisteredUserLinksHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatRegisteredUserLinksHTML ( array $links,
Language $lang )
private

@fixme use shared bits of formatting from ChangesList and OldChangesList

Parameters
string[]$links
Language$lang
Returns
string[] array of HTML

◆ formatTimestampHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatTimestampHTML ( string $timestamp,
Language $lang,
UserIdentity $user )
private

◆ formatUserLinksHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::formatUserLinksHTML ( string $userName,
int $visibility,
Language $lang,
Authority $user )
private
Parameters
string$userName
int$visibility
Language$lang
Authority$user
Returns
string[] array of HTML

◆ getChangeSeparatorHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::getChangeSeparatorHTML ( )
private

◆ getFormattedCommentHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::getFormattedCommentHTML ( RevisionData $rev,
Title $title,
string $siteId,
Authority $user )
private

◆ wrapCommentBlockHTML()

Wikibase\Client\RecentChanges\ChangeLineFormatter::wrapCommentBlockHTML ( string $commentHtml)
private

Member Data Documentation

◆ $commentFormatter

Wikibase\Client\RecentChanges\ChangeLineFormatter::$commentFormatter
private

◆ $linkRenderer

Wikibase\Client\RecentChanges\ChangeLineFormatter::$linkRenderer
private

◆ $repoLinker

Wikibase\Client\RecentChanges\ChangeLineFormatter::$repoLinker
private

◆ $userNameUtils

Wikibase\Client\RecentChanges\ChangeLineFormatter::$userNameUtils
private

The documentation for this class was generated from the following file: