MediaWiki REL1_37
DummyLinker.php
Go to the documentation of this file.
1<?php
2
5
10
11 public function link(
12 $target,
13 $html = null,
14 $customAttribs = [],
15 $query = [],
16 $options = []
17 ) {
18 return Linker::link(
19 $target,
20 $html,
21 $customAttribs,
22 $query,
23 $options
24 );
25 }
26
27 public function linkKnown(
28 $target,
29 $html = null,
30 $customAttribs = [],
31 $query = [],
32 $options = [ 'known' ]
33 ) {
34 return Linker::linkKnown(
35 $target,
36 $html,
37 $customAttribs,
38 $query,
39 $options
40 );
41 }
42
43 public function makeSelfLinkObj(
44 $nt,
45 $html = '',
46 $query = '',
47 $trail = '',
48 $prefix = ''
49 ) {
51 $nt,
52 $html,
53 $query,
54 $trail,
55 $prefix
56 );
57 }
58
60 IContextSource $context,
61 $namespace,
62 $title
63 ) {
65 $context,
66 $namespace,
67 $title
68 );
69 }
70
71 public function normaliseSpecialPage( Title $title ) {
72 $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
73 return $linkRenderer->normalizeTarget( $title );
74 }
75
76 public function makeExternalImage( $url, $alt = '' ) {
77 return Linker::makeExternalImage( $url, $alt );
78 }
79
80 public function makeImageLink(
81 Parser $parser,
83 $file,
84 $frameParams = [],
85 $handlerParams = [],
86 $time = false,
87 $query = "",
88 $widthOption = null
89 ) {
91 $parser,
92 $title,
93 $file,
94 $frameParams,
95 $handlerParams,
96 $time,
97 $query,
98 $widthOption
99 );
100 }
101
102 public function makeThumbLinkObj(
104 $file,
105 $label = '',
106 $alt = '',
107 $align = 'right',
108 $params = [],
109 $framed = false,
110 $manualthumb = ""
111 ) {
113 $title,
114 $file,
115 $label,
116 $alt,
117 $align,
118 $params,
119 $framed,
120 $manualthumb
121 );
122 }
123
124 public function makeThumbLink2(
126 $file,
127 $frameParams = [],
128 $handlerParams = [],
129 $time = false,
130 $query = ""
131 ) {
133 $title,
134 $file,
135 $frameParams,
136 $handlerParams,
137 $time,
138 $query
139 );
140 }
141
142 public function processResponsiveImages( $file, $thumb, $hp ) {
144 $file,
145 $thumb,
146 $hp
147 );
148 }
149
150 public function makeBrokenImageLinkObj(
151 $title,
152 $label = '',
153 $query = '',
154 $unused1 = '',
155 $unused2 = '',
156 $time = false
157 ) {
159 $title,
160 $label,
161 $query,
162 $unused1,
163 $unused2,
164 $time
165 );
166 }
167
168 public function makeMediaLinkObj( $title, $html = '', $time = false ) {
170 $title,
171 $html,
172 $time
173 );
174 }
175
176 public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
178 $title,
179 $file,
180 $html
181 );
182 }
183
184 public function specialLink( $name, $key = '' ) {
185 return Linker::specialLink( $name, $key );
186 }
187
188 public function makeExternalLink(
189 $url,
190 $text,
191 $escape = true,
192 $linktype = '',
193 $attribs = [],
194 $title = null
195 ) {
197 $url,
198 $text,
199 $escape,
200 $linktype,
201 $attribs,
202 $title
203 );
204 }
205
206 public function userLink( $userId, $userName, $altUserName = false ) {
207 return Linker::userLink(
208 $userId,
209 $userName,
210 $altUserName
211 );
212 }
213
214 public function userToolLinks(
215 $userId,
216 $userText,
217 $redContribsWhenNoEdits = false,
218 $flags = 0,
219 $edits = null
220 ) {
222 $userId,
223 $userText,
224 $redContribsWhenNoEdits,
225 $flags,
226 $edits
227 );
228 }
229
230 public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
232 $userId,
233 $userText,
234 $edits
235 );
236 }
237
238 public function userTalkLink( $userId, $userText ) {
239 return Linker::userTalkLink( $userId, $userText );
240 }
241
242 public function blockLink( $userId, $userText ) {
243 return Linker::blockLink( $userId, $userText );
244 }
245
246 public function emailLink( $userId, $userText ) {
247 return Linker::emailLink( $userId, $userText );
248 }
249
250 public function revUserLink( RevisionRecord $revRecord, $isPublic = false ) {
251 return Linker::revUserLink( $revRecord, $isPublic );
252 }
253
254 public function revUserTools( RevisionRecord $revRecord, $isPublic = false ) {
255 return Linker::revUserTools( $revRecord, $isPublic );
256 }
257
258 public function formatComment(
259 $comment,
260 $title = null,
261 $local = false,
262 $wikiId = null
263 ) {
265 $comment,
266 $title,
267 $local,
268 $wikiId
269 );
270 }
271
272 public function formatLinksInComment(
273 $comment,
274 $title = null,
275 $local = false,
276 $wikiId = null
277 ) {
279 $comment,
280 $title,
281 $local,
282 $wikiId
283 );
284 }
285
286 public function makeCommentLink(
288 $text,
289 $wikiId = null,
290 $options = []
291 ) {
293 $title,
294 $text,
295 $wikiId,
296 $options
297 );
298 }
299
300 public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
302 $contextTitle,
303 $target,
304 $text
305 );
306 }
307
308 public function commentBlock(
309 $comment,
310 $title = null,
311 $local = false,
312 $wikiId = null
313 ) {
315 $comment,
316 $title,
317 $local,
318 $wikiId
319 );
320 }
321
322 public function revComment( RevisionRecord $revRecord, $local = false, $isPublic = false ) {
323 return Linker::revComment( $revRecord, $local, $isPublic );
324 }
325
326 public function formatRevisionSize( $size ) {
327 return Linker::formatRevisionSize( $size );
328 }
329
330 public function tocIndent() {
331 return Linker::tocIndent();
332 }
333
334 public function tocUnindent( $level ) {
335 return Linker::tocUnindent( $level );
336 }
337
338 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
339 return Linker::tocLine(
340 $anchor,
341 $tocline,
342 $tocnumber,
343 $level,
344 $sectionIndex
345 );
346 }
347
348 public function tocLineEnd() {
349 return Linker::tocLineEnd();
350 }
351
352 public function tocList( $toc, Language $lang = null ) {
353 return Linker::tocList( $toc, $lang );
354 }
355
356 public function generateTOC( $tree, Language $lang = null ) {
357 return Linker::generateTOC( $tree, $lang );
358 }
359
360 public function makeHeadline(
361 $level,
362 $attribs,
363 $anchor,
364 $html,
365 $link,
366 $legacyAnchor = false
367 ) {
369 $level,
370 $attribs,
371 $anchor,
372 $html,
373 $link,
374 $legacyAnchor
375 );
376 }
377
378 public function splitTrail( $trail ) {
379 return Linker::splitTrail( $trail );
380 }
381
382 public function generateRollback(
383 RevisionRecord $revRecord,
384 IContextSource $context = null,
385 $options = [ 'verify' ]
386 ) {
388 $revRecord,
389 $context,
390 $options
391 );
392 }
393
394 public function getRollbackEditCount( RevisionRecord $revRecord, $verify ) {
395 return Linker::getRollbackEditCount( $revRecord, $verify );
396 }
397
398 public function buildRollbackLink(
399 RevisionRecord $revRecord,
400 IContextSource $context = null,
401 $editCount = false
402 ) {
404 $revRecord,
405 $context,
406 $editCount
407 );
408 }
409
410 public function formatHiddenCategories( $hiddencats ) {
411 return Linker::formatHiddenCategories( $hiddencats );
412 }
413
414 public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
415 return Linker::titleAttrib(
416 $name,
417 $options,
418 $msgParams
419 );
420 }
421
422 public function accesskey( $name ) {
423 return Linker::accesskey( $name );
424 }
425
426 public function getRevDeleteLink( User $user, RevisionRecord $revRecord, Title $title ) {
428 $user,
429 $revRecord,
430 $title
431 );
432 }
433
434 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
436 $query,
437 $restricted,
438 $delete
439 );
440 }
441
442 public function revDeleteLinkDisabled( $delete = true ) {
443 return Linker::revDeleteLinkDisabled( $delete );
444 }
445
446 public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
448 $name,
449 $msgParams
450 );
451 }
452
453 public function tooltip( $name, $options = null ) {
454 return Linker::tooltip( $name, $options );
455 }
456
457}
generateRollback(RevisionRecord $revRecord, IContextSource $context=null, $options=[ 'verify'])
revDeleteLinkDisabled( $delete=true)
makeThumbLinkObj(Title $title, $file, $label='', $alt='', $align='right', $params=[], $framed=false, $manualthumb="")
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)
revUserTools(RevisionRecord $revRecord, $isPublic=false)
tocUnindent( $level)
titleAttrib( $name, $options=null, array $msgParams=[])
userToolLinksRedContribs( $userId, $userText, $edits=null)
formatHiddenCategories( $hiddencats)
revComment(RevisionRecord $revRecord, $local=false, $isPublic=false)
tooltip( $name, $options=null)
makeExternalImage( $url, $alt='')
processResponsiveImages( $file, $thumb, $hp)
commentBlock( $comment, $title=null, $local=false, $wikiId=null)
generateTOC( $tree, Language $lang=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)
makeHeadline( $level, $attribs, $anchor, $html, $link, $legacyAnchor=false)
accesskey( $name)
buildRollbackLink(RevisionRecord $revRecord, IContextSource $context=null, $editCount=false)
specialLink( $name, $key='')
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=[])
normalizeSubpageLink( $contextTitle, $target, &$text)
link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
splitTrail( $trail)
blockLink( $userId, $userText)
makeCommentLink(Title $title, $text, $wikiId=null, $options=[])
revUserLink(RevisionRecord $revRecord, $isPublic=false)
getRevDeleteLink(User $user, RevisionRecord $revRecord, Title $title)
linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
tocList( $toc, Language $lang=null)
formatRevisionSize( $size)
getRollbackEditCount(RevisionRecord $revRecord, $verify)
formatLinksInComment( $comment, $title=null, $local=false, $wikiId=null)
formatComment( $comment, $title=null, $local=false, $wikiId=null)
userTalkLink( $userId, $userText)
revDeleteLink( $query=[], $restricted=false, $delete=true)
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Definition Language.php:42
static makeMediaLinkFile(LinkTarget $title, $file, $html='')
Create a direct link to a given uploaded file.
Definition Linker.php:943
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
Definition Linker.php:87
static tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
Definition Linker.php:1861
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition Linker.php:1064
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:2276
static accesskey( $name)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
Definition Linker.php:2324
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:985
static getRollbackEditCount(RevisionRecord $revRecord, $verify)
This function will return the number of revisions which a rollback would revert and,...
Definition Linker.php:2090
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
Definition Linker.php:139
static makeExternalImage( $url, $alt='')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
Definition Linker.php:240
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:1782
static makeCommentLink(LinkTarget $linkTarget, $text, $wikiId=null, $options=[])
Generates a link to the given LinkTarget.
Definition Linker.php:1624
static revUserLink(RevisionRecord $revRecord, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition Linker.php:1271
static processResponsiveImages( $file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
Definition Linker.php:792
static blockLink( $userId, $userText)
Definition Linker.php:1224
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2436
static normalizeSubpageLink( $contextTitle, $target, &$text)
Definition Linker.php:1654
static makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false, array $handlerParams=[])
Make a "broken" link to an image.
Definition Linker.php:828
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:2360
static makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
Make appropriate markup for a link to the current article.
Definition Linker.php:161
static tocIndent()
Add another level to the Table of Contents.
Definition Linker.php:1835
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:296
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition Linker.php:185
static emailLink( $userId, $userText)
Definition Linker.php:1245
static generateRollback(RevisionRecord $revRecord, IContextSource $context=null, $options=[ 'verify'])
Generate a rollback link for a given revision.
Definition Linker.php:2031
static formatHiddenCategories( $hiddencats)
Returns HTML for the "hidden categories on this page" list.
Definition Linker.php:2241
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:1993
static generateTOC( $tree, Language $lang=null)
Generate a table of contents from a section tree.
Definition Linker.php:1934
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:567
static formatRevisionSize( $size)
Definition Linker.php:1820
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:1749
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
Definition Linker.php:2505
static userTalkLink( $userId, $userText)
Definition Linker.php:1202
static buildRollbackLink(RevisionRecord $revRecord, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
Definition Linker.php:2164
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:1319
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:1503
static makeThumbLink2(LinkTarget $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="", array $classes=[])
Definition Linker.php:598
static makeMediaLinkObj( $title, $html='', $time=false)
Create a direct link to a given uploaded file.
Definition Linker.php:924
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
Definition Linker.php:1011
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:1109
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
Definition Linker.php:1972
static tocUnindent( $level)
Finish one or more sublevels on the Table of Contents.
Definition Linker.php:1846
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null)
Returns the attributes for the tooltip and access key.
Definition Linker.php:2455
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:1897
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2412
static tocLineEnd()
End a Table Of Contents line.
Definition Linker.php:1885
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:1372
static userToolLinksRedContribs( $userId, $userText, $edits=null, $useParentheses=true)
Alias for userToolLinks( $userId, $userText, true );.
Definition Linker.php:1190
MediaWikiServices is the service locator for the application scope of MediaWiki.
Page revision base class.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Definition Parser.php:91
Represents a title within MediaWiki.
Definition Title.php:48
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition User.php:69
Interface for objects which can provide a MediaWiki context on request.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.
Definition router.php:42
if(!isset( $args[0])) $lang