MediaWiki REL1_28
DummyLinker.php
Go to the documentation of this file.
1<?php
2
7
11 public function getInterwikiLinkAttributes( $title, $unused = null, $class = 'external' ) {
12 wfDeprecated( __METHOD__, '1.27' );
14 $title,
15 $unused,
16 $class
17 );
18 }
19
23 public function getInternalLinkAttributes( $title, $unused = null, $class = '' ) {
24 wfDeprecated( __METHOD__, '1.27' );
26 $title,
27 $unused,
28 $class
29 );
30 }
31
36 $nt,
37 $unused = null,
38 $class = '',
39 $title = false
40 ) {
41 wfDeprecated( __METHOD__, '1.27' );
43 $nt,
44 $unused,
45 $class,
46 $title
47 );
48 }
49
53 public function getLinkColour( $t, $threshold ) {
54 wfDeprecated( __METHOD__, '1.28' );
55 return Linker::getLinkColour( $t, $threshold );
56 }
57
58 public function link(
59 $target,
60 $html = null,
61 $customAttribs = [],
62 $query = [],
63 $options = []
64 ) {
65 return Linker::link(
66 $target,
67 $html,
69 $query,
71 );
72 }
73
74 public function linkKnown(
75 $target,
76 $html = null,
77 $customAttribs = [],
78 $query = [],
79 $options = [ 'known' ]
80 ) {
81 return Linker::linkKnown(
82 $target,
83 $html,
85 $query,
87 );
88 }
89
90 public function makeSelfLinkObj(
91 $nt,
92 $html = '',
93 $query = '',
94 $trail = '',
95 $prefix = ''
96 ) {
98 $nt,
99 $html,
100 $query,
101 $trail,
102 $prefix
103 );
104 }
105
108 $namespace,
109 $title
110 ) {
112 $context,
113 $namespace,
114 $title
115 );
116 }
117
118 public function normaliseSpecialPage( Title $title ) {
120 }
121
122 public function makeExternalImage( $url, $alt = '' ) {
123 return Linker::makeExternalImage( $url, $alt );
124 }
125
126 public function makeImageLink(
128 Title $title,
129 $file,
130 $frameParams = [],
131 $handlerParams = [],
132 $time = false,
133 $query = "",
134 $widthOption = null
135 ) {
137 $parser,
138 $title,
139 $file,
140 $frameParams,
142 $time,
143 $query,
144 $widthOption
145 );
146 }
147
148 public function makeThumbLinkObj(
149 Title $title,
150 $file,
151 $label = '',
152 $alt,
153 $align = 'right',
154 $params = [],
155 $framed = false,
156 $manualthumb = ""
157 ) {
159 $title,
160 $file,
161 $label,
162 $alt,
163 $align,
164 $params,
165 $framed,
166 $manualthumb
167 );
168 }
169
170 public function makeThumbLink2(
171 Title $title,
172 $file,
173 $frameParams = [],
174 $handlerParams = [],
175 $time = false,
176 $query = ""
177 ) {
179 $title,
180 $file,
181 $frameParams,
183 $time,
184 $query
185 );
186 }
187
188 public function processResponsiveImages( $file, $thumb, $hp ) {
190 $file,
191 $thumb,
192 $hp
193 );
194 }
195
196 public function makeBrokenImageLinkObj(
197 $title,
198 $label = '',
199 $query = '',
200 $unused1 = '',
201 $unused2 = '',
202 $time = false
203 ) {
205 $title,
206 $label,
207 $query,
208 $unused1,
209 $unused2,
210 $time
211 );
212 }
213
214 public function makeMediaLinkObj( $title, $html = '', $time = false ) {
216 $title,
217 $html,
218 $time
219 );
220 }
221
222 public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
224 $title,
225 $file,
226 $html
227 );
228 }
229
230 public function specialLink( $name, $key = '' ) {
231 return Linker::specialLink( $name, $key );
232 }
233
234 public function makeExternalLink(
235 $url,
236 $text,
237 $escape = true,
238 $linktype = '',
239 $attribs = [],
240 $title = null
241 ) {
243 $url,
244 $text,
245 $escape,
246 $linktype,
247 $attribs,
248 $title
249 );
250 }
251
252 public function userLink( $userId, $userName, $altUserName = false ) {
253 return Linker::userLink(
254 $userId,
255 $userName,
256 $altUserName
257 );
258 }
259
260 public function userToolLinks(
261 $userId,
262 $userText,
263 $redContribsWhenNoEdits = false,
264 $flags = 0,
265 $edits = null
266 ) {
268 $userId,
269 $userText,
270 $redContribsWhenNoEdits,
271 $flags,
272 $edits
273 );
274 }
275
276 public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
278 $userId,
279 $userText,
280 $edits
281 );
282 }
283
284 public function userTalkLink( $userId, $userText ) {
285 return Linker::userTalkLink( $userId, $userText );
286 }
287
288 public function blockLink( $userId, $userText ) {
289 return Linker::blockLink( $userId, $userText );
290 }
291
292 public function emailLink( $userId, $userText ) {
293 return Linker::emailLink( $userId, $userText );
294 }
295
296 public function revUserLink( $rev, $isPublic = false ) {
297 return Linker::revUserLink( $rev, $isPublic );
298 }
299
300 public function revUserTools( $rev, $isPublic = false ) {
301 return Linker::revUserTools( $rev, $isPublic );
302 }
303
304 public function formatComment(
305 $comment,
306 $title = null,
307 $local = false,
308 $wikiId = null
309 ) {
311 $comment,
312 $title,
313 $local,
314 $wikiId
315 );
316 }
317
318 public function formatLinksInComment(
319 $comment,
320 $title = null,
321 $local = false,
322 $wikiId = null
323 ) {
325 $comment,
326 $title,
327 $local,
328 $wikiId
329 );
330 }
331
332 public function makeCommentLink(
333 Title $title,
334 $text,
335 $wikiId = null,
336 $options = []
337 ) {
339 $title,
340 $text,
341 $wikiId,
343 );
344 }
345
346 public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
348 $contextTitle,
349 $target,
350 $text
351 );
352 }
353
354 public function commentBlock(
355 $comment,
356 $title = null,
357 $local = false,
358 $wikiId = null
359 ) {
361 $comment,
362 $title,
363 $local,
364 $wikiId
365 );
366 }
367
368 public function revComment( Revision $rev, $local = false, $isPublic = false ) {
369 return Linker::revComment( $rev, $local, $isPublic );
370 }
371
372 public function formatRevisionSize( $size ) {
373 return Linker::formatRevisionSize( $size );
374 }
375
376 public function tocIndent() {
377 return Linker::tocIndent();
378 }
379
380 public function tocUnindent( $level ) {
381 return Linker::tocUnindent( $level );
382 }
383
384 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
385 return Linker::tocLine(
386 $anchor,
387 $tocline,
388 $tocnumber,
389 $level,
390 $sectionIndex
391 );
392 }
393
394 public function tocLineEnd() {
395 return Linker::tocLineEnd();
396 }
397
398 public function tocList( $toc, $lang = false ) {
399 return Linker::tocList( $toc, $lang );
400 }
401
402 public function generateTOC( $tree, $lang = false ) {
403 return Linker::generateTOC( $tree, $lang );
404 }
405
406 public function makeHeadline(
407 $level,
408 $attribs,
409 $anchor,
410 $html,
411 $link,
412 $legacyAnchor = false
413 ) {
415 $level,
416 $attribs,
417 $anchor,
418 $html,
419 $link,
420 $legacyAnchor
421 );
422 }
423
424 public function splitTrail( $trail ) {
425 return Linker::splitTrail( $trail );
426 }
427
428 public function generateRollback(
429 $rev,
431 $options = [ 'verify' ]
432 ) {
434 $rev,
435 $context,
437 );
438 }
439
440 public function getRollbackEditCount( $rev, $verify ) {
441 return Linker::getRollbackEditCount( $rev, $verify );
442 }
443
444 public function buildRollbackLink(
445 $rev,
447 $editCount = false
448 ) {
450 $rev,
451 $context,
452 $editCount
453 );
454 }
455
459 public function formatTemplates(
460 $templates,
461 $preview = false,
462 $section = false,
463 $more = null
464 ) {
465 wfDeprecated( __METHOD__, '1.28' );
466
468 $templates,
469 $preview,
470 $section,
471 $more
472 );
473 }
474
475 public function formatHiddenCategories( $hiddencats ) {
476 return Linker::formatHiddenCategories( $hiddencats );
477 }
478
482 public function formatSize( $size ) {
483 wfDeprecated( __METHOD__, '1.28' );
484
485 return Linker::formatSize( $size );
486 }
487
488 public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
489 return Linker::titleAttrib(
490 $name,
491 $options,
492 $msgParams
493 );
494 }
495
496 public function accesskey( $name ) {
497 return Linker::accesskey( $name );
498 }
499
500 public function getRevDeleteLink( User $user, Revision $rev, Title $title ) {
502 $user,
503 $rev,
504 $title
505 );
506 }
507
508 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
510 $query,
511 $restricted,
512 $delete
513 );
514 }
515
516 public function revDeleteLinkDisabled( $delete = true ) {
517 return Linker::revDeleteLinkDisabled( $delete );
518 }
519
520 public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
522 $name,
523 $msgParams
524 );
525 }
526
527 public function tooltip( $name, $options = null ) {
528 return Linker::tooltip( $name, $options );
529 }
530
531}
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)
getInternalLinkAttributes( $title, $unused=null, $class='')
makeExternalImage( $url, $alt='')
processResponsiveImages( $file, $thumb, $hp)
commentBlock( $comment, $title=null, $local=false, $wikiId=null)
normaliseSpecialPage(Title $title)
getInterwikiLinkAttributes( $title, $unused=null, $class='external')
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='')
getInternalLinkAttributesObj( $nt, $unused=null, $class='', $title=false)
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:1645
static generateRollback( $rev, IContextSource $context=null, $options=[ 'verify'])
Generate a rollback link for a given revision.
Definition Linker.php:1763
static getInternalLinkAttributesObj( $nt, $unused=null, $class='', $title=false)
Get the appropriate HTML attributes to add to the "a" element of an internal link,...
Definition Linker.php:102
static makeMediaLinkFile(Title $title, $file, $html='')
Create a direct link to a given uploaded file.
Definition Linker.php:874
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
Definition Linker.php:203
static tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
Definition Linker.php:1615
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition Linker.php:984
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:2024
static makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
Definition Linker.php:624
static formatSize( $size)
Definition Linker.php:2002
static accesskey( $name)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
Definition Linker.php:2067
static getInterwikiLinkAttributes( $title, $unused=null, $class='external')
Get the appropriate HTML attributes to add to the "a" element of an interwiki link.
Definition Linker.php:54
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:915
static getLinkColour(LinkTarget $t, $threshold)
Return the CSS colour of a known link.
Definition Linker.php:147
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:415
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
Definition Linker.php:255
static generateTOC( $tree, $lang=false)
Generate a table of contents from a section tree.
Definition Linker.php:1663
static makeExternalImage( $url, $alt='')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
Definition Linker.php:362
static userToolLinksRedContribs( $userId, $userText, $edits=null)
Alias for userToolLinks( $userId, $userText, true );.
Definition Linker.php:1073
static buildRollbackLink( $rev, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
Definition Linker.php:1862
static processResponsiveImages( $file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
Definition Linker.php:746
static blockLink( $userId, $userText)
Definition Linker.php:1095
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2166
static getRollbackEditCount( $rev, $verify)
This function will return the number of revisions which a rollback would revert and,...
Definition Linker.php:1802
static normalizeSubpageLink( $contextTitle, $target, &$text)
Definition Linker.php:1439
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:1550
static makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
Make appropriate markup for a link to the current article.
Definition Linker.php:277
static tocIndent()
Add another level to the Table of Contents.
Definition Linker.php:1589
static revUserLink( $rev, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition Linker.php:1119
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:1525
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
Returns the attributes for the tooltip and access key.
Definition Linker.php:2184
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition Linker.php:300
static revUserTools( $rev, $isPublic=false)
Generate a user tool link cluster if the current user is allowed to view it.
Definition Linker.php:1141
static emailLink( $userId, $userText)
Definition Linker.php:1106
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:598
static formatHiddenCategories( $hiddencats)
Returns HTML for the "hidden categories on this page" list.
Definition Linker.php:1972
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:1722
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
Definition Linker.php:1017
static formatRevisionSize( $size)
Definition Linker.php:1573
static getInternalLinkAttributes( $title, $unused=null, $class='')
Get the appropriate HTML attributes to add to the "a" element of an internal link.
Definition Linker.php:80
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
Definition Linker.php:2208
static userTalkLink( $userId, $userText)
Definition Linker.php:1083
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:1305
static makeMediaLinkObj( $title, $html='', $time=false)
Create a direct link to a given uploaded file.
Definition Linker.php:857
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
Definition Linker.php:934
static makeCommentLink(Title $title, $text, $wikiId=null, $options=[])
Generates a link to the given Title.
Definition Linker.php:1413
static normaliseSpecialPage(LinkTarget $target)
Definition Linker.php:321
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
Definition Linker.php:1701
static formatTemplates( $templates, $preview=false, $section=false, $more=null)
Definition Linker.php:1941
static tocUnindent( $level)
Finish one or more sublevels on the Table of Contents.
Definition Linker.php:1600
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2144
static tocLineEnd()
End a Table Of Contents line.
Definition Linker.php:1633
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:1180
static makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
Make a "broken" link to an image.
Definition Linker.php:781
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:2103
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:36
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition User.php:48
the array() calling protocol came about after MediaWiki 1.4rc1.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
Definition hooks.txt:249
namespace are movable Hooks may change this value to override the return value of MWNamespace::isMovable(). 'NewDifferenceEngine' do that in ParserLimitReportFormat instead $parser
Definition hooks.txt:2259
see documentation in includes Linker php for Linker::makeImageLink & $time
Definition hooks.txt:1752
namespace and then decline to actually register it file or subcat img or subcat $title
Definition hooks.txt:986
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
Definition hooks.txt:1096
null means default & $customAttribs
Definition hooks.txt:1939
it s the revision text itself In either if gzip is the revision text is gzipped $flags
Definition hooks.txt:2710
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:1957
usually copyright or history_copyright This message must be in HTML not wikitext & $link
Definition hooks.txt:2900
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:1958
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:304
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:1595
see documentation in includes Linker php for Linker::makeImageLink & $handlerParams
Definition hooks.txt:1750
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:2901
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:1734
$comment
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37
Interface for objects which can provide a MediaWiki context on request.
$context
Definition load.php:50
$params
if(!isset( $args[0])) $lang