MediaWiki master
MediaWiki\CommentFormatter\CommentItem Class Reference

An object to represent one of the inputs to a batch formatting operation. More...

Collaboration diagram for MediaWiki\CommentFormatter\CommentItem:

Public Member Functions

 __construct (string $comment)
 
 samePage ( $samePage=true)
 Set the same-page flag.
 
 selfLinkTarget (LinkTarget $selfLinkTarget)
 Set the self-link target.
 
 wikiId ( $wikiId)
 ID of the wiki to link to (if not the local wiki), as used by WikiMap.
 

Public Attributes

string $comment
 
bool null $samePage
 
LinkTarget null $selfLinkTarget
 
string false null $wikiId
 

Detailed Description

An object to represent one of the inputs to a batch formatting operation.

Since
1.38
Stability: newable

Definition at line 13 of file CommentItem.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\CommentFormatter\CommentItem::__construct ( string $comment)
Parameters
string$commentThe comment to format

Definition at line 41 of file CommentItem.php.

References MediaWiki\CommentFormatter\CommentItem\$comment.

Member Function Documentation

◆ samePage()

MediaWiki\CommentFormatter\CommentItem::samePage ( $samePage = true)

Set the same-page flag.

Parameters
bool$samePageIf true, self links are rendered with a fragment- only URL. Formerly $local.
Returns
$this

Definition at line 64 of file CommentItem.php.

References MediaWiki\CommentFormatter\CommentItem\$samePage, and MediaWiki\CommentFormatter\CommentItem\samePage().

Referenced by MediaWiki\CommentFormatter\CommentItem\samePage().

◆ selfLinkTarget()

MediaWiki\CommentFormatter\CommentItem::selfLinkTarget ( LinkTarget $selfLinkTarget)

Set the self-link target.

Parameters
LinkTarget$selfLinkTargetThe title used for fragment-only and section links, formerly $title.
Returns
$this

Definition at line 52 of file CommentItem.php.

References MediaWiki\CommentFormatter\CommentItem\$selfLinkTarget, and MediaWiki\CommentFormatter\CommentItem\selfLinkTarget().

Referenced by MediaWiki\CommentFormatter\CommentItem\selfLinkTarget().

◆ wikiId()

MediaWiki\CommentFormatter\CommentItem::wikiId ( $wikiId)

ID of the wiki to link to (if not the local wiki), as used by WikiMap.

This is used to render comments which are loaded from a foreign wiki. This only affects links which are syntactically internal – it has no effect on interwiki links.

Parameters
string | false | null$wikiId
Returns
$this

Definition at line 78 of file CommentItem.php.

References MediaWiki\CommentFormatter\CommentItem\$wikiId, and MediaWiki\CommentFormatter\CommentItem\wikiId().

Referenced by MediaWiki\CommentFormatter\CommentItem\wikiId().

Member Data Documentation

◆ $comment

string MediaWiki\CommentFormatter\CommentItem::$comment
Access: internal

Definition at line 18 of file CommentItem.php.

Referenced by MediaWiki\CommentFormatter\CommentItem\__construct().

◆ $samePage

bool null MediaWiki\CommentFormatter\CommentItem::$samePage
Access: internal

Definition at line 30 of file CommentItem.php.

Referenced by MediaWiki\CommentFormatter\CommentItem\samePage().

◆ $selfLinkTarget

LinkTarget null MediaWiki\CommentFormatter\CommentItem::$selfLinkTarget
Access: internal

Definition at line 24 of file CommentItem.php.

Referenced by MediaWiki\CommentFormatter\CommentItem\selfLinkTarget().

◆ $wikiId

string false null MediaWiki\CommentFormatter\CommentItem::$wikiId
Access: internal

Definition at line 36 of file CommentItem.php.

Referenced by MediaWiki\CommentFormatter\CommentItem\wikiId().


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