MediaWiki REL1_39
|
Fluent interface for revision comment batch inputs. More...
Public Member Functions | |
__construct (CommentFormatter $formatter) | |
authority (Authority $authority) | |
Set the authority to use for permission checks. | |
execute () | |
Format the comments. | |
hideIfDeleted ( $isPublic=true) | |
If this is true, show the comment only if all users can see it. | |
indexById ( $indexById=true) | |
If this is true, the array keys in the return value will be the revision IDs instead of the keys from the input array. | |
revisions ( $revisions) | |
Set the revisions to extract comments from. | |
samePage ( $samePage=true) | |
Set the same-page option. | |
useParentheses ( $useParentheses=true) | |
Wrap the comment with parentheses. | |
Fluent interface for revision comment batch inputs.
Definition at line 13 of file RevisionCommentBatch.php.
MediaWiki\CommentFormatter\RevisionCommentBatch::__construct | ( | CommentFormatter | $formatter | ) |
CommentFormatter | $formatter |
Definition at line 32 of file RevisionCommentBatch.php.
MediaWiki\CommentFormatter\RevisionCommentBatch::authority | ( | Authority | $authority | ) |
Set the authority to use for permission checks.
This must be called prior to execute().
Authority | $authority |
Definition at line 43 of file RevisionCommentBatch.php.
References MediaWiki\CommentFormatter\RevisionCommentBatch\authority().
Referenced by MediaWiki\CommentFormatter\RevisionCommentBatch\authority(), and MediaWiki\CommentFormatter\RevisionCommentBatch\execute().
MediaWiki\CommentFormatter\RevisionCommentBatch::execute | ( | ) |
Format the comments.
Definition at line 123 of file RevisionCommentBatch.php.
References MediaWiki\CommentFormatter\RevisionCommentBatch\authority(), MediaWiki\CommentFormatter\RevisionCommentBatch\indexById(), MediaWiki\CommentFormatter\RevisionCommentBatch\revisions(), MediaWiki\CommentFormatter\RevisionCommentBatch\samePage(), and MediaWiki\CommentFormatter\RevisionCommentBatch\useParentheses().
MediaWiki\CommentFormatter\RevisionCommentBatch::hideIfDeleted | ( | $isPublic = true | ) |
If this is true, show the comment only if all users can see it.
We'll call it hideIfDeleted() since public is a keyword and isPublic() has an inappropriate verb.
bool | $isPublic |
Definition at line 99 of file RevisionCommentBatch.php.
MediaWiki\CommentFormatter\RevisionCommentBatch::indexById | ( | $indexById = true | ) |
If this is true, the array keys in the return value will be the revision IDs instead of the keys from the input array.
bool | $indexById |
Definition at line 111 of file RevisionCommentBatch.php.
References MediaWiki\CommentFormatter\RevisionCommentBatch\indexById().
Referenced by MediaWiki\CommentFormatter\RevisionCommentBatch\execute(), and MediaWiki\CommentFormatter\RevisionCommentBatch\indexById().
MediaWiki\CommentFormatter\RevisionCommentBatch::revisions | ( | $revisions | ) |
Set the revisions to extract comments from.
iterable<RevisionRecord> | $revisions |
Definition at line 54 of file RevisionCommentBatch.php.
References MediaWiki\CommentFormatter\RevisionCommentBatch\revisions().
Referenced by MediaWiki\CommentFormatter\RevisionCommentBatch\execute(), and MediaWiki\CommentFormatter\RevisionCommentBatch\revisions().
MediaWiki\CommentFormatter\RevisionCommentBatch::samePage | ( | $samePage = true | ) |
Set the same-page option.
If this is true, section links and fragment- only wikilinks are rendered with an href that is a fragment-only URL. If it is false (the default), such links go to the self link title.
This is equivalent to $local in the old Linker methods.
bool | $samePage |
Definition at line 69 of file RevisionCommentBatch.php.
References MediaWiki\CommentFormatter\RevisionCommentBatch\samePage().
Referenced by MediaWiki\CommentFormatter\RevisionCommentBatch\execute(), and MediaWiki\CommentFormatter\RevisionCommentBatch\samePage().
MediaWiki\CommentFormatter\RevisionCommentBatch::useParentheses | ( | $useParentheses = true | ) |
Wrap the comment with parentheses.
This has no effect if the useBlock option is not enabled.
Unlike the legacy Linker::commentBlock(), this option defaults to false if this method is not called, since that better preserves the fluent style.
bool | $useParentheses |
Definition at line 85 of file RevisionCommentBatch.php.
References MediaWiki\CommentFormatter\RevisionCommentBatch\useParentheses().
Referenced by MediaWiki\CommentFormatter\RevisionCommentBatch\execute(), and MediaWiki\CommentFormatter\RevisionCommentBatch\useParentheses().