248 public function userLink( $userId, $userName, $altUserName =
false ) {
259 $redContribsWhenNoEdits =
false,
266 $redContribsWhenNoEdits,
380 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex =
false ) {
408 $legacyAnchor =
false
static generateTOC($tree, $lang=false)
Generate a table of contents from a section tree.
getRevDeleteLink(User $user, Revision $rev, Title $title)
blockLink($userId, $userText)
getInterwikiLinkAttributes($title, $unused=null, $class= 'external')
static tocLineEnd()
End a Table Of Contents line.
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
Interface for objects which can provide a MediaWiki context on request.
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 tocList($toc, $lang=false)
Wraps the TOC in a table and provides the hide/collapse javascript.
static processResponsiveImages($file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
the array() calling protocol came about after MediaWiki 1.4rc1.
null for the local 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
userToolLinksRedContribs($userId, $userText, $edits=null)
emailLink($userId, $userText)
static linkKnown($target, $html=null, $customAttribs=[], $query=[], $options=[ 'known', 'noclasses'])
Identical to link(), except $options defaults to 'known'.
magic word the default is to use $key to get the and $key value or $key value text $key value html to format the value $key
formatLinksInComment($comment, $title=null, $local=false, $wikiId=null)
static getRevDeleteLink(User $user, Revision $rev, Title $title)
Get a revision-deletion link, or disabled link, or nothing, depending on user permissions & the setti...
tocLine($anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
static buildRollbackLink($rev, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
normaliseSpecialPage(Title $title)
getInternalLinkAttributes($title, $unused=null, $class= '')
formatHiddenCategories($hiddencats)
getInvalidTitleDescription(IContextSource $context, $namespace, $title)
commentBlock($comment, $title=null, $local=false, $wikiId=null)
if(!isset($args[0])) $lang
static formatRevisionSize($size)
static normaliseSpecialPage(LinkTarget $target)
tooltipAndAccesskeyAttribs($name, array $msgParams=[])
makeImageLink(Parser $parser, Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="", $widthOption=null)
titleAttrib($name, $options=null, array $msgParams=[])
static makeSelfLinkObj($nt, $html= '', $query= '', $trail= '', $prefix= '')
Make appropriate markup for a link to the current article.
link($target, $html=null, $customAttribs=[], $query=[], $options=[])
it s the revision text itself In either if gzip is the revision text is gzipped $flags
makeSelfLinkObj($nt, $html= '', $query= '', $trail= '', $prefix= '')
makeMediaLinkObj($title, $html= '', $time=false)
makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
formatComment($comment, $title=null, $local=false, $wikiId=null)
Represents a title within MediaWiki.
specialLink($name, $key= '')
static blockLink($userId, $userText)
static tooltipAndAccesskeyAttribs($name, array $msgParams=[])
Returns the attributes for the tooltip and access key.
see documentation in includes Linker php for Linker::makeImageLink & $time
static formatTemplates($templates, $preview=false, $section=false, $more=null)
Returns HTML for the "templates used on this page" list.
revDeleteLink($query=[], $restricted=false, $delete=true)
the value to return A Title object or null for latest to be modified or replaced by the hook handler or if authentication is not possible after cache objects are set for highlighting & $link
revDeleteLinkDisabled($delete=true)
static getRollbackEditCount($rev, $verify)
This function will return the number of revisions which a rollback would revert and, if $verify is set it will verify that a revision can be reverted (that the user isn't the only contributor and the revision we might rollback to isn't deleted).
static splitTrail($trail)
Split a link trail, return the "inside" portion and the remainder of the trail as a two-element array...
userLink($userId, $userName, $altUserName=false)
static makeMediaLinkObj($title, $html= '', $time=false)
Create a direct link to a given uploaded file.
static makeBrokenImageLinkObj($title, $label= '', $query= '', $unused1= '', $unused2= '', $time=false)
Make a "broken" link to an image.
null means default & $customAttribs
formatRevisionSize($size)
getLinkColour($t, $threshold)
static normalizeSubpageLink($contextTitle, $target, &$text)
makeCommentLink(Title $title, $text, $wikiId=null, $options=[])
static titleAttrib($name, $options=null, array $msgParams=[])
Given the id of an interface element, constructs the appropriate title attribute from the system mess...
static formatLinksInComment($comment, $title=null, $local=false, $wikiId=null)
Formats wiki links and media links in text; all other wiki formatting is ignored. ...
makeHeadline($level, $attribs, $anchor, $html, $link, $legacyAnchor=false)
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
getRollbackEditCount($rev, $verify)
static accesskey($name)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
normalizeSubpageLink($contextTitle, $target, &$text)
static emailLink($userId, $userText)
makeBrokenImageLinkObj($title, $label= '', $query= '', $unused1= '', $unused2= '', $time=false)
static revDeleteLinkDisabled($delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
revUserLink($rev, $isPublic=false)
static makeHeadline($level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
userTalkLink($userId, $userText)
wfDeprecated($function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
userToolLinks($userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
buildRollbackLink($rev, IContextSource $context=null, $editCount=false)
namespace and then decline to actually register it file or subcat img or subcat $title
processResponsiveImages($file, $thumb, $hp)
static tocUnindent($level)
Finish one or more sublevels on the Table of Contents.
static tocLine($anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
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...
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 makeCommentLink(Title $title, $text, $wikiId=null, $options=[])
Generates a link to the given Title.
static userToolLinksRedContribs($userId, $userText, $edits=null)
Alias for userToolLinks( $userId, $userText, true );.
static revUserLink($rev, $isPublic=false)
Generate a user link if the current user is allowed to view it.
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...
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
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 local account $user
getInternalLinkAttributesObj($nt, $unused=null, $class= '', $title=false)
static link($target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
makeExternalImage($url, $alt= '')
revComment(Revision $rev, $local=false, $isPublic=false)
static tooltip($name, $options=null)
Returns raw bits of HTML, use titleAttrib()
static userLink($userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
static makeExternalLink($url, $text, $escape=true, $linktype= '', $attribs=[], $title=null)
Make an external link.
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
revUserTools($rev, $isPublic=false)
static getInternalLinkAttributesObj($nt, $unused=null, $class= '', $title=false)
Get the appropriate HTML attributes to add to the "a" element of an internal link, given the Title object for the page we want to link to.
static generateRollback($rev, IContextSource $context=null, $options=[ 'verify'])
Generate a rollback link for a given revision.
static formatHiddenCategories($hiddencats)
Returns HTML for the "hidden categories on this page" list.
static makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
tocList($toc, $lang=false)
static userTalkLink($userId, $userText)
generateTOC($tree, $lang=false)
generateRollback($rev, IContextSource $context=null, $options=[ 'verify'])
static makeMediaLinkFile(Title $title, $file, $html= '')
Create a direct link to a given uploaded file.
static userToolLinks($userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
makeMediaLinkFile(Title $title, $file, $html= '')
makeExternalLink($url, $text, $escape=true, $linktype= '', $attribs=[], $title=null)
static formatSize($size)
Format a size in bytes for output, using an appropriate unit (B, KB, MB or GB) according to the magni...
tooltip($name, $options=null)
see documentation in includes Linker php for Linker::makeImageLink & $handlerParams
static tocIndent()
Add another level to the Table of Contents.
static getInterwikiLinkAttributes($title, $unused=null, $class= 'external')
Get the appropriate HTML attributes to add to the "a" element of an interwiki link.
static getInternalLinkAttributes($title, $unused=null, $class= '')
Get the appropriate HTML attributes to add to the "a" element of an internal link.
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
formatTemplates($templates, $preview=false, $section=false, $more=null)
linkKnown($target, $html=null, $customAttribs=[], $query=[], $options=[ 'known', 'noclasses'])
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...
static makeThumbLinkObj(Title $title, $file, $label= '', $alt, $align= 'right', $params=[], $framed=false, $manualthumb="")
Make HTML for a thumbnail including image, border and caption.
static revUserTools($rev, $isPublic=false)
Generate a user tool link cluster if the current user is allowed to view it.
static makeExternalImage($url, $alt= '')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage()...
static specialLink($name, $key= '')
Make a link to a special page given its name and, optionally, a message key from the link text...
static revDeleteLink($query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
makeThumbLinkObj(Title $title, $file, $label= '', $alt, $align= 'right', $params=[], $framed=false, $manualthumb="")
static getLinkColour($t, $threshold)
Return the CSS colour of a known link.
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
Allows to change the fields on the form that will be generated $name