MediaWiki REL1_31
DummyLinker.php
Go to the documentation of this file.
1<?php
2
7
11 public function getLinkColour( $t, $threshold ) {
12 wfDeprecated( __METHOD__, '1.28' );
13 return Linker::getLinkColour( $t, $threshold );
14 }
15
16 public function link(
17 $target,
18 $html = null,
19 $customAttribs = [],
20 $query = [],
21 $options = []
22 ) {
23 return Linker::link(
24 $target,
25 $html,
27 $query,
29 );
30 }
31
32 public function linkKnown(
33 $target,
34 $html = null,
35 $customAttribs = [],
36 $query = [],
37 $options = [ 'known' ]
38 ) {
39 return Linker::linkKnown(
40 $target,
41 $html,
43 $query,
45 );
46 }
47
48 public function makeSelfLinkObj(
49 $nt,
50 $html = '',
51 $query = '',
52 $trail = '',
53 $prefix = ''
54 ) {
56 $nt,
57 $html,
58 $query,
59 $trail,
60 $prefix
61 );
62 }
63
66 $namespace,
67 $title
68 ) {
71 $namespace,
72 $title
73 );
74 }
75
76 public function normaliseSpecialPage( Title $title ) {
77 return Linker::normaliseSpecialPage( $title );
78 }
79
80 public function makeExternalImage( $url, $alt = '' ) {
81 return Linker::makeExternalImage( $url, $alt );
82 }
83
84 public function makeImageLink(
86 Title $title,
87 $file,
88 $frameParams = [],
89 $handlerParams = [],
90 $time = false,
91 $query = "",
92 $widthOption = null
93 ) {
95 $parser,
96 $title,
97 $file,
98 $frameParams,
100 $time,
101 $query,
102 $widthOption
103 );
104 }
105
106 public function makeThumbLinkObj(
107 Title $title,
108 $file,
109 $label = '',
110 $alt,
111 $align = 'right',
112 $params = [],
113 $framed = false,
114 $manualthumb = ""
115 ) {
117 $title,
118 $file,
119 $label,
120 $alt,
121 $align,
122 $params,
123 $framed,
124 $manualthumb
125 );
126 }
127
128 public function makeThumbLink2(
129 Title $title,
130 $file,
131 $frameParams = [],
132 $handlerParams = [],
133 $time = false,
134 $query = ""
135 ) {
137 $title,
138 $file,
139 $frameParams,
141 $time,
142 $query
143 );
144 }
145
146 public function processResponsiveImages( $file, $thumb, $hp ) {
148 $file,
149 $thumb,
150 $hp
151 );
152 }
153
154 public function makeBrokenImageLinkObj(
155 $title,
156 $label = '',
157 $query = '',
158 $unused1 = '',
159 $unused2 = '',
160 $time = false
161 ) {
163 $title,
164 $label,
165 $query,
166 $unused1,
167 $unused2,
168 $time
169 );
170 }
171
172 public function makeMediaLinkObj( $title, $html = '', $time = false ) {
174 $title,
175 $html,
176 $time
177 );
178 }
179
180 public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
182 $title,
183 $file,
184 $html
185 );
186 }
187
188 public function specialLink( $name, $key = '' ) {
189 return Linker::specialLink( $name, $key );
190 }
191
192 public function makeExternalLink(
193 $url,
194 $text,
195 $escape = true,
196 $linktype = '',
197 $attribs = [],
198 $title = null
199 ) {
201 $url,
202 $text,
203 $escape,
204 $linktype,
205 $attribs,
206 $title
207 );
208 }
209
210 public function userLink( $userId, $userName, $altUserName = false ) {
211 return Linker::userLink(
212 $userId,
213 $userName,
214 $altUserName
215 );
216 }
217
218 public function userToolLinks(
219 $userId,
220 $userText,
221 $redContribsWhenNoEdits = false,
222 $flags = 0,
223 $edits = null
224 ) {
226 $userId,
227 $userText,
228 $redContribsWhenNoEdits,
229 $flags,
230 $edits
231 );
232 }
233
234 public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
236 $userId,
237 $userText,
238 $edits
239 );
240 }
241
242 public function userTalkLink( $userId, $userText ) {
243 return Linker::userTalkLink( $userId, $userText );
244 }
245
246 public function blockLink( $userId, $userText ) {
247 return Linker::blockLink( $userId, $userText );
248 }
249
250 public function emailLink( $userId, $userText ) {
251 return Linker::emailLink( $userId, $userText );
252 }
253
254 public function revUserLink( $rev, $isPublic = false ) {
255 return Linker::revUserLink( $rev, $isPublic );
256 }
257
258 public function revUserTools( $rev, $isPublic = false ) {
259 return Linker::revUserTools( $rev, $isPublic );
260 }
261
262 public function formatComment(
263 $comment,
264 $title = null,
265 $local = false,
266 $wikiId = null
267 ) {
269 $comment,
270 $title,
271 $local,
272 $wikiId
273 );
274 }
275
276 public function formatLinksInComment(
277 $comment,
278 $title = null,
279 $local = false,
280 $wikiId = null
281 ) {
283 $comment,
284 $title,
285 $local,
286 $wikiId
287 );
288 }
289
290 public function makeCommentLink(
291 Title $title,
292 $text,
293 $wikiId = null,
294 $options = []
295 ) {
297 $title,
298 $text,
299 $wikiId,
301 );
302 }
303
304 public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
306 $contextTitle,
307 $target,
308 $text
309 );
310 }
311
312 public function commentBlock(
313 $comment,
314 $title = null,
315 $local = false,
316 $wikiId = null
317 ) {
319 $comment,
320 $title,
321 $local,
322 $wikiId
323 );
324 }
325
326 public function revComment( Revision $rev, $local = false, $isPublic = false ) {
327 return Linker::revComment( $rev, $local, $isPublic );
328 }
329
330 public function formatRevisionSize( $size ) {
331 return Linker::formatRevisionSize( $size );
332 }
333
334 public function tocIndent() {
335 return Linker::tocIndent();
336 }
337
338 public function tocUnindent( $level ) {
339 return Linker::tocUnindent( $level );
340 }
341
342 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
343 return Linker::tocLine(
344 $anchor,
345 $tocline,
346 $tocnumber,
347 $level,
348 $sectionIndex
349 );
350 }
351
352 public function tocLineEnd() {
353 return Linker::tocLineEnd();
354 }
355
356 public function tocList( $toc, $lang = false ) {
357 return Linker::tocList( $toc, $lang );
358 }
359
360 public function generateTOC( $tree, $lang = false ) {
361 return Linker::generateTOC( $tree, $lang );
362 }
363
364 public function makeHeadline(
365 $level,
366 $attribs,
367 $anchor,
368 $html,
369 $link,
370 $legacyAnchor = false
371 ) {
373 $level,
374 $attribs,
375 $anchor,
376 $html,
377 $link,
378 $legacyAnchor
379 );
380 }
381
382 public function splitTrail( $trail ) {
383 return Linker::splitTrail( $trail );
384 }
385
386 public function generateRollback(
387 $rev,
389 $options = [ 'verify' ]
390 ) {
392 $rev,
393 $context,
395 );
396 }
397
398 public function getRollbackEditCount( $rev, $verify ) {
399 return Linker::getRollbackEditCount( $rev, $verify );
400 }
401
402 public function buildRollbackLink(
403 $rev,
405 $editCount = false
406 ) {
408 $rev,
409 $context,
410 $editCount
411 );
412 }
413
417 public function formatTemplates(
418 $templates,
419 $preview = false,
420 $section = false,
421 $more = null
422 ) {
423 wfDeprecated( __METHOD__, '1.28' );
424
426 $templates,
427 $preview,
428 $section,
429 $more
430 );
431 }
432
433 public function formatHiddenCategories( $hiddencats ) {
434 return Linker::formatHiddenCategories( $hiddencats );
435 }
436
440 public function formatSize( $size ) {
441 wfDeprecated( __METHOD__, '1.28' );
442
443 return Linker::formatSize( $size );
444 }
445
446 public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
447 return Linker::titleAttrib(
448 $name,
449 $options,
450 $msgParams
451 );
452 }
453
454 public function accesskey( $name ) {
455 return Linker::accesskey( $name );
456 }
457
458 public function getRevDeleteLink( User $user, Revision $rev, Title $title ) {
460 $user,
461 $rev,
462 $title
463 );
464 }
465
466 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
468 $query,
469 $restricted,
470 $delete
471 );
472 }
473
474 public function revDeleteLinkDisabled( $delete = true ) {
475 return Linker::revDeleteLinkDisabled( $delete );
476 }
477
478 public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
480 $name,
481 $msgParams
482 );
483 }
484
485 public function tooltip( $name, $options = null ) {
486 return Linker::tooltip( $name, $options );
487 }
488
489}
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
revDeleteLinkDisabled( $delete=true)
makeMediaLinkFile(Title $title, $file, $html='')
tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
userLink( $userId, $userName, $altUserName=false)
makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
tocUnindent( $level)
titleAttrib( $name, $options=null, array $msgParams=[])
buildRollbackLink( $rev, IContextSource $context=null, $editCount=false)
userToolLinksRedContribs( $userId, $userText, $edits=null)
formatHiddenCategories( $hiddencats)
revUserTools( $rev, $isPublic=false)
tooltip( $name, $options=null)
makeExternalImage( $url, $alt='')
processResponsiveImages( $file, $thumb, $hp)
commentBlock( $comment, $title=null, $local=false, $wikiId=null)
normaliseSpecialPage(Title $title)
emailLink( $userId, $userText)
makeMediaLinkObj( $title, $html='', $time=false)
makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
getInvalidTitleDescription(IContextSource $context, $namespace, $title)
revUserLink( $rev, $isPublic=false)
makeHeadline( $level, $attribs, $anchor, $html, $link, $legacyAnchor=false)
accesskey( $name)
specialLink( $name, $key='')
getRollbackEditCount( $rev, $verify)
makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
makeImageLink(Parser $parser, Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="", $widthOption=null)
makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
tocList( $toc, $lang=false)
normalizeSubpageLink( $contextTitle, $target, &$text)
link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
splitTrail( $trail)
blockLink( $userId, $userText)
makeCommentLink(Title $title, $text, $wikiId=null, $options=[])
generateRollback( $rev, IContextSource $context=null, $options=[ 'verify'])
revComment(Revision $rev, $local=false, $isPublic=false)
getRevDeleteLink(User $user, Revision $rev, Title $title)
formatSize( $size)
linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
formatTemplates( $templates, $preview=false, $section=false, $more=null)
formatRevisionSize( $size)
formatLinksInComment( $comment, $title=null, $local=false, $wikiId=null)
formatComment( $comment, $title=null, $local=false, $wikiId=null)
userTalkLink( $userId, $userText)
getLinkColour( $t, $threshold)
revDeleteLink( $query=[], $restricted=false, $delete=true)
generateTOC( $tree, $lang=false)
makeThumbLinkObj(Title $title, $file, $label='', $alt, $align='right', $params=[], $framed=false, $manualthumb="")
static tocList( $toc, $lang=false)
Wraps the TOC in a table and provides the hide/collapse javascript.
Definition Linker.php:1581
static generateRollback( $rev, IContextSource $context=null, $options=[ 'verify'])
Generate a rollback link for a given revision.
Definition Linker.php:1706
static makeMediaLinkFile(Title $title, $file, $html='')
Create a direct link to a given uploaded file.
Definition Linker.php:783
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
Definition Linker.php:107
static tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
Definition Linker.php:1545
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition Linker.php:893
static titleAttrib( $name, $options=null, array $msgParams=[])
Given the id of an interface element, constructs the appropriate title attribute from the system mess...
Definition Linker.php:1969
static makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
Definition Linker.php:533
static formatSize( $size)
Definition Linker.php:1946
static accesskey( $name)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
Definition Linker.php:2017
static specialLink( $name, $key='')
Make a link to a special page given its name and, optionally, a message key from the link text.
Definition Linker.php:824
static getLinkColour(LinkTarget $t, $threshold)
Return the CSS colour of a known link.
Definition Linker.php:51
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...
Definition Linker.php:324
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
Definition Linker.php:164
static generateTOC( $tree, $lang=false)
Generate a table of contents from a section tree.
Definition Linker.php:1604
static makeExternalImage( $url, $alt='')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
Definition Linker.php:271
static userToolLinksRedContribs( $userId, $userText, $edits=null)
Alias for userToolLinks( $userId, $userText, true );.
Definition Linker.php:993
static buildRollbackLink( $rev, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
Definition Linker.php:1807
static makeCommentLink(LinkTarget $linkTarget, $text, $wikiId=null, $options=[])
Generates a link to the given Title.
Definition Linker.php:1340
static processResponsiveImages( $file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
Definition Linker.php:655
static blockLink( $userId, $userText)
Definition Linker.php:1018
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2116
static getRollbackEditCount( $rev, $verify)
This function will return the number of revisions which a rollback would revert and,...
Definition Linker.php:1745
static normalizeSubpageLink( $contextTitle, $target, &$text)
Definition Linker.php:1369
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.
Definition Linker.php:1480
static makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
Make appropriate markup for a link to the current article.
Definition Linker.php:186
static tocIndent()
Add another level to the Table of Contents.
Definition Linker.php:1519
static revUserLink( $rev, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition Linker.php:1048
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...
Definition Linker.php:1455
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition Linker.php:209
static revUserTools( $rev, $isPublic=false)
Generate a user tool link cluster if the current user is allowed to view it.
Definition Linker.php:1070
static emailLink( $userId, $userText)
Definition Linker.php:1032
static makeThumbLinkObj(Title $title, $file, $label='', $alt, $align='right', $params=[], $framed=false, $manualthumb="")
Make HTML for a thumbnail including image, border and caption.
Definition Linker.php:507
static formatHiddenCategories( $hiddencats)
Returns HTML for the "hidden categories on this page" list.
Definition Linker.php:1917
static splitTrail( $trail)
Split a link trail, return the "inside" portion and the remainder of the trail as a two-element array...
Definition Linker.php:1665
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
Definition Linker.php:931
static formatRevisionSize( $size)
Definition Linker.php:1503
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
Definition Linker.php:2163
static userTalkLink( $userId, $userText)
Definition Linker.php:1003
static formatLinksInComment( $comment, $title=null, $local=false, $wikiId=null)
Formats wiki links and media links in text; all other wiki formatting is ignored.
Definition Linker.php:1234
static makeMediaLinkObj( $title, $html='', $time=false)
Create a direct link to a given uploaded file.
Definition Linker.php:766
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
Definition Linker.php:843
static normaliseSpecialPage(LinkTarget $target)
Definition Linker.php:230
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
Definition Linker.php:1642
static formatTemplates( $templates, $preview=false, $section=false, $more=null)
Definition Linker.php:1886
static tocUnindent( $level)
Finish one or more sublevels on the Table of Contents.
Definition Linker.php:1530
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null)
Returns the attributes for the tooltip and access key.
Definition Linker.php:2135
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2094
static tocLineEnd()
End a Table Of Contents line.
Definition Linker.php:1569
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...
Definition Linker.php:1109
static makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
Make a "broken" link to an image.
Definition Linker.php:690
static getRevDeleteLink(User $user, Revision $rev, Title $title)
Get a revision-deletion link, or disabled link, or nothing, depending on user permissions & the setti...
Definition Linker.php:2053
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Definition Parser.php:70
Represents a title within MediaWiki.
Definition Title.php:39
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition User.php:53
do that in ParserLimitReportFormat instead $parser
Definition hooks.txt:2603
see documentation in includes Linker php for Linker::makeImageLink & $time
Definition hooks.txt:1795
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
Definition hooks.txt:2001
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
Definition hooks.txt:2811
null means default & $customAttribs
Definition hooks.txt:1995
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
Definition hooks.txt:2013
usually copyright or history_copyright This message must be in HTML not wikitext & $link
Definition hooks.txt:3021
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
Definition hooks.txt:2014
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
Definition hooks.txt:1620
see documentation in includes Linker php for Linker::makeImageLink & $handlerParams
Definition hooks.txt:1793
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
Definition hooks.txt:3022
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
Definition hooks.txt:1777
Interface for objects which can provide a MediaWiki context on request.
$params
if(!isset( $args[0])) $lang