Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Summary Class Reference

A Summary object can be used to build complex, translatable summaries. More...

+ Inheritance diagram for Wikibase\Lib\Summary:
+ Collaboration diagram for Wikibase\Lib\Summary:

Public Member Functions

 __construct ( $moduleName=null, $actionName=null, $languageCode=null, array $commentArgs=[], array $summaryArgs=[])
 
 setUserSummary ( $summary=null)
 
 setLanguage ( $languageCode=null)
 Set the language code to use as the second autocomment argument.
 
 setAction ( $name)
 Set the action part of the autocomment.
 
 getUserSummary ()
 
 getLanguageCode ()
 Get the language part of the autocomment.
 
 getMessageKey ()
 Format the message key using the object-specific values.
 
 addAutoCommentArgs (... $args)
 Add auto comment arguments.
 
 addAutoSummaryArgs (... $args)
 Add arguments to the summary part.
 
 setAutoCommentArgs (array $args)
 
 setAutoSummaryArgs (array $args)
 
 getCommentArgs ()
 
 getAutoSummaryArgs ()
 

Private Attributes

 $moduleName
 
 $actionName
 
 $languageCode
 
 $commentArgs
 
 $summaryArgs
 
 $userSummary
 

Detailed Description

A Summary object can be used to build complex, translatable summaries.

Author
John Erling Blad
Daniel Kinzler
Tobias Gritschacher < tobia.nosp@m.s.gr.nosp@m.itsch.nosp@m.ache.nosp@m.r@wik.nosp@m.imed.nosp@m.ia.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Summary::__construct (   $moduleName = null,
  $actionName = null,
  $languageCode = null,
array  $commentArgs = [],
array  $summaryArgs = [] 
)
Parameters
string | null$moduleNameThe module part of the auto comment
string | null$actionNameThe action part of the auto comment
string | null$languageCodeThe language code to use as the second auto comment argument
array$commentArgsThe arguments to the auto comment
array$summaryArgsThe arguments to the auto summary

Member Function Documentation

◆ addAutoCommentArgs()

Wikibase\Lib\Summary::addAutoCommentArgs (   $args)

Add auto comment arguments.

Parameters
mixed...$args Parts to be stringed together

◆ addAutoSummaryArgs()

Wikibase\Lib\Summary::addAutoSummaryArgs (   $args)

Add arguments to the summary part.

Parameters
mixed...$args Parts to be stringed together

◆ getAutoSummaryArgs()

Wikibase\Lib\Summary::getAutoSummaryArgs ( )
Returns
array

Implements Wikibase\Lib\FormatableSummary.

◆ getCommentArgs()

Wikibase\Lib\Summary::getCommentArgs ( )
Returns
array

Implements Wikibase\Lib\FormatableSummary.

◆ getLanguageCode()

Wikibase\Lib\Summary::getLanguageCode ( )

Get the language part of the autocomment.

Returns
string|null

Implements Wikibase\Lib\FormatableSummary.

◆ getMessageKey()

Wikibase\Lib\Summary::getMessageKey ( )

Format the message key using the object-specific values.

Returns
string with a message key, or possibly an empty string

Implements Wikibase\Lib\FormatableSummary.

◆ getUserSummary()

Wikibase\Lib\Summary::getUserSummary ( )
Returns
string|null The user-provided edit summary, or null if none was given.

Implements Wikibase\Lib\FormatableSummary.

◆ setAction()

Wikibase\Lib\Summary::setAction (   $name)

Set the action part of the autocomment.

Parameters
string | null$name

◆ setAutoCommentArgs()

Wikibase\Lib\Summary::setAutoCommentArgs ( array  $args)
Parameters
array$argsParts to be used in auto comment

◆ setAutoSummaryArgs()

Wikibase\Lib\Summary::setAutoSummaryArgs ( array  $args)
Parameters
array$argsParts to be used in auto summary

◆ setLanguage()

Wikibase\Lib\Summary::setLanguage (   $languageCode = null)

Set the language code to use as the second autocomment argument.

Parameters
string | null$languageCode

◆ setUserSummary()

Wikibase\Lib\Summary::setUserSummary (   $summary = null)
Parameters
string | null$summaryThe user-provided edit summary, or null if none was given.

Member Data Documentation

◆ $actionName

Wikibase\Lib\Summary::$actionName
private

◆ $commentArgs

Wikibase\Lib\Summary::$commentArgs
private

◆ $languageCode

Wikibase\Lib\Summary::$languageCode
private

◆ $moduleName

Wikibase\Lib\Summary::$moduleName
private

◆ $summaryArgs

Wikibase\Lib\Summary::$summaryArgs
private

◆ $userSummary

Wikibase\Lib\Summary::$userSummary
private

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