MediaWiki master
DummyLinker.php
Go to the documentation of this file.
1<?php
2
4
5use Language;
11
17
18 public function __construct() {
19 // Avoid deprecation warning when calling the 'ImageBeforeProduceHTML' hook.
20 // Warnings will be emitted instead if any method is accessed by a hook handler.
21 if ( wfGetCaller() !== Linker::class . '::makeImageLink' ) {
22 wfDeprecated( __METHOD__, '1.42' );
23 }
24 }
25
29 public function link(
30 $target,
31 $html = null,
32 $customAttribs = [],
33 $query = [],
34 $options = []
35 ) {
36 wfDeprecated( __METHOD__, '1.42' );
37 return Linker::link(
38 $target,
39 $html,
40 $customAttribs,
41 $query,
42 $options
43 );
44 }
45
49 public function linkKnown(
50 $target,
51 $html = null,
52 $customAttribs = [],
53 $query = [],
54 $options = [ 'known' ]
55 ) {
56 wfDeprecated( __METHOD__, '1.42' );
57 return Linker::linkKnown(
58 $target,
59 $html,
60 $customAttribs,
61 $query,
62 $options
63 );
64 }
65
69 public function makeSelfLinkObj(
70 $nt,
71 $html = '',
72 $query = '',
73 $trail = '',
74 $prefix = ''
75 ) {
76 wfDeprecated( __METHOD__, '1.42' );
78 $nt,
79 $html,
80 $query,
81 $trail,
82 $prefix
83 );
84 }
85
90 IContextSource $context,
91 $namespace,
92 $title
93 ) {
94 wfDeprecated( __METHOD__, '1.42' );
96 $context,
97 $namespace,
98 $title
99 );
100 }
101
105 public function makeExternalImage( $url, $alt = '' ) {
106 wfDeprecated( __METHOD__, '1.42' );
107 return Linker::makeExternalImage( $url, $alt );
108 }
109
113 public function makeImageLink(
114 Parser $parser,
115 Title $title,
116 $file,
117 $frameParams = [],
118 $handlerParams = [],
119 $time = false,
120 $query = "",
121 $widthOption = null
122 ) {
123 wfDeprecated( __METHOD__, '1.42' );
125 $parser,
126 $title,
127 $file,
128 $frameParams,
129 $handlerParams,
130 $time,
131 $query,
132 $widthOption
133 );
134 }
135
139 public function makeThumbLinkObj(
140 Title $title,
141 $file,
142 $label = '',
143 $alt = '',
144 $align = 'right',
145 $params = [],
146 $framed = false,
147 $manualthumb = ""
148 ) {
149 wfDeprecated( __METHOD__, '1.42' );
151 $title,
152 $file,
153 $label,
154 $alt,
155 $align,
156 $params,
157 $framed,
158 $manualthumb
159 );
160 }
161
165 public function makeThumbLink2(
166 Title $title,
167 $file,
168 $frameParams = [],
169 $handlerParams = [],
170 $time = false,
171 $query = ""
172 ) {
173 wfDeprecated( __METHOD__, '1.42' );
175 $title,
176 $file,
177 $frameParams,
178 $handlerParams,
179 $time,
180 $query
181 );
182 }
183
187 public function processResponsiveImages( $file, $thumb, $hp ) {
188 wfDeprecated( __METHOD__, '1.42' );
190 $file,
191 $thumb,
192 $hp
193 );
194 }
195
199 public function makeBrokenImageLinkObj(
200 $title,
201 $label = '',
202 $query = '',
203 $unused1 = '',
204 $unused2 = '',
205 $time = false
206 ) {
207 wfDeprecated( __METHOD__, '1.42' );
209 $title,
210 $label,
211 $query,
212 $unused1,
213 $unused2,
214 $time
215 );
216 }
217
221 public function makeMediaLinkObj( $title, $html = '', $time = false ) {
222 wfDeprecated( __METHOD__, '1.42' );
224 $title,
225 $html,
226 $time
227 );
228 }
229
233 public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
234 wfDeprecated( __METHOD__, '1.42' );
236 $title,
237 $file,
238 $html
239 );
240 }
241
245 public function specialLink( $name, $key = '' ) {
246 wfDeprecated( __METHOD__, '1.42' );
247 return Linker::specialLink( $name, $key );
248 }
249
253 public function makeExternalLink(
254 $url,
255 $text,
256 $escape = true,
257 $linktype = '',
258 $attribs = [],
259 $title = null
260 ) {
261 wfDeprecated( __METHOD__, '1.42' );
263 $url,
264 $text,
265 $escape,
266 $linktype,
267 $attribs,
268 $title
269 );
270 }
271
275 public function userLink( $userId, $userName, $altUserName = false, $attributes = [] ) {
276 wfDeprecated( __METHOD__, '1.42' );
277 return Linker::userLink(
278 $userId,
279 $userName,
280 $altUserName,
281 $attributes
282 );
283 }
284
288 public function userToolLinks(
289 $userId,
290 $userText,
291 $redContribsWhenNoEdits = false,
292 $flags = 0,
293 $edits = null
294 ) {
295 wfDeprecated( __METHOD__, '1.42' );
297 $userId,
298 $userText,
299 $redContribsWhenNoEdits,
300 $flags,
301 $edits
302 );
303 }
304
308 public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
309 wfDeprecated( __METHOD__, '1.42' );
311 $userId,
312 $userText,
313 $edits
314 );
315 }
316
320 public function userTalkLink( $userId, $userText ) {
321 wfDeprecated( __METHOD__, '1.42' );
322 return Linker::userTalkLink( $userId, $userText );
323 }
324
328 public function blockLink( $userId, $userText ) {
329 wfDeprecated( __METHOD__, '1.42' );
330 return Linker::blockLink( $userId, $userText );
331 }
332
336 public function emailLink( $userId, $userText ) {
337 wfDeprecated( __METHOD__, '1.42' );
338 return Linker::emailLink( $userId, $userText );
339 }
340
344 public function revUserLink( RevisionRecord $revRecord, $isPublic = false ) {
345 wfDeprecated( __METHOD__, '1.42' );
346 return Linker::revUserLink( $revRecord, $isPublic );
347 }
348
352 public function revUserTools( RevisionRecord $revRecord, $isPublic = false ) {
353 wfDeprecated( __METHOD__, '1.42' );
354 return Linker::revUserTools( $revRecord, $isPublic );
355 }
356
360 public function formatComment(
361 $comment,
362 $title = null,
363 $local = false,
364 $wikiId = null
365 ) {
366 wfDeprecated( __METHOD__, '1.42' );
368 $comment,
369 $title,
370 $local,
371 $wikiId
372 );
373 }
374
378 public function formatLinksInComment(
379 $comment,
380 $title = null,
381 $local = false,
382 $wikiId = null
383 ) {
384 wfDeprecated( __METHOD__, '1.42' );
386 $comment,
387 $title,
388 $local,
389 $wikiId
390 );
391 }
392
396 public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
397 wfDeprecated( __METHOD__, '1.42' );
399 $contextTitle,
400 $target,
401 $text
402 );
403 }
404
408 public function commentBlock(
409 $comment,
410 $title = null,
411 $local = false,
412 $wikiId = null
413 ) {
414 wfDeprecated( __METHOD__, '1.42' );
416 $comment,
417 $title,
418 $local,
419 $wikiId
420 );
421 }
422
426 public function revComment( RevisionRecord $revRecord, $local = false, $isPublic = false ) {
427 wfDeprecated( __METHOD__, '1.42' );
428 return Linker::revComment( $revRecord, $local, $isPublic );
429 }
430
434 public function formatRevisionSize( $size ) {
435 wfDeprecated( __METHOD__, '1.42' );
436 return Linker::formatRevisionSize( $size );
437 }
438
442 public function tocIndent() {
443 wfDeprecated( __METHOD__, '1.42' );
444 return Linker::tocIndent();
445 }
446
450 public function tocUnindent( $level ) {
451 wfDeprecated( __METHOD__, '1.42' );
452 return Linker::tocUnindent( $level );
453 }
454
458 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
459 wfDeprecated( __METHOD__, '1.42' );
460 return Linker::tocLine(
461 $anchor,
462 $tocline,
463 $tocnumber,
464 $level,
465 $sectionIndex
466 );
467 }
468
472 public function tocLineEnd() {
473 wfDeprecated( __METHOD__, '1.42' );
474 return Linker::tocLineEnd();
475 }
476
480 public function tocList( $toc, Language $lang = null ) {
481 wfDeprecated( __METHOD__, '1.42' );
482 return Linker::tocList( $toc, $lang );
483 }
484
488 public function generateTOC( $tree, Language $lang = null ) {
489 wfDeprecated( __METHOD__, '1.42' );
490 return Linker::generateTOC( $tree, $lang );
491 }
492
496 public function makeHeadline(
497 $level,
498 $attribs,
499 $anchor,
500 $html,
501 $link,
502 $legacyAnchor = false
503 ) {
504 wfDeprecated( __METHOD__, '1.42' );
506 $level,
507 $attribs,
508 $anchor,
509 $html,
510 $link,
511 $legacyAnchor
512 );
513 }
514
518 public function splitTrail( $trail ) {
519 wfDeprecated( __METHOD__, '1.42' );
520 return Linker::splitTrail( $trail );
521 }
522
526 public function generateRollback(
527 RevisionRecord $revRecord,
528 IContextSource $context = null,
529 $options = []
530 ) {
531 wfDeprecated( __METHOD__, '1.42' );
533 $revRecord,
534 $context,
535 $options
536 );
537 }
538
542 public function getRollbackEditCount( RevisionRecord $revRecord, $verify ) {
543 wfDeprecated( __METHOD__, '1.42' );
544 return Linker::getRollbackEditCount( $revRecord, $verify );
545 }
546
550 public function buildRollbackLink(
551 RevisionRecord $revRecord,
552 IContextSource $context = null,
553 $editCount = false
554 ) {
555 wfDeprecated( __METHOD__, '1.42' );
557 $revRecord,
558 $context,
559 $editCount
560 );
561 }
562
566 public function formatHiddenCategories( $hiddencats ) {
567 wfDeprecated( __METHOD__, '1.42' );
568 return Linker::formatHiddenCategories( $hiddencats );
569 }
570
574 public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
575 wfDeprecated( __METHOD__, '1.42' );
576 return Linker::titleAttrib(
577 $name,
578 $options,
579 $msgParams
580 );
581 }
582
586 public function accesskey( $name ) {
587 wfDeprecated( __METHOD__, '1.42' );
588 return Linker::accesskey( $name );
589 }
590
594 public function getRevDeleteLink( User $user, RevisionRecord $revRecord, Title $title ) {
595 wfDeprecated( __METHOD__, '1.42' );
597 $user,
598 $revRecord,
599 $title
600 );
601 }
602
606 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
607 wfDeprecated( __METHOD__, '1.42' );
609 $query,
610 $restricted,
611 $delete
612 );
613 }
614
618 public function revDeleteLinkDisabled( $delete = true ) {
619 wfDeprecated( __METHOD__, '1.42' );
620 return Linker::revDeleteLinkDisabled( $delete );
621 }
622
626 public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
627 wfDeprecated( __METHOD__, '1.42' );
629 $name,
630 $msgParams
631 );
632 }
633
637 public function tooltip( $name, $options = null ) {
638 wfDeprecated( __METHOD__, '1.42' );
639 return Linker::tooltip( $name, $options );
640 }
641
642}
643
645class_alias( DummyLinker::class, 'DummyLinker' );
wfGetCaller( $level=2)
Get the name of the function which called this function wfGetCaller( 1 ) is the function with the wfG...
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
array $params
The job parameters.
Base class for language-specific code.
Definition Language.php:63
buildRollbackLink(RevisionRecord $revRecord, IContextSource $context=null, $editCount=false)
revUserTools(RevisionRecord $revRecord, $isPublic=false)
formatComment( $comment, $title=null, $local=false, $wikiId=null)
makeHeadline( $level, $attribs, $anchor, $html, $link, $legacyAnchor=false)
makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
tocList( $toc, Language $lang=null)
emailLink( $userId, $userText)
blockLink( $userId, $userText)
getInvalidTitleDescription(IContextSource $context, $namespace, $title)
tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
userTalkLink( $userId, $userText)
tooltip( $name, $options=null)
revComment(RevisionRecord $revRecord, $local=false, $isPublic=false)
userToolLinksRedContribs( $userId, $userText, $edits=null)
makeMediaLinkFile(Title $title, $file, $html='')
generateRollback(RevisionRecord $revRecord, IContextSource $context=null, $options=[])
makeThumbLinkObj(Title $title, $file, $label='', $alt='', $align='right', $params=[], $framed=false, $manualthumb="")
tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
getRollbackEditCount(RevisionRecord $revRecord, $verify)
makeExternalImage( $url, $alt='')
makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
formatLinksInComment( $comment, $title=null, $local=false, $wikiId=null)
makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
makeImageLink(Parser $parser, Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="", $widthOption=null)
commentBlock( $comment, $title=null, $local=false, $wikiId=null)
makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
processResponsiveImages( $file, $thumb, $hp)
formatHiddenCategories( $hiddencats)
userLink( $userId, $userName, $altUserName=false, $attributes=[])
revDeleteLinkDisabled( $delete=true)
generateTOC( $tree, Language $lang=null)
normalizeSubpageLink( $contextTitle, $target, &$text)
revUserLink(RevisionRecord $revRecord, $isPublic=false)
makeMediaLinkObj( $title, $html='', $time=false)
titleAttrib( $name, $options=null, array $msgParams=[])
revDeleteLink( $query=[], $restricted=false, $delete=true)
linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
getRevDeleteLink(User $user, RevisionRecord $revRecord, Title $title)
static revComment(RevisionRecord $revRecord, $local=false, $isPublic=false, $useParentheses=true)
Wrap and format the given revision's comment block, if the current user is allowed to view it.
Definition Linker.php:1751
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2389
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
Definition Linker.php:113
static tocLineEnd()
End a Table Of Contents line.
Definition Linker.php:1844
static blockLink( $userId, $userText)
Definition Linker.php:1413
static makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='', $hash='')
Make appropriate markup for a link to the current article.
Definition Linker.php:195
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null, $localizer=null)
Returns the attributes for the tooltip and access key.
Definition Linker.php:2433
static makeImageLink(Parser $parser, LinkTarget $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:329
static makeMediaLinkObj( $title, $html='', $time=false)
Create a direct link to a given uploaded file.
Definition Linker.php:1038
static processResponsiveImages( $file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
Definition Linker.php:897
static userTalkLink( $userId, $userText)
Definition Linker.php:1391
static commentBlock( $comment, $title=null, $local=false, $wikiId=null, $useParentheses=true)
Wrap a comment in standard punctuation and formatting if it's non-empty, otherwise return empty strin...
Definition Linker.php:1728
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:1590
static normalizeSubpageLink( $contextTitle, $target, &$text)
Definition Linker.php:1631
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:1099
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null, $useParentheses=true)
Generate standard user tool links (talk, contributions, block link, etc.)
Definition Linker.php:1356
static emailLink( $userId, $userText)
Definition Linker.php:1434
static formatHiddenCategories( $hiddencats)
Returns HTML for the "hidden categories on this page" list.
Definition Linker.php:2208
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition Linker.php:228
static getRollbackEditCount(RevisionRecord $revRecord, $verify=true)
This function will return the number of revisions which a rollback would revert and will verify that ...
Definition Linker.php:2071
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
Definition Linker.php:1145
static generateTOC(?TOCData $tocData, Language $lang=null, array $options=[])
Definition Linker.php:1900
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
Definition Linker.php:171
static getRevDeleteLink(Authority $performer, RevisionRecord $revRecord, LinkTarget $title)
Get a revision-deletion link, or disabled link, or nothing, depending on user permissions & the setti...
Definition Linker.php:2337
static makeThumbLink2(LinkTarget $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query='', array $classes=[], ?Parser $parser=null)
Definition Linker.php:660
static tocList( $toc, Language $lang=null)
Wraps the TOC in a div with ARIA navigation role and provides the hide/collapse JavaScript.
Definition Linker.php:1858
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
Definition Linker.php:1955
static makeExternalImage( $url, $alt='')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
Definition Linker.php:271
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
Definition Linker.php:2467
static makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false, array $handlerParams=[], bool $currentExists=false)
Make a "broken" link to an image.
Definition Linker.php:934
static makeMediaLinkFile(LinkTarget $title, $file, $html='')
Create a direct link to a given uploaded file.
Definition Linker.php:1057
static accesskey( $name, $localizer=null)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
Definition Linker.php:2307
static titleAttrib( $name, $options=null, array $msgParams=[], $localizer=null)
Given the id of an interface element, constructs the appropriate title attribute from the system mess...
Definition Linker.php:2253
static userToolLinksRedContribs( $userId, $userText, $edits=null, $useParentheses=true)
Alias for userToolLinks( $userId, $userText, true );.
Definition Linker.php:1379
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:1977
static tocIndent()
Add another level to the Table of Contents.
Definition Linker.php:1784
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2413
static formatRevisionSize( $size)
Definition Linker.php:1768
static tocUnindent( $level)
Finish one or more sublevels on the Table of Contents.
Definition Linker.php:1797
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:1617
static makeThumbLinkObj(LinkTarget $title, $file, $label='', $alt='', $align=null, $params=[], $framed=false, $manualthumb='')
Make HTML for a thumbnail including image, border and caption.
Definition Linker.php:627
static userLink( $userId, $userName, $altUserName=false, $attributes=[])
Make user link (or user contributions for unregistered users)
Definition Linker.php:1199
static revUserLink(RevisionRecord $revRecord, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition Linker.php:1460
static generateRollback(RevisionRecord $revRecord, IContextSource $context=null, $options=[])
Generate a rollback link for a given revision.
Definition Linker.php:2016
static revUserTools(RevisionRecord $revRecord, $isPublic=false, $useParentheses=true)
Generate a user tool link cluster if the current user is allowed to view it.
Definition Linker.php:1508
static tocLine( $linkAnchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
Definition Linker.php:1814
static buildRollbackLink(RevisionRecord $revRecord, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
Definition Linker.php:2137
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Definition Parser.php:156
Page revision base class.
Represents a title within MediaWiki.
Definition Title.php:78
internal since 1.36
Definition User.php:93
Interface for objects which can provide a MediaWiki context on request.