MediaWiki REL1_39
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 normalizeSubpageLink( $contextTitle, $target, &$text ) {
288 $contextTitle,
289 $target,
290 $text
291 );
292 }
293
294 public function commentBlock(
295 $comment,
296 $title = null,
297 $local = false,
298 $wikiId = null
299 ) {
301 $comment,
302 $title,
303 $local,
304 $wikiId
305 );
306 }
307
308 public function revComment( RevisionRecord $revRecord, $local = false, $isPublic = false ) {
309 return Linker::revComment( $revRecord, $local, $isPublic );
310 }
311
312 public function formatRevisionSize( $size ) {
313 return Linker::formatRevisionSize( $size );
314 }
315
316 public function tocIndent() {
317 return Linker::tocIndent();
318 }
319
320 public function tocUnindent( $level ) {
321 return Linker::tocUnindent( $level );
322 }
323
324 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
325 return Linker::tocLine(
326 $anchor,
327 $tocline,
328 $tocnumber,
329 $level,
330 $sectionIndex
331 );
332 }
333
334 public function tocLineEnd() {
335 return Linker::tocLineEnd();
336 }
337
338 public function tocList( $toc, Language $lang = null ) {
339 return Linker::tocList( $toc, $lang );
340 }
341
342 public function generateTOC( $tree, Language $lang = null ) {
343 return Linker::generateTOC( $tree, $lang );
344 }
345
346 public function makeHeadline(
347 $level,
348 $attribs,
349 $anchor,
350 $html,
351 $link,
352 $legacyAnchor = false
353 ) {
355 $level,
356 $attribs,
357 $anchor,
358 $html,
359 $link,
360 $legacyAnchor
361 );
362 }
363
364 public function splitTrail( $trail ) {
365 return Linker::splitTrail( $trail );
366 }
367
368 public function generateRollback(
369 RevisionRecord $revRecord,
370 IContextSource $context = null,
371 $options = [ 'verify' ]
372 ) {
374 $revRecord,
375 $context,
376 $options
377 );
378 }
379
380 public function getRollbackEditCount( RevisionRecord $revRecord, $verify ) {
381 return Linker::getRollbackEditCount( $revRecord, $verify );
382 }
383
384 public function buildRollbackLink(
385 RevisionRecord $revRecord,
386 IContextSource $context = null,
387 $editCount = false
388 ) {
390 $revRecord,
391 $context,
392 $editCount
393 );
394 }
395
396 public function formatHiddenCategories( $hiddencats ) {
397 return Linker::formatHiddenCategories( $hiddencats );
398 }
399
400 public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
401 return Linker::titleAttrib(
402 $name,
403 $options,
404 $msgParams
405 );
406 }
407
408 public function accesskey( $name ) {
409 return Linker::accesskey( $name );
410 }
411
412 public function getRevDeleteLink( User $user, RevisionRecord $revRecord, Title $title ) {
414 $user,
415 $revRecord,
416 $title
417 );
418 }
419
420 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
422 $query,
423 $restricted,
424 $delete
425 );
426 }
427
428 public function revDeleteLinkDisabled( $delete = true ) {
429 return Linker::revDeleteLinkDisabled( $delete );
430 }
431
432 public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
434 $name,
435 $msgParams
436 );
437 }
438
439 public function tooltip( $name, $options = null ) {
440 return Linker::tooltip( $name, $options );
441 }
442
443}
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)
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)
Base class for language-specific code.
Definition Language.php:53
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:594
static accesskey( $name, $localizer=null)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
Definition Linker.php:2128
static makeMediaLinkFile(LinkTarget $title, $file, $html='')
Create a direct link to a given uploaded file.
Definition Linker.php:993
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
Definition Linker.php:91
static tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
Definition Linker.php:1664
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition Linker.php:1114
static makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false, array $handlerParams=[], bool $currentExists=false)
Make a "broken" link to an image.
Definition Linker.php:870
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:1035
static getRollbackEditCount(RevisionRecord $revRecord, $verify)
This function will return the number of revisions which a rollback would revert and,...
Definition Linker.php:1893
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
Definition Linker.php:143
static makeExternalImage( $url, $alt='')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
Definition Linker.php:244
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:1607
static revUserLink(RevisionRecord $revRecord, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition Linker.php:1323
static processResponsiveImages( $file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
Definition Linker.php:833
static blockLink( $userId, $userText)
Definition Linker.php:1276
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2229
static normalizeSubpageLink( $contextTitle, $target, &$text)
Definition Linker.php:1488
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:2153
static makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
Make appropriate markup for a link to the current article.
Definition Linker.php:165
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:301
static tocIndent()
Add another level to the Table of Contents.
Definition Linker.php:1638
static makeThumbLink2(LinkTarget $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query='', array $classes=[], ?Parser $parser=null)
Definition Linker.php:627
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition Linker.php:189
static emailLink( $userId, $userText)
Definition Linker.php:1297
static generateRollback(RevisionRecord $revRecord, IContextSource $context=null, $options=[ 'verify'])
Generate a rollback link for a given revision.
Definition Linker.php:1834
static formatHiddenCategories( $hiddencats)
Returns HTML for the "hidden categories on this page" list.
Definition Linker.php:2035
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:1796
static generateTOC( $tree, Language $lang=null)
Generate a table of contents from a section tree.
Definition Linker.php:1737
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:2080
static formatRevisionSize( $size)
Definition Linker.php:1623
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:1585
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
Definition Linker.php:2342
static userTalkLink( $userId, $userText)
Definition Linker.php:1254
static buildRollbackLink(RevisionRecord $revRecord, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
Definition Linker.php:1962
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:1371
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:1475
static makeMediaLinkObj( $title, $html='', $time=false)
Create a direct link to a given uploaded file.
Definition Linker.php:974
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
Definition Linker.php:1061
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:1159
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
Definition Linker.php:1775
static tocUnindent( $level)
Finish one or more sublevels on the Table of Contents.
Definition Linker.php:1649
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:1700
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2205
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null, $localizer=null, $user=null, $config=null, $relevantTitle=null)
Returns the attributes for the tooltip and access key.
Definition Linker.php:2299
static tocLineEnd()
End a Table Of Contents line.
Definition Linker.php:1688
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:1449
static userToolLinksRedContribs( $userId, $userText, $edits=null, $useParentheses=true)
Alias for userToolLinks( $userId, $userText, true );.
Definition Linker.php:1242
Service locator for MediaWiki core services.
Page revision base class.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Definition Parser.php:96
Represents a title within MediaWiki.
Definition Title.php:49
internal since 1.36
Definition User.php:70
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