Go to the documentation of this file.
210 public function userLink( $userId, $userName, $altUserName =
false ) {
221 $redContribsWhenNoEdits =
false,
228 $redContribsWhenNoEdits,
342 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex =
false ) {
370 $legacyAnchor =
false
see documentation in includes Linker php for Linker::makeImageLink & $time
specialLink( $name, $key='')
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
linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
makeThumbLinkObj(Title $title, $file, $label='', $alt, $align='right', $params=[], $framed=false, $manualthumb="")
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)
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
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)
the array() calling protocol came about after MediaWiki 1.4rc1.
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 getLinkColour(LinkTarget $t, $threshold)
Return the CSS colour of a known link.
static specialLink( $name, $key='')
Make a link to a special page given its name and, optionally, a message key from the link text.
null means default & $customAttribs
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)
makeImageLink(Parser $parser, Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="", $widthOption=null)
getLinkColour( $t, $threshold)
normalizeSubpageLink( $contextTitle, $target, &$text)
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.
static getRollbackEditCount( $rev, $verify)
This function will return the number of revisions which a rollback would revert and,...
formatHiddenCategories( $hiddencats)
do that in ParserLimitReportFormat instead $parser
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
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.
usually copyright or history_copyright This message must be in HTML not wikitext & $link
namespace and then decline to actually register it file or subcat img or subcat $title
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
static makeCommentLink(LinkTarget $linkTarget, $text, $wikiId=null, $options=[])
Generates a link to the given Title.
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)
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
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 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)
see documentation in includes Linker php for Linker::makeImageLink & $handlerParams
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)
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
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...
getRollbackEditCount( $rev, $verify)
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
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
Represents a title within MediaWiki.
makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
Allows to change the fields on the form that will be generated $name
makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
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...
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)
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
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 makeThumbLinkObj(Title $title, $file, $label='', $alt, $align='right', $params=[], $framed=false, $manualthumb="")
Make HTML for a thumbnail including image, border and caption.
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().
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
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)