MediaWiki
REL1_19
|
Some internal bits split of from Skin.php. More...
Static Public Member Functions | |
static | accesskey ($name) |
Given the id of an interface element, constructs the appropriate accesskey attribute from the system messages. | |
static | blockLink ($userId, $userText) |
static | buildRollbackLink ($rev) |
Build a raw rollback link, useful for collections of "tool" links. | |
static | commentBlock ($comment, $title=null, $local=false) |
Wrap a comment in standard punctuation and formatting if it's non-empty, otherwise return empty string. | |
static | emailLink ($userId, $userText) |
static | formatComment ($comment, $title=null, $local=false) |
This function is called by all recent changes variants, by the page history, and by the user contributions list. | |
static | formatHiddenCategories ($hiddencats) |
Returns HTML for the "hidden categories on this page" list. | |
static | formatLinksInComment ($comment, $title=null, $local=false) |
Formats wiki links and media links in text; all other wiki formatting is ignored. | |
static | formatRevisionSize ($size) |
static | formatSize ($size) |
Format a size in bytes for output, using an appropriate unit (B, KB, MB or GB) according to the magnitude in question. | |
static | formatTemplates ($templates, $preview=false, $section=false) |
Returns HTML for the "templates used on this page" list. | |
static | generateRollback ($rev) |
Generate a rollback link for a given revision. | |
static | generateTOC ($tree) |
Generate a table of contents from a section tree Currently unused. | |
static | getExternalLinkAttributes ($class= 'external') |
Get the appropriate HTML attributes to add to the "a" element of an ex- ternal link, as created by [wikisyntax]. | |
static | getInternalLinkAttributes ($title, $unused=null, $class= '') |
Get the appropriate HTML attributes to add to the "a" element of an in- ternal link. | |
static | getInternalLinkAttributesObj ($nt, $unused=null, $class= '', $title=false) |
Get the appropriate HTML attributes to add to the "a" element of an in- ternal link, given the Title object for the page we want to link to. | |
static | getInterwikiLinkAttributes ($title, $unused=null, $class= 'external') |
Get the appropriate HTML attributes to add to the "a" element of an in- terwiki link. | |
static | getLinkColour ($t, $threshold) |
Return the CSS colour of a known link. | |
static | getRevDeleteLink (User $user, Revision $rev, Title $title) |
Get a revision-deletion link, or disabled link, or nothing, depending on user permissions & the settings on the revision. | |
static | link ($target, $html=null, $customAttribs=array(), $query=array(), $options=array()) |
This function returns an HTML link to the given target. | |
static | linkKnown ($target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses')) |
Identical to link(), except $options defaults to 'known'. | |
static | makeBrokenImageLinkObj ($title, $label= '', $query= '', $unused1= '', $unused2= '', $time=false) |
Make a "broken" link to an image. | |
static | makeBrokenLink ($title, $text= '', $query= '', $trail= '') |
static | makeBrokenLinkObj ($title, $text= '', $query= '', $trail= '', $prefix= '') |
static | makeColouredLinkObj ($nt, $colour, $text= '', $query= '', $trail= '', $prefix= '') |
static | makeExternalImage ($url, $alt= '') |
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage(). | |
static | makeExternalLink ($url, $text, $escape=true, $linktype= '', $attribs=array()) |
Make an external link. | |
static | makeHeadline ($level, $attribs, $anchor, $html, $link, $legacyAnchor=false) |
Create a headline for content. | |
static | makeImageLink2 (Title $title, $file, $frameParams=array(), $handlerParams=array(), $time=false, $query="", $widthOption=null) |
Given parameters derived from [[Image:Foo|options...]], generate the HTML that that syntax inserts in the page. | |
static | makeKnownLinkObj ($title, $text= '', $query= '', $trail= '', $prefix= '', $aprops= '', $style= '') |
static | makeLinkObj ($nt, $text= '', $query= '', $trail= '', $prefix= '') |
static | makeMediaLinkFile (Title $title, $file, $html= '') |
Create a direct link to a given uploaded file. | |
static | makeMediaLinkObj ($title, $html= '', $time=false) |
Create a direct link to a given uploaded file. | |
static | makeSelfLinkObj ($nt, $html= '', $query= '', $trail= '', $prefix= '') |
Make appropriate markup for a link to the current article. | |
static | makeSizeLinkObj ($size, $nt, $text= '', $query= '', $trail= '', $prefix= '') |
Generate either a normal exists-style link or a stub link, depending on the given page size. | |
static | makeThumbLink2 (Title $title, $file, $frameParams=array(), $handlerParams=array(), $time=false, $query="") |
static | makeThumbLinkObj (Title $title, $file, $label= '', $alt, $align= 'right', $params=array(), $framed=false, $manualthumb="") |
Make HTML for a thumbnail including image, border and caption. | |
static | normaliseSpecialPage (Title $title) |
static | normalizeSubpageLink ($contextTitle, $target, &$text) |
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 | revDeleteLink ($query=array(), $restricted=false, $delete=true) |
Creates a (show/hide) link for deleting revisions/log entries. | |
static | revDeleteLinkDisabled ($delete=true) |
Creates a dead (show/hide) link for deleting revisions/log entries. | |
static | revUserLink ($rev, $isPublic=false) |
Generate a user link if the current user is allowed to view it. | |
static | revUserTools ($rev, $isPublic=false) |
Generate a user tool link cluster if the current user is allowed to view it. | |
static | specialLink ($name, $key= '') |
Make a link to a special page given its name and, optionally, a message key from the link text. | |
static | splitTrail ($trail) |
Split a link trail, return the "inside" portion and the remainder of the trail as a two-element array. | |
static | titleAttrib ($name, $options=null) |
Given the id of an interface element, constructs the appropriate title attribute from the system messages. | |
static | tocIndent () |
Add another level to the Table of Contents. | |
static | tocLine ($anchor, $tocline, $tocnumber, $level, $sectionIndex=false) |
parameter level defines if we are on an indentation level | |
static | tocLineEnd () |
End a Table Of Contents line. | |
static | tocList ($toc, $lang=false) |
Wraps the TOC in a table and provides the hide/collapse javascript. | |
static | tocUnindent ($level) |
Finish one or more sublevels on the Table of Contents. | |
static | tooltip ($name, $options=null) |
Returns raw bits of HTML, use titleAttrib() | |
static | tooltipAndAccesskeyAttribs ($name) |
Returns the attributes for the tooltip and access key. | |
static | userLink ($userId, $userName, $altUserName=false) |
Make user link (or user contributions for unregistered users) | |
static | userTalkLink ($userId, $userText) |
static | userToolLinks ($userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null) |
Generate standard user tool links (talk, contributions, block link, etc.) | |
static | userToolLinksRedContribs ($userId, $userText, $edits=null) |
Alias for userToolLinks( $userId, $userText, true );. | |
Public Attributes | |
const | TOOL_LINKS_EMAIL = 2 |
const | TOOL_LINKS_NOBLOCK = 1 |
Flags for userToolLinks() | |
Static Public Attributes | |
static | $accesskeycache |
static | $autocommentLocal |
static | $autocommentTitle |
static | $commentContextTitle |
static | $commentLocal |
Static Protected Member Functions | |
static | formatLinksInCommentCallback ($match) |
static | getUploadUrl ($destFile, $query= '') |
Get the URL to upload a certain file. | |
Static Private Member Functions | |
static | fnamePart ($url) |
Returns the filename part of an url. | |
static | formatAutocomments ($comment, $title=null, $local=false) |
The pattern for autogen comments is / * foo * /, which makes for some nasty regex. | |
static | formatAutocommentsCallback ($match) |
static | getImageLinkMTOParams ($frameParams, $query= '') |
Get the link parameters for MediaTransformOutput::toHtml() from given frame parameters supplied by the Parser. | |
static | getLinkAttributesInternal ($title, $class) |
Common code for getLinkAttributesX functions. | |
static | linkAttribs ($target, $attribs, $options) |
Returns the array of attributes used when linking to the Title $target. | |
static | linkText ($target) |
Default text of the links to the Title $target. | |
static | linkUrl ($target, $query, $options) |
Returns the Url used to link to a Title. |
Some internal bits split of from Skin.php.
These functions are used for primarily page content: links, embedded images, table of contents. Links are also used in the skin.
Definition at line 9 of file Linker.php.
static Linker::accesskey | ( | $ | name | ) | [static] |
Given the id of an interface element, constructs the appropriate accesskey attribute from the system messages.
(Note, this is usually the id but isn't always, because sometimes the accesskey needs to go on a different element than the id, for reverse-compatibility, etc.)
$name | String: id of the element, minus prefixes. |
Definition at line 1786 of file Linker.php.
static Linker::blockLink | ( | $ | userId, |
$ | userText | ||
) | [static] |
$userId | Integer: userid |
$userText | String: user name in database. |
Definition at line 1022 of file Linker.php.
References SpecialPage\getTitleFor(), link(), and wfMsgHtml().
Referenced by userToolLinks().
static Linker::buildRollbackLink | ( | $ | rev | ) | [static] |
Build a raw rollback link, useful for collections of "tool" links.
$rev | Revision object |
Definition at line 1605 of file Linker.php.
References $wgUser, Title\getPrefixedText(), link(), wfMsg(), and wfMsgHtml().
Referenced by generateRollback(), and HistoryPager\historyLine().
static Linker::commentBlock | ( | $ | comment, |
$ | title = null , |
||
$ | local = false |
||
) | [static] |
Wrap a comment in standard punctuation and formatting if it's non-empty, otherwise return empty string.
$comment | String |
$title | Mixed: Title object (to generate link to section in autocomment) or null |
$local | Boolean: whether section links should refer to local page |
Definition at line 1394 of file Linker.php.
References $comment, and formatComment().
Referenced by ImageListPager\formatValue(), BlockListPager\formatValue(), LogFormatter\getComment(), RevDel_FileItem\getComment(), SpecialUndelete\getFileComment(), RevDel_LogItem\getHTML(), EditPage\getSummaryPreview(), ChangesList\insertComment(), and revComment().
static Linker::emailLink | ( | $ | userId, |
$ | userText | ||
) | [static] |
$userId | Integer: userid |
$userText | String: user name in database. |
Definition at line 1033 of file Linker.php.
References SpecialPage\getTitleFor(), link(), and wfMsgHtml().
Referenced by userToolLinks().
static Linker::fnamePart | ( | $ | url | ) | [static, private] |
Returns the filename part of an url.
Used as alternative text for external images.
$url | string |
Definition at line 420 of file Linker.php.
References $url.
Referenced by makeExternalImage().
static Linker::formatAutocomments | ( | $ | comment, |
$ | title = null , |
||
$ | local = false |
||
) | [static, private] |
The pattern for autogen comments is / * foo * /, which makes for some nasty regex.
We look for all comments, match any text before and after the comment, add a separator where needed and format the comment itself with CSS Called by Linker::formatComment.
$comment | String: comment text |
$title | An optional title object used to links to sections |
$local | Boolean: whether section links should refer to local page |
Definition at line 1133 of file Linker.php.
References $comment, and $title.
Referenced by formatComment().
static Linker::formatAutocommentsCallback | ( | $ | match | ) | [static, private] |
$match |
Definition at line 1150 of file Linker.php.
References $autocommentLocal, $autocommentTitle, $comment, $section, $wgLang, Title\getDBkey(), Title\getNamespace(), link(), Title\makeTitleSafe(), Title\newFromText(), Sanitizer\normalizeSectionNameWhitespace(), and wfMsgExt().
static Linker::formatComment | ( | $ | comment, |
$ | title = null , |
||
$ | local = false |
||
) | [static] |
This function is called by all recent changes variants, by the page history, and by the user contributions list.
It is responsible for formatting edit comments. It escapes any HTML in the comment, but adds some CSS to format auto-generated comments (from section editing) and formats [[wikilinks]].
Note: there's not always a title to pass to this function. Since you can't set a default parameter for a reference, I've turned it temporarily to a value pass. Should be adjusted further. --brion
$comment | String |
$title | Mixed: Title object (to generate link to the section in autocomment) or null |
$local | Boolean: whether section links should refer to local page |
Definition at line 1099 of file Linker.php.
References $comment, Sanitizer\escapeHtmlAllowEntities(), formatAutocomments(), formatLinksInComment(), wfProfileIn(), and wfProfileOut().
Referenced by commentBlock(), ApiParse\execute(), ApiQueryDeletedrevs\execute(), ApiQueryFilearchive\execute(), ApiQueryWatchlist\extractRowInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryContributions\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryRevisions\extractRowInfo(), FeedUtils\formatDiffRow(), ApiQueryImageInfo\getInfo(), ImageHistoryList\imageHistoryLine(), RollbackAction\onView(), ApiQueryProtectedTitles\run(), ParserTest\runTest(), and NewParserTest\testParserTest().
static Linker::formatHiddenCategories | ( | $ | hiddencats | ) | [static] |
Returns HTML for the "hidden categories on this page" list.
$hiddencats | Array of hidden categories from Article::getHiddenCategories or similar |
Definition at line 1698 of file Linker.php.
References $wgLang, link(), wfMsgExt(), and wfProfileIn().
Referenced by EditPage\showEditForm().
static Linker::formatLinksInComment | ( | $ | comment, |
$ | title = null , |
||
$ | local = false |
||
) | [static] |
Formats wiki links and media links in text; all other wiki formatting is ignored.
$comment | String: text to format links in |
$title | An optional title object used to links to sections |
$local | Boolean: whether section links should refer to local page |
Definition at line 1212 of file Linker.php.
References $comment, and $title.
Referenced by formatComment().
static Linker::formatLinksInCommentCallback | ( | $ | match | ) | [static, protected] |
$match |
Definition at line 1239 of file Linker.php.
References $comment, $commentContextTitle, $wgContLang, StringUtils\escapeRegexReplacement(), false, MWNamespace\getCanonicalName(), link(), makeMediaLinkObj(), Title\makeTitleSafe(), Title\newFromText(), normalizeSubpageLink(), and splitTrail().
static Linker::formatRevisionSize | ( | $ | size | ) | [static] |
$size |
Definition at line 1437 of file Linker.php.
References $size, $wgLang, and wfMsgExt().
Referenced by SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedpages\formatRow(), and ContribsPager\formatRow().
static Linker::formatSize | ( | $ | size | ) | [static] |
Format a size in bytes for output, using an appropriate unit (B, KB, MB or GB) according to the magnitude in question.
$size | Size to format |
Definition at line 1725 of file Linker.php.
Referenced by ImageHistoryList\imageHistoryLine().
static Linker::formatTemplates | ( | $ | templates, |
$ | preview = false , |
||
$ | section = false |
||
) | [static] |
Returns HTML for the "templates used on this page" list.
$templates | Array of templates from Article::getUsedTemplate or similar |
$preview | Boolean: whether this is for a preview |
$section | Boolean: whether this is for a section edit |
Definition at line 1635 of file Linker.php.
References $section, LinkBatch\addObj(), link(), wfMsg(), wfMsgExt(), wfProfileIn(), and wfProfileOut().
Referenced by EditPage\displayPermissionsError(), OutputPage\readOnlyPage(), and EditPage\showEditForm().
static Linker::generateRollback | ( | $ | rev | ) | [static] |
Generate a rollback link for a given revision.
Currently it's the caller's responsibility to ensure that the revision is the top one. If it's not, of course, the user will get an error message.
If the calling page is called with the parameter &bot=1, all rollback links also get that parameter. It causes the edit itself and the rollback to be marked as "bot" edits. Bot edits are hidden by default from recent changes, so this allows sysops to combat a busy vandal without bothering other users.
$rev | Revision object |
Definition at line 1593 of file Linker.php.
References buildRollbackLink().
Referenced by ContribsPager\formatRow(), and DifferenceEngine\showDiffPage().
static Linker::generateTOC | ( | $ | tree | ) | [static] |
Generate a table of contents from a section tree Currently unused.
$tree | Return value of ParserOutput::getSections() |
Definition at line 1515 of file Linker.php.
References $section, tocIndent(), tocLine(), tocLineEnd(), tocList(), and tocUnindent().
static Linker::getExternalLinkAttributes | ( | $ | class = 'external' | ) | [static] |
Get the appropriate HTML attributes to add to the "a" element of an ex- ternal link, as created by [wikisyntax].
$class | String: the contents of the class attribute; if an empty string is passed, which is the default value, defaults to 'external'. |
Definition at line 25 of file Linker.php.
References getLinkAttributesInternal(), and wfDeprecated().
static Linker::getImageLinkMTOParams | ( | $ | frameParams, |
$ | query = '' |
||
) | [static, private] |
Get the link parameters for MediaTransformOutput::toHtml() from given frame parameters supplied by the Parser.
$frameParams | The frame parameters |
$query | An optional query string to add to description page links |
Definition at line 615 of file Linker.php.
References normaliseSpecialPage().
Referenced by makeImageLink2(), and makeThumbLink2().
static Linker::getInternalLinkAttributes | ( | $ | title, |
$ | unused = null , |
||
$ | class = '' |
||
) | [static] |
Get the appropriate HTML attributes to add to the "a" element of an in- ternal link.
$title | String: the title text for the link, URL-encoded (???) but not HTML-escaped |
$unused | String: unused |
$class | String: the contents of the class attribute, default none |
Definition at line 61 of file Linker.php.
References $title, and getLinkAttributesInternal().
Referenced by LegacyTemplate\pageTitleLinks().
static Linker::getInternalLinkAttributesObj | ( | $ | nt, |
$ | unused = null , |
||
$ | class = '' , |
||
$ | title = false |
||
) | [static] |
Get the appropriate HTML attributes to add to the "a" element of an in- ternal link, given the Title object for the page we want to link to.
$nt | Title |
$unused | String: unused |
$class | String: the contents of the class attribute, default none |
$title | Mixed: optional (unescaped) string to use in the title attribute; if false, default to the name of the page we're linking to |
Definition at line 77 of file Linker.php.
References $title, and getLinkAttributesInternal().
Referenced by makeColouredLinkObj().
static Linker::getInterwikiLinkAttributes | ( | $ | title, |
$ | unused = null , |
||
$ | class = 'external' |
||
) | [static] |
Get the appropriate HTML attributes to add to the "a" element of an in- terwiki link.
$title | String: the title text for the link, URL-encoded (???) but not HTML-escaped |
$unused | String: unused |
$class | String: the contents of the class attribute; if an empty string is passed, which is the default value, defaults to 'external'. |
Definition at line 40 of file Linker.php.
References $title, $wgContLang, and getLinkAttributesInternal().
static Linker::getLinkAttributesInternal | ( | $ | title, |
$ | class | ||
) | [static, private] |
Common code for getLinkAttributesX functions.
$title | string |
$class | string |
Definition at line 92 of file Linker.php.
References $title.
Referenced by getExternalLinkAttributes(), getInternalLinkAttributes(), getInternalLinkAttributesObj(), and getInterwikiLinkAttributes().
static Linker::getLinkColour | ( | $ | t, |
$ | threshold | ||
) | [static] |
Return the CSS colour of a known link.
$t | Title object |
$threshold | Integer: user defined threshold |
Definition at line 112 of file Linker.php.
References $t.
Referenced by LinkHolderArray\doVariants(), linkAttribs(), and LinkHolderArray\replaceInternal().
static Linker::getRevDeleteLink | ( | User $ | user, |
Revision $ | rev, | ||
Title $ | title | ||
) | [static] |
Get a revision-deletion link, or disabled link, or nothing, depending on user permissions & the settings on the revision.
Will use forward-compatible revision ID in the Special:RevDelete link if possible, otherwise the timestamp-based ID which may break after undeletion.
Definition at line 1823 of file Linker.php.
Referenced by SpecialUndelete\diffHeader(), SpecialUndelete\formatRevisionRow(), DeletedContribsPager\formatRow(), ContribsPager\formatRow(), DifferenceEngine\revisionDeleteLink(), Article\setOldSubtitle(), and SpecialUndelete\showRevision().
static Linker::getUploadUrl | ( | $ | destFile, |
$ | query = '' |
||
) | [static, protected] |
Get the URL to upload a certain file.
$destFile | Title object of the file to upload |
$query | String: urlencoded query string to prepend |
Definition at line 817 of file Linker.php.
References $wgUploadMissingFileUrl, $wgUploadNavigationUrl, SpecialPage\getTitleFor(), and wfAppendQuery().
Referenced by makeBrokenImageLinkObj(), and makeMediaLinkFile().
static Linker::link | ( | $ | target, |
$ | html = null , |
||
$ | customAttribs = array() , |
||
$ | query = array() , |
||
$ | options = array() |
||
) | [static] |
This function returns an HTML link to the given target.
It serves a few purposes: 1) If $target is a Title, the correct URL to link to will be figured out automatically. 2) It automatically adds the usual classes for various types of link targets: "new" for red links, "stub" for short articles, etc. 3) It escapes all attribute values safely so there's no risk of XSS. 4) It provides a default tooltip if the target is a Title (the page name of the target). link() replaces the old functions in the makeLink() family.
$target | Title Can currently only be a Title, but this may change to support Images, literal URLs, etc. |
$html | string The HTML contents of the element, i.e., the link text. This is raw HTML and will not be escaped. If null, defaults to the prefixed text of the Title; or if the Title is just a fragment, the contents of the fragment. |
$customAttribs | array A key => value array of extra HTML attri- butes, such as title and class. (href is ignored.) Classes will be merged with the default classes, while other attributes will replace default attributes. All passed attribute values will be HTML-escaped. A false attribute value means to suppress that attribute. |
$query | array The query string to append to the URL you're linking to, in key => value array form. Query keys and values will be URL-encoded. |
$options | string|array String or array of strings: 'known': Page is known to exist, so don't check if it does. 'broken': Page is known not to exist, so don't check if it does. 'noclasses': Don't add any classes automatically (includes "new", "stub", "mw-redirect", "extiw"). Only use the class attribute provided, if any, so you get a simple blue link with no funny i- cons. 'forcearticlepath': Use the article path always, even with a querystring. Has compatibility issues on some setups, so avoid wherever possible. |
Definition at line 168 of file Linker.php.
References $options, linkText(), normaliseSpecialPage(), Html\rawElement(), wfAppendQuery(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by OutputPage\addBacklinkSubtitle(), OutputPage\addCategoryLinks(), CategoryViewer\addImage(), CategoryViewer\addPage(), OutputPage\addReturnTo(), CategoryViewer\addSubcategoryObject(), blockLink(), ProtectionForm\buildForm(), SpecialEditWatchlist\buildRemoveLine(), buildRollbackLink(), Article\confirmDelete(), SpecialContributions\contributionsSub(), Article\delete(), SpecialUndelete\diffHeader(), CologneBlueTemplate\doAfterContent(), Skin\doEditSectionLink(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), Skin\drawCategoryBrowser(), emailLink(), SpecialListGroupRights\execute(), SpecialNewpages\filterLinks(), formatAutocommentsCallback(), formatHiddenCategories(), formatLinksInCommentCallback(), WantedCategoriesPage\formatResult(), UnusedCategoriesPage\formatResult(), MostcategoriesPage\formatResult(), MostlinkedCategoriesPage\formatResult(), DoubleRedirectsPage\formatResult(), BrokenRedirectsPage\formatResult(), ShortPagesPage\formatResult(), MIMEsearchPage\formatResult(), MostlinkedPage\formatResult(), MostlinkedTemplatesPage\formatResult(), ListredirectsPage\formatResult(), DisambiguationsPage\formatResult(), FileDuplicateSearchPage\formatResult(), WantedQueryPage\formatResult(), SpecialProtectedtitles\formatRow(), SpecialProtectedpages\formatRow(), NewFilesPager\formatRow(), CategoryPager\formatRow(), UsersPager\formatRow(), DeletedContribsPager\formatRow(), ContribsPager\formatRow(), formatTemplates(), ImageListPager\formatValue(), AllmessagesTablePager\formatValue(), Preferences\generateSkinOptions(), PreferencesForm\getButtons(), Skin\getCategoryLinks(), RevDel_RevisionItem\getDiffLink(), RevisionItem\getDiffLink(), RevDel_ArchiveItem\getDiffLink(), SpecialUnblock\getFields(), LogEventsList\getFilterLinks(), SpecialEmailUser\getFormFields(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialStatistics\getGroupStats(), RevDel_LogItem\getHTML(), RevDel_FileItem\getLink(), RevDel_ArchivedFileItem\getLink(), PatrolLogFormatter\getMessageParameters(), SpecialStatistics\getMostViewedPages(), RevDel_RevisionItem\getRevisionLink(), RevisionItem\getRevisionLink(), RevDel_ArchiveItem\getRevisionLink(), DeletedContributionsPage\getSubTitle(), LogPage\getTitleLink(), SpecialContributions\getUserLinks(), LegacyTemplate\historyLink(), ImagePage\imageDupes(), ImageHistoryList\imageHistoryLine(), linkKnown(), LogEventsList\logActionLinks(), makeBrokenLinkObj(), User\makeGroupLinkHTML(), makeImageLink2(), makeKnownLinkObj(), makeLinkObj(), LogFormatter\makePageLink(), MostlinkedTemplatesPage\makeWlhLink(), WantedQueryPage\makeWlhLink(), LegacyTemplate\nameAndLogin(), ImagePage\openShowImage(), SpecialBlock\postText(), Preferences\profilePreferences(), StandardTemplate\quickBar(), CologneBlueTemplate\quickBar(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesLine(), LinkHolderArray\replaceInternal(), LinkHolderArray\replaceInterwiki(), revDeleteLink(), Article\setOldSubtitle(), SpecialAllpages\showChunk(), MovePageForm\showForm(), FileDeleteForm\showForm(), SpecialRevisionDelete\showForm(), Article\showPatrolFooter(), MovePageForm\showSubpages(), SpecialEditWatchlist\showTitles(), SpecialAllpages\showToplevel(), Preferences\skinPreferences(), LegacyTemplate\talkLink(), ImageGallery\toHTML(), NostalgiaTemplate\topLinks(), ImagePage\uploadLinksBox(), userLink(), userTalkLink(), userToolLinks(), and Article\viewRedirect().
static Linker::linkAttribs | ( | $ | target, |
$ | attribs, | ||
$ | options | ||
) | [static, private] |
Returns the array of attributes used when linking to the Title $target.
$target | Title |
$attribs | |
$options |
Definition at line 278 of file Linker.php.
References $options, $wgUser, getLinkColour(), Sanitizer\mergeAttributes(), wfMsg(), wfProfileIn(), and wfProfileOut().
static Linker::linkKnown | ( | $ | target, |
$ | html = null , |
||
$ | customAttribs = array() , |
||
$ | query = array() , |
||
$ | options = array( 'known', 'noclasses' ) |
||
) | [static] |
Identical to link(), except $options defaults to 'known'.
Definition at line 233 of file Linker.php.
References $options, and link().
Referenced by SpecialEditWatchlist\buildRemoveLine(), SpecialEditWatchlist\buildTools(), LegacyTemplate\commentLink(), HistoryPager\curLink(), SpecialWatchlist\daysLink(), LegacyTemplate\deleteThisPage(), MovePageForm\doSubmit(), LegacyTemplate\editThisPage(), LegacyTemplate\emailUserLink(), SpecialJavaScriptTest\execute(), SpecialEditWatchlist\execute(), SpecialWatchlist\execute(), SpecialListGroupRights\execute(), EmailConfirmation\execute(), Skin\footerLink(), PageQueryPage\formatResult(), PopularPagesPage\formatResult(), AncientPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), UnwatchedpagesPage\formatResult(), FewestrevisionsPage\formatResult(), DoubleRedirectsPage\formatResult(), ShortPagesPage\formatResult(), BrokenRedirectsPage\formatResult(), LinkSearchPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedpages\formatRow(), DeletedContribsPager\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), ImageListPager\formatValue(), BlockListPager\formatValue(), AllmessagesTablePager\formatValue(), EditPage\getCancelLink(), Skin\getCopyright(), HistoryAction\getDescription(), SpecialUpload\getExistsWarning(), SpecialUndelete\getFileLink(), SpecialStatistics\getGroupStats(), RevisionDeleter\getLogLinks(), Skin\getNewtalks(), SpecialUndelete\getPageLink(), SpecialStatistics\getPageStats(), DifferenceEngine\getRevisionHeader(), DeletedContributionsPage\getSubTitle(), Skin\getUndeleteLink(), LegacyTemplate\getUploadLink(), SpecialContributions\getUserLinks(), SpecialStatistics\getUserStats(), HistoryPager\historyLine(), SpecialWatchlist\hoursLink(), ImagePage\imageLinks(), ChangesList\insertArticleLink(), ChangesList\insertDiffHist(), ChangesList\insertLog(), HistoryPager\lastLink(), SpecialWhatLinksHere\listItem(), Skin\mainPageLink(), makeBrokenImageLinkObj(), Parser\makeKnownLinkHolder(), LoginForm\makeLanguageSelectorLink(), IndexPager\makeLink(), SpecialRecentChanges\makeOptionsLink(), SpecialWhatLinksHere\makeSelfLink(), MostlinkedPage\makeWlhLink(), DifferenceEngine\markPatrolledLink(), LegacyTemplate\moveThisPage(), CreditsAction\othersLink(), SpecialSpecialpages\outputPageList(), LegacyTemplate\pageTitleLinks(), CategoryViewer\pagingLinks(), SpecialBlock\postText(), Preferences\profilePreferences(), LegacyTemplate\protectThisPage(), StandardTemplate\quickBar(), CologneBlueTemplate\quickBar(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), EnhancedChangesList\recentChangesLine(), ImportReporter\reportPage(), HistoryPager\revLink(), SpecialAllpages\showChunk(), SpecialRevisionDelete\showConvenienceLinks(), DifferenceEngine\showDiffPage(), SpecialWatchlist\showHideLink(), SpecialSearch\showHit(), SpecialSearch\showInterwikiHit(), SpecialUndelete\showList(), OutputPage\showPermissionsErrorPage(), SpecialPrefixindex\showPrefixChunk(), Article\showRedirectedFromHeader(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUpload\showViewDeletedLinks(), specialLink(), Skin\subPageSubtitle(), CologneBlueTemplate\sysLinks(), SpecialUndelete\undelete(), LegacyTemplate\userContribsLink(), Article\viewRedirect(), LegacyTemplate\watchPageLinksLink(), LegacyTemplate\watchThisPage(), LegacyTemplate\whatLinksHere(), and SpecialWhatLinksHere\wlhLink().
static Linker::linkText | ( | $ | target | ) | [static, private] |
Default text of the links to the Title $target.
$target | Title |
Definition at line 340 of file Linker.php.
Referenced by link(), makeBrokenLinkObj(), makeKnownLinkObj(), and makeLinkObj().
static Linker::linkUrl | ( | $ | target, |
$ | query, | ||
$ | options | ||
) | [static, private] |
Returns the Url used to link to a Title.
$target | Title |
$query | Array: query parameters |
$options | Array |
Definition at line 247 of file Linker.php.
References $options, wfProfileIn(), and wfProfileOut().
static Linker::makeBrokenImageLinkObj | ( | $ | title, |
$ | label = '' , |
||
$ | query = '' , |
||
$ | unused1 = '' , |
||
$ | unused2 = '' , |
||
$ | time = false |
||
) | [static] |
Make a "broken" link to an image.
$title | Title object |
$label | String: link label (plain text) |
$query | String: query string |
$unused1 | Unused parameter kept for b/c |
$unused2 | Unused parameter kept for b/c |
$time | Boolean: a file of a certain timestamp was requested |
Definition at line 778 of file Linker.php.
References $wgEnableUploads, $wgUploadMissingFileUrl, $wgUploadNavigationUrl, false, Title\getPrefixedText(), getUploadUrl(), linkKnown(), RepoGroup\singleton(), wfCgiToArray(), wfFindFile(), wfProfileIn(), and wfProfileOut().
Referenced by makeImageLink2(), and makeThumbLink2().
static Linker::makeBrokenLink | ( | $ | title, |
$ | text = '' , |
||
$ | query = '' , |
||
$ | trail = '' |
||
) | [static] |
This function is a shortcut to makeBrokenLinkObj(Title::newFromText($title),...). Do not call it if you already have a title object handy. See makeBrokenLinkObj for further documentation.
$title | String: The text of the title |
$text | String: Link text |
$query | String: Optional query part |
$trail | String: Optional trail. Alphabetic characters at the start of this string will be included in the link text. Other characters will be appended after the end of the link. |
Definition at line 1900 of file Linker.php.
References makeBrokenLinkObj(), Title\newFromText(), wfDebug(), and wfDeprecated().
static Linker::makeBrokenLinkObj | ( | $ | title, |
$ | text = '' , |
||
$ | query = '' , |
||
$ | trail = '' , |
||
$ | prefix = '' |
||
) | [static] |
Make a red link to the edit page of a given title.
$title | Title object of the target page |
$text | String: Link text |
$query | String: Optional query part |
$trail | String: Optional trail. Alphabetic characters at the start of this string will be included in the link text. Other characters will be appended after the end of the link. |
$prefix | String: Optional prefix |
Definition at line 1997 of file Linker.php.
References link(), linkText(), splitTrail(), wfCgiToArray(), wfDeprecated(), wfProfileIn(), and wfProfileOut().
Referenced by makeBrokenLink().
static Linker::makeColouredLinkObj | ( | $ | nt, |
$ | colour, | ||
$ | text = '' , |
||
$ | query = '' , |
||
$ | trail = '' , |
||
$ | prefix = '' |
||
) | [static] |
Make a coloured link.
$nt | Title object of the target page |
$colour | Integer: colour of the link |
$text | String: link text |
$query | String: optional query part |
$trail | String: optional trail. Alphabetic characters at the start of this string will be included in the link text. Other characters will be appended after the end of the link. |
$prefix | String: Optional prefix |
Definition at line 2028 of file Linker.php.
References getInternalLinkAttributesObj(), makeKnownLinkObj(), and wfDeprecated().
Referenced by makeSizeLinkObj().
static Linker::makeExternalImage | ( | $ | url, |
$ | alt = '' |
||
) | [static] |
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
$url | |
$alt |
Definition at line 439 of file Linker.php.
References $success, $url, Html\element(), fnamePart(), wfDebug(), and wfRunHooks().
Referenced by Parser\maybeMakeExternalImage().
static Linker::makeExternalLink | ( | $ | url, |
$ | text, | ||
$ | escape = true , |
||
$ | linktype = '' , |
||
$ | attribs = array() |
||
) | [static] |
Make an external link.
$url | String: URL to link to |
$text | String: text of link |
$escape | Boolean: do we escape the link text? |
$linktype | String: type of external link. Gets added to the classes |
$attribs | Array of extra attributes to |
Definition at line 896 of file Linker.php.
References $success, $url, Html\rawElement(), wfDebug(), and wfRunHooks().
Referenced by LinkSearchPage\formatResult(), Skin\getCopyright(), LegacyTemplate\getUploadLink(), ImagePage\imageDupes(), Parser\magicLinkCallback(), WikiMap\makeForeignLink(), Parser\makeFreeExternalLink(), Parser\replaceExternalLinks(), Article\showRedirectedFromHeader(), and ImagePage\uploadLinksBox().
static Linker::makeHeadline | ( | $ | level, |
$ | attribs, | ||
$ | anchor, | ||
$ | html, | ||
$ | link, | ||
$ | legacyAnchor = false |
||
) | [static] |
Create a headline for content.
$level | Integer: the level of the headline (1-6) |
$attribs | String: any attributes for the headline, starting with a space and ending with '>' This *must* be at least '>' for no attribs |
$anchor | String: the anchor to give the headline (the bit after the #) |
$html | String: html for the text of the header |
$link | String: HTML to add for the section edit link |
$legacyAnchor | Mixed: a second, optional anchor to give for backward compatibility (false to omit) |
Definition at line 1551 of file Linker.php.
Referenced by Parser\formatHeadings().
static Linker::makeImageLink2 | ( | Title $ | title, |
$ | file, | ||
$ | frameParams = array() , |
||
$ | handlerParams = array() , |
||
$ | time = false , |
||
$ | query = "" , |
||
$ | widthOption = null |
||
) | [static] |
Given parameters derived from [[Image:Foo|options...]], generate the HTML that that syntax inserts in the page.
$title | Title object |
$file | File object, or false if it doesn't exist |
$frameParams | Array: associative array of parameters external to the media handler. Boolean parameters are indicated by presence or absence, the value is arbitrary and will often be false. thumbnail If present, downscale and frame manualthumb Image name to use as a thumbnail, instead of automatic scaling framed Shows image in original size in a frame frameless Downscale but don't frame upright If present, tweak default sizes for portrait orientation upright_factor Fudge factor for "upright" tweak (default 0.75) border If present, show a border around the image align Horizontal alignment (left, right, center, none) valign Vertical alignment (baseline, sub, super, top, text-top, middle, bottom, text-bottom) alt Alternate text for image (i.e. alt attribute). Plain text. caption HTML for image caption. link-url URL to link to link-title Title object to link to link-target Value for the target attribue, only with link-url no-link Boolean, suppress description link |
$handlerParams | Array: associative array of media handler parameters, to be passed to transform(). Typical keys are "width" and "page". |
$time | String: timestamp of the file, set as false for current |
$query | String: query params for desc url |
$widthOption,: | Used by the parser to remember the user preference thumbnailsize |
Definition at line 488 of file Linker.php.
References $file, $page, $res, $wgContLang, $wgSVGMaxSize, $wgThumbLimits, $wgThumbUpright, User\getDefaultOption(), getImageLinkMTOParams(), Title\getPrefixedDBkey(), link(), makeBrokenImageLinkObj(), makeThumbLink2(), wfDebug(), and wfRunHooks().
Referenced by Parser\makeImage().
static Linker::makeKnownLinkObj | ( | $ | title, |
$ | text = '' , |
||
$ | query = '' , |
||
$ | trail = '' , |
||
$ | prefix = '' , |
||
$ | aprops = '' , |
||
$ | style = '' |
||
) | [static] |
Make a link for a title which definitely exists. This is faster than makeLinkObj because it doesn't have to do a database query. It's also valid for interwiki titles and special pages.
$title | Title object of target page |
$text | String: text to replace the title |
$query | String: link target |
$trail | String: text after link |
$prefix | String: text before link text |
$aprops | String: extra attributes to the a-element |
$style | String: style to apply - if empty, use getInternalLinkAttributesObj instead |
Definition at line 1960 of file Linker.php.
References Sanitizer\decodeTagAttributes(), link(), linkText(), Sanitizer\mergeAttributes(), splitTrail(), wfCgiToArray(), wfProfileIn(), and wfProfileOut().
Referenced by makeColouredLinkObj().
static Linker::makeLinkObj | ( | $ | nt, |
$ | text = '' , |
||
$ | query = '' , |
||
$ | trail = '' , |
||
$ | prefix = '' |
||
) | [static] |
Make a link for a title which may or may not be in the database. If you need to call this lots of times, pre-fill the link cache with a LinkBatch, otherwise each call to this will result in a DB query.
$nt | Title: the title object to make the link from, e.g. from Title::newFromText. |
$text | String: link text |
$query | String: optional query part |
$trail | String: optional trail. Alphabetic characters at the start of this string will be included in the link text. Other characters will be appended after the end of the link. |
$prefix | String: optional prefix. As trail, only before instead of after. |
Definition at line 1928 of file Linker.php.
References link(), linkText(), splitTrail(), wfCgiToArray(), wfProfileIn(), and wfProfileOut().
static Linker::makeMediaLinkFile | ( | Title $ | title, |
$ | file, | ||
$ | html = '' |
||
) | [static] |
Create a direct link to a given uploaded file.
This will make a broken link if $file is false.
$title | Title object. |
$file | File|false mixed File object or false |
$html | String: pre-sanitized HTML |
Definition at line 857 of file Linker.php.
References $file, $url, Title\getText(), and getUploadUrl().
Referenced by makeMediaLinkObj().
static Linker::makeMediaLinkObj | ( | $ | title, |
$ | html = '' , |
||
$ | time = false |
||
) | [static] |
Create a direct link to a given uploaded file.
$title | Title object. |
$html | String: pre-sanitized HTML |
$time | string: MW timestamp of file creation time |
Definition at line 841 of file Linker.php.
References makeMediaLinkFile(), and wfFindFile().
Referenced by formatLinksInCommentCallback(), and MIMEsearchPage\formatResult().
static Linker::makeSelfLinkObj | ( | $ | nt, |
$ | html = '' , |
||
$ | query = '' , |
||
$ | trail = '' , |
||
$ | prefix = '' |
||
) | [static] |
Make appropriate markup for a link to the current article.
This is currently rendered as the bold link text. The calling sequence is the same as the other make*LinkObj static functions, despite $query not being used.
$nt | Title |
Definition at line 386 of file Linker.php.
References splitTrail().
static Linker::makeSizeLinkObj | ( | $ | size, |
$ | nt, | ||
$ | text = '' , |
||
$ | query = '' , |
||
$ | trail = '' , |
||
$ | prefix = '' |
||
) | [static] |
Generate either a normal exists-style link or a stub link, depending on the given page size.
$size | Integer |
$nt | Title object. |
$text | String |
$query | String |
$trail | String |
$prefix | String |
Definition at line 367 of file Linker.php.
References $size, $wgUser, makeColouredLinkObj(), and wfDeprecated().
static Linker::makeThumbLink2 | ( | Title $ | title, |
$ | file, | ||
$ | frameParams = array() , |
||
$ | handlerParams = array() , |
||
$ | time = false , |
||
$ | query = "" |
||
) | [static] |
Definition at line 670 of file Linker.php.
References $file, $page, $url, $wgContLang, $wgStylePath, Html\element(), getImageLinkMTOParams(), Title\getLocalURL(), makeBrokenImageLinkObj(), Title\makeTitleSafe(), Html\rawElement(), wfAppendQuery(), wfFindFile(), and wfMsg().
Referenced by makeImageLink2(), and makeThumbLinkObj().
static Linker::makeThumbLinkObj | ( | Title $ | title, |
$ | file, | ||
$ | label = '' , |
||
$ | alt, | ||
$ | align = 'right' , |
||
$ | params = array() , |
||
$ | framed = false , |
||
$ | manualthumb = "" |
||
) | [static] |
Make HTML for a thumbnail including image, border and caption.
$title | Title object |
$file | File object or false if it doesn't exist |
$label | String |
$alt | String |
$align | String |
$params | Array |
$framed | Boolean |
$manualthumb | String |
Definition at line 644 of file Linker.php.
References $file, and makeThumbLink2().
Referenced by ImagePage\openShowImage().
static Linker::normaliseSpecialPage | ( | Title $ | title | ) | [static] |
$title | Title |
Definition at line 398 of file Linker.php.
References $title, Title\getDBkey(), Title\getFragment(), SpecialPage\getTitleFor(), Title\isSpecialPage(), and SpecialPageFactory\resolveAlias().
Referenced by getImageLinkMTOParams(), and link().
static Linker::normalizeSubpageLink | ( | $ | contextTitle, |
$ | target, | ||
&$ | text | ||
) | [static] |
$contextTitle | Title |
$target | |
$text |
Definition at line 1312 of file Linker.php.
References MWNamespace\hasSubpages(), wfProfileIn(), and wfProfileOut().
Referenced by formatLinksInCommentCallback(), and Parser\maybeDoSubpageLink().
static Linker::revComment | ( | Revision $ | rev, |
$ | local = false , |
||
$ | isPublic = false |
||
) | [static] |
Wrap and format the given revision's comment block, if the current user is allowed to view it.
$rev | Revision object |
$local | Boolean: whether section links should refer to local page |
$isPublic | Boolean: show only if all users can see it |
Definition at line 1415 of file Linker.php.
References commentBlock(), Revision\DELETED_COMMENT, Revision\FOR_THIS_USER, Revision\getComment(), Revision\getRawComment(), Revision\getTitle(), Revision\isDeleted(), Revision\userCan(), and wfMsgHtml().
Referenced by SpecialUndelete\diffHeader(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), DeletedContribsPager\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), RevDel_RevisionItem\getHTML(), RevisionItem\getHTML(), HistoryPager\historyLine(), and DifferenceEngine\showDiffPage().
static Linker::revDeleteLink | ( | $ | query = array() , |
$ | restricted = false , |
||
$ | delete = true |
||
) | [static] |
Creates a (show/hide) link for deleting revisions/log entries.
$query | Array: query parameters to be passed to link() |
$restricted | Boolean: set to true to use a instead of a |
$delete | Boolean: set to true to use (show/hide) rather than (show) |
Definition at line 1864 of file Linker.php.
References SpecialPage\getTitleFor(), link(), Xml\tags(), and wfMsgHtml().
Referenced by SpecialUndelete\formatFileRow(), LogEventsList\getShowHideLinks(), HistoryPager\historyLine(), and ImageHistoryList\imageHistoryLine().
static Linker::revDeleteLinkDisabled | ( | $ | delete = true | ) | [static] |
Creates a dead (show/hide) link for deleting revisions/log entries.
$delete | Boolean: set to true to use (show/hide) rather than (show) |
Definition at line 1880 of file Linker.php.
References Xml\tags(), and wfMsgHtml().
Referenced by SpecialUndelete\formatFileRow(), LogEventsList\getShowHideLinks(), HistoryPager\historyLine(), and ImageHistoryList\imageHistoryLine().
static Linker::revUserLink | ( | $ | rev, |
$ | isPublic = false |
||
) | [static] |
Generate a user link if the current user is allowed to view it.
$rev | Revision object. |
$isPublic | Boolean: show only if all users can see it |
Definition at line 1045 of file Linker.php.
References Revision\DELETED_USER, Revision\FOR_THIS_USER, userLink(), and wfMsgHtml().
Referenced by RevDel_RevisionItem\getHTML(), and RevisionItem\getHTML().
static Linker::revUserTools | ( | $ | rev, |
$ | isPublic = false |
||
) | [static] |
Generate a user tool link cluster if the current user is allowed to view it.
$rev | Revision object. |
$isPublic | Boolean: show only if all users can see it |
Definition at line 1066 of file Linker.php.
References Revision\DELETED_USER, Revision\FOR_THIS_USER, userLink(), userToolLinks(), and wfMsgHtml().
Referenced by SpecialUndelete\diffHeader(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialNewpages\formatRow(), HistoryPager\historyLine(), Article\setOldSubtitle(), DifferenceEngine\showDiffPage(), and SpecialUndelete\showRevision().
static Linker::specialLink | ( | $ | name, |
$ | key = '' |
||
) | [static] |
Make a link to a special page given its name and, optionally, a message key from the link text.
Usage example: Linker::specialLink( 'Recentchanges' )
Definition at line 880 of file Linker.php.
References SpecialPage\getTitleFor(), linkKnown(), and wfMsg().
Referenced by StandardTemplate\doAfterContent(), LegacyTemplate\nameAndLogin(), StandardTemplate\quickBar(), CologneBlueTemplate\quickBar(), CologneBlueTemplate\sysLinks(), NostalgiaTemplate\topLinks(), and LegacyTemplate\topLinks().
static Linker::splitTrail | ( | $ | trail | ) | [static] |
Split a link trail, return the "inside" portion and the remainder of the trail as a two-element array.
Definition at line 1566 of file Linker.php.
References $wgContLang.
Referenced by formatLinksInCommentCallback(), makeBrokenLinkObj(), LinkHolderArray\makeHolder(), Parser\makeKnownLinkHolder(), makeKnownLinkObj(), makeLinkObj(), makeSelfLinkObj(), and Parser\replaceExternalLinks().
static Linker::titleAttrib | ( | $ | name, |
$ | options = null |
||
) | [static] |
Given the id of an interface element, constructs the appropriate title attribute from the system messages.
(Note, this is usually the id but isn't always, because sometimes the accesskey needs to go on a different element than the id, for reverse-compatibility, etc.)
$name | String: id of the element, minus prefixes. |
$options | Mixed: null or the string 'withaccess' to add an access- key hint |
Definition at line 1742 of file Linker.php.
Referenced by MonoBookTemplate\customBox(), EditPage\getCheckboxes(), BaseTemplate\makeLink(), DifferenceEngine\showDiffPage(), EditPage\showEditForm(), and tooltip().
static Linker::tocIndent | ( | ) | [static] |
Add another level to the Table of Contents.
Definition at line 1454 of file Linker.php.
Referenced by Parser\formatHeadings(), generateTOC(), and SpecialEditWatchlist\getNormalForm().
static Linker::tocLine | ( | $ | anchor, |
$ | tocline, | ||
$ | tocnumber, | ||
$ | level, | ||
$ | sectionIndex = false |
||
) | [static] |
parameter level defines if we are on an indentation level
Definition at line 1472 of file Linker.php.
Referenced by Parser\formatHeadings(), generateTOC(), and SpecialEditWatchlist\getNormalForm().
static Linker::tocLineEnd | ( | ) | [static] |
End a Table Of Contents line.
tocUnindent() will be used instead if we're ending a line below the new level.
Definition at line 1488 of file Linker.php.
Referenced by Parser\formatHeadings(), generateTOC(), and SpecialEditWatchlist\getNormalForm().
static Linker::tocList | ( | $ | toc, |
$ | lang = false |
||
) | [static] |
Wraps the TOC in a table and provides the hide/collapse javascript.
$toc | String: html of the Table Of Contents |
$lang | mixed: Language code for the toc title |
Definition at line 1499 of file Linker.php.
References wfMsgExt().
Referenced by Parser\formatHeadings(), generateTOC(), and SpecialEditWatchlist\getNormalForm().
static Linker::tocUnindent | ( | $ | level | ) | [static] |
Finish one or more sublevels on the Table of Contents.
Definition at line 1463 of file Linker.php.
Referenced by Parser\formatHeadings(), and generateTOC().
static Linker::tooltip | ( | $ | name, |
$ | options = null |
||
) | [static] |
Returns raw bits of HTML, use titleAttrib()
Definition at line 2062 of file Linker.php.
References $options, Xml\expandAttributes(), and titleAttrib().
Referenced by VectorTemplate\execute(), and VectorTemplate\renderPortal().
static Linker::tooltipAndAccesskeyAttribs | ( | $ | name | ) | [static] |
Returns the attributes for the tooltip and access key.
Definition at line 2042 of file Linker.php.
Referenced by SpecialExport\execute(), MonoBookTemplate\execute(), VectorTemplate\execute(), HTMLForm\getButtons(), HistoryPager\getStartBody(), EditPage\getSummaryInput(), HTMLFormField\getTooltipAndAccessKey(), BaseTemplate\makeLink(), BaseTemplate\makeSearchButton(), BaseTemplate\makeSearchInput(), UserrightsPage\showEditUserGroupsForm(), and SpecialImport\showForm().
static Linker::userLink | ( | $ | userId, |
$ | userName, | ||
$ | altUserName = false |
||
) | [static] |
Make user link (or user contributions for unregistered users)
$userId | Integer: user id in database. |
$userName | String: user name in database. |
$altUserName | String: text to display instead of the user name (optional) |
Definition at line 928 of file Linker.php.
References $page, SpecialPage\getTitleFor(), link(), and Title\makeTitle().
Referenced by ActiveUsersPager\formatRow(), ContribsPager\formatRow(), BlockListPager\formatValue(), SpecialUndelete\getFileUser(), LogPage\getTitleLink(), RevDel_FileItem\getUserTools(), ImageHistoryList\imageHistoryLine(), ChangesList\insertUserRelatedLinks(), LogFormatter\makeUserLink(), RollbackAction\onView(), EnhancedChangesList\recentChangesLine(), revUserLink(), and revUserTools().
static Linker::userTalkLink | ( | $ | userId, |
$ | userText | ||
) | [static] |
$userId | Integer: user id in database. |
$userText | String: user name in database. |
Definition at line 1011 of file Linker.php.
References link(), Title\makeTitle(), and wfMsgHtml().
Referenced by ContribsPager\formatRow(), and userToolLinks().
static Linker::userToolLinks | ( | $ | userId, |
$ | userText, | ||
$ | redContribsWhenNoEdits = false , |
||
$ | flags = 0 , |
||
$ | edits = null |
||
) | [static] |
Generate standard user tool links (talk, contributions, block link, etc.)
$userId | Integer: user identifier |
$userText | String: user name or IP address |
$redContribsWhenNoEdits | Boolean: should the contributions link be red if the user has no edits? |
$flags | Integer: customisation flags (e.g. Linker::TOOL_LINKS_NOBLOCK and Linker::TOOL_LINKS_EMAIL) |
$edits | Integer: user edit count (optional, for performance) |
Definition at line 953 of file Linker.php.
References $count, $wgDisableAnonTalk, $wgLang, $wgUser, blockLink(), User\edits(), emailLink(), SpecialPage\getTitleFor(), link(), TOOL_LINKS_NOBLOCK, userTalkLink(), wfMsgHtml(), and wfRunHooks().
Referenced by ActiveUsersPager\formatRow(), BlockListPager\formatValue(), SpecialUndelete\getFileUser(), LogPage\getTitleLink(), RevDel_FileItem\getUserTools(), ImageHistoryList\imageHistoryLine(), ChangesList\insertUserRelatedLinks(), LogFormatter\makeUserLink(), RollbackAction\onView(), EnhancedChangesList\recentChangesLine(), revUserTools(), UserrightsPage\showEditUserGroupsForm(), and userToolLinksRedContribs().
static Linker::userToolLinksRedContribs | ( | $ | userId, |
$ | userText, | ||
$ | edits = null |
||
) | [static] |
Alias for userToolLinks( $userId, $userText, true );.
$userId | Integer: user identifier |
$userText | String: user name or IP address |
$edits | Integer: user edit count (optional, for performance) |
Definition at line 1001 of file Linker.php.
References userToolLinks().
Linker::$accesskeycache [static] |
Definition at line 1774 of file Linker.php.
Linker::$autocommentLocal [static] |
Definition at line 1119 of file Linker.php.
Referenced by formatAutocommentsCallback().
Linker::$autocommentTitle [static] |
Definition at line 1118 of file Linker.php.
Referenced by formatAutocommentsCallback().
Linker::$commentContextTitle [static] |
Definition at line 1199 of file Linker.php.
Referenced by formatLinksInCommentCallback().
Linker::$commentLocal [static] |
Definition at line 1200 of file Linker.php.
const Linker::TOOL_LINKS_EMAIL = 2 |
Definition at line 15 of file Linker.php.
Referenced by UserrightsPage\showEditUserGroupsForm().
const Linker::TOOL_LINKS_NOBLOCK = 1 |
Flags for userToolLinks()
Definition at line 14 of file Linker.php.
Referenced by BlockListPager\formatValue(), LogPage\getTitleLink(), and userToolLinks().