Go to the documentation of this file.
202 public function userLink( $userId, $userName, $altUserName =
false ) {
213 $redContribsWhenNoEdits =
false,
220 $redContribsWhenNoEdits,
334 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex =
false ) {
362 $legacyAnchor =
false
specialLink( $name, $key='')
linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
static formatLinksInComment( $comment, $title=null, $local=false, $wikiId=null)
Formats wiki links and media links in text; all other wiki formatting is ignored.
static userTalkLink( $userId, $userText)
static userToolLinksRedContribs( $userId, $userText, $edits=null)
Alias for userToolLinks( $userId, $userText, true );.
makeHeadline( $level, $attribs, $anchor, $html, $link, $legacyAnchor=false)
getRevDeleteLink(User $user, Revision $rev, Title $title)
static emailLink( $userId, $userText)
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
static revUserLink( $rev, $isPublic=false)
Generate a user link if the current user is allowed to view it.
getInvalidTitleDescription(IContextSource $context, $namespace, $title)
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
if(!isset( $args[0])) $lang
static makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
Make appropriate markup for a link to the current article.
static generateTOC( $tree, $lang=false)
Generate a table of contents from a section tree.
static tocIndent()
Add another level to the Table of Contents.
static specialLink( $name, $key='')
Make a link to a special page given its name and, optionally, a message key from the link text.
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
static processResponsiveImages( $file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
formatTemplates( $templates, $preview=false, $section=false, $more=null)
makeCommentLink(Title $title, $text, $wikiId=null, $options=[])
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
makeMediaLinkObj( $title, $html='', $time=false)
makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
static tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static formatHiddenCategories( $hiddencats)
Returns HTML for the "hidden categories on this page" list.
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null)
Returns the attributes for the tooltip and access key.
tooltip( $name, $options=null)
userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
null means default & $customAttribs
makeImageLink(Parser $parser, Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="", $widthOption=null)
null for the wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
normalizeSubpageLink( $contextTitle, $target, &$text)
namespace and then decline to actually register it file or subcat img or subcat $title
static makeMediaLinkObj( $title, $html='', $time=false)
Create a direct link to a given uploaded file.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
static generateRollback( $rev, IContextSource $context=null, $options=[ 'verify'])
Generate a rollback link for a given revision.
blockLink( $userId, $userText)
link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
static makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
processResponsiveImages( $file, $thumb, $hp)
commentBlock( $comment, $title=null, $local=false, $wikiId=null)
static revUserTools( $rev, $isPublic=false)
Generate a user tool link cluster if the current user is allowed to view it.
static tocList( $toc, $lang=false)
Wraps the TOC in a table and provides the hide/collapse javascript.
makeThumbLinkObj(Title $title, $file, $label='', $alt='', $align='right', $params=[], $framed=false, $manualthumb="")
static getRollbackEditCount( $rev, $verify)
This function will return the number of revisions which a rollback would revert and,...
formatHiddenCategories( $hiddencats)
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
static makeThumbLinkObj(Title $title, $file, $label='', $alt='', $align='right', $params=[], $framed=false, $manualthumb="")
Make HTML for a thumbnail including image, border and caption.
static tocLineEnd()
End a Table Of Contents line.
revComment(Revision $rev, $local=false, $isPublic=false)
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
see documentation in includes Linker php for Linker::makeImageLink or false for current used if you return false $parser
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
see documentation in includes Linker php for Linker::makeImageLink & $time
static makeCommentLink(LinkTarget $linkTarget, $text, $wikiId=null, $options=[])
Generates a link to the given Title.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
titleAttrib( $name, $options=null, array $msgParams=[])
formatLinksInComment( $comment, $title=null, $local=false, $wikiId=null)
revUserLink( $rev, $isPublic=false)
static splitTrail( $trail)
Split a link trail, return the "inside" portion and the remainder of the trail as a two-element array...
formatComment( $comment, $title=null, $local=false, $wikiId=null)
Allows to change the fields on the form that will be generated $name
static revComment(Revision $rev, $local=false, $isPublic=false)
Wrap and format the given revision's comment block, if the current user is allowed to view it.
static blockLink( $userId, $userText)
static normaliseSpecialPage(LinkTarget $target)
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
userTalkLink( $userId, $userText)
static getRevDeleteLink(User $user, Revision $rev, Title $title)
Get a revision-deletion link, or disabled link, or nothing, depending on user permissions & the setti...
tocList( $toc, $lang=false)
static formatSize( $size)
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
static formatRevisionSize( $size)
static makeImageLink(Parser $parser, Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="", $widthOption=null)
Given parameters derived from [[Image:Foo|options...]], generate the HTML that that syntax inserts in...
static formatTemplates( $templates, $preview=false, $section=false, $more=null)
userLink( $userId, $userName, $altUserName=false)
revDeleteLinkDisabled( $delete=true)
emailLink( $userId, $userText)
makeExternalImage( $url, $alt='')
static titleAttrib( $name, $options=null, array $msgParams=[])
Given the id of an interface element, constructs the appropriate title attribute from the system mess...
Interface for objects which can provide a MediaWiki context on request.
static formatComment( $comment, $title=null, $local=false, $wikiId=null)
This function is called by all recent changes variants, by the page history, and by the user contribu...
see documentation in includes Linker php for Linker::makeImageLink & $handlerParams
getRollbackEditCount( $rev, $verify)
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
Represents a title within MediaWiki.
makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
static tocUnindent( $level)
Finish one or more sublevels on the Table of Contents.
userToolLinksRedContribs( $userId, $userText, $edits=null)
static makeMediaLinkFile(Title $title, $file, $html='')
Create a direct link to a given uploaded file.
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
static commentBlock( $comment, $title=null, $local=false, $wikiId=null)
Wrap a comment in standard punctuation and formatting if it's non-empty, otherwise return empty strin...
usually copyright or history_copyright This message must be in HTML not wikitext & $link
revUserTools( $rev, $isPublic=false)
makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
static normalizeSubpageLink( $contextTitle, $target, &$text)
makeMediaLinkFile(Title $title, $file, $html='')
revDeleteLink( $query=[], $restricted=false, $delete=true)
generateRollback( $rev, IContextSource $context=null, $options=[ 'verify'])
static accesskey( $name)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static buildRollbackLink( $rev, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
static makeExternalImage( $url, $alt='')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
formatRevisionSize( $size)
static makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
Make a "broken" link to an image.
normaliseSpecialPage(Title $title)
buildRollbackLink( $rev, IContextSource $context=null, $editCount=false)
generateTOC( $tree, $lang=false)