Merge "Convert Special:DeletedContributions to use OOUI."
[lhc/web/wiklou.git] / includes / DummyLinker.php
1 <?php
2
3 /**
4 * @since 1.18
5 */
6 class DummyLinker {
7
8 /**
9 * @deprecated since 1.27
10 */
11 public function getInterwikiLinkAttributes( $title, $unused = null, $class = 'external' ) {
12 wfDeprecated( __METHOD__, '1.27' );
13 return Linker::getInterwikiLinkAttributes(
14 $title,
15 $unused,
16 $class
17 );
18 }
19
20 /**
21 * @deprecated since 1.27
22 */
23 public function getInternalLinkAttributes( $title, $unused = null, $class = '' ) {
24 wfDeprecated( __METHOD__, '1.27' );
25 return Linker::getInternalLinkAttributes(
26 $title,
27 $unused,
28 $class
29 );
30 }
31
32 /**
33 * @deprecated since 1.27
34 */
35 public function getInternalLinkAttributesObj(
36 $nt,
37 $unused = null,
38 $class = '',
39 $title = false
40 ) {
41 wfDeprecated( __METHOD__, '1.27' );
42 return Linker::getInternalLinkAttributesObj(
43 $nt,
44 $unused,
45 $class,
46 $title
47 );
48 }
49
50 /**
51 * @deprecated since 1.28, use LinkRenderer::getLinkClasses() instead
52 */
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,
68 $customAttribs,
69 $query,
70 $options
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,
84 $customAttribs,
85 $query,
86 $options
87 );
88 }
89
90 public function makeSelfLinkObj(
91 $nt,
92 $html = '',
93 $query = '',
94 $trail = '',
95 $prefix = ''
96 ) {
97 return Linker::makeSelfLinkObj(
98 $nt,
99 $html,
100 $query,
101 $trail,
102 $prefix
103 );
104 }
105
106 public function getInvalidTitleDescription(
107 IContextSource $context,
108 $namespace,
109 $title
110 ) {
111 return Linker::getInvalidTitleDescription(
112 $context,
113 $namespace,
114 $title
115 );
116 }
117
118 public function normaliseSpecialPage( Title $title ) {
119 return Linker::normaliseSpecialPage( $title );
120 }
121
122 public function makeExternalImage( $url, $alt = '' ) {
123 return Linker::makeExternalImage( $url, $alt );
124 }
125
126 public function makeImageLink(
127 Parser $parser,
128 Title $title,
129 $file,
130 $frameParams = [],
131 $handlerParams = [],
132 $time = false,
133 $query = "",
134 $widthOption = null
135 ) {
136 return Linker::makeImageLink(
137 $parser,
138 $title,
139 $file,
140 $frameParams,
141 $handlerParams,
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 ) {
158 return Linker::makeThumbLinkObj(
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 ) {
178 return Linker::makeThumbLink2(
179 $title,
180 $file,
181 $frameParams,
182 $handlerParams,
183 $time,
184 $query
185 );
186 }
187
188 public function processResponsiveImages( $file, $thumb, $hp ) {
189 Linker::processResponsiveImages(
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 ) {
204 return Linker::makeBrokenImageLinkObj(
205 $title,
206 $label,
207 $query,
208 $unused1,
209 $unused2,
210 $time
211 );
212 }
213
214 public function makeMediaLinkObj( $title, $html = '', $time = false ) {
215 return Linker::makeMediaLinkObj(
216 $title,
217 $html,
218 $time
219 );
220 }
221
222 public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
223 return Linker::makeMediaLinkFile(
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 ) {
242 return Linker::makeExternalLink(
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 ) {
267 return Linker::userToolLinks(
268 $userId,
269 $userText,
270 $redContribsWhenNoEdits,
271 $flags,
272 $edits
273 );
274 }
275
276 public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
277 return Linker::userToolLinksRedContribs(
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 ) {
310 return Linker::formatComment(
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 ) {
324 return Linker::formatLinksInComment(
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 ) {
338 return Linker::makeCommentLink(
339 $title,
340 $text,
341 $wikiId,
342 $options
343 );
344 }
345
346 public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
347 return Linker::normalizeSubpageLink(
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 ) {
360 return Linker::commentBlock(
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 ) {
414 return Linker::makeHeadline(
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,
430 IContextSource $context = null,
431 $options = [ 'verify' ]
432 ) {
433 return Linker::generateRollback(
434 $rev,
435 $context,
436 $options
437 );
438 }
439
440 public function getRollbackEditCount( $rev, $verify ) {
441 return Linker::getRollbackEditCount( $rev, $verify );
442 }
443
444 public function buildRollbackLink(
445 $rev,
446 IContextSource $context = null,
447 $editCount = false
448 ) {
449 return Linker::buildRollbackLink(
450 $rev,
451 $context,
452 $editCount
453 );
454 }
455
456 /**
457 * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
458 */
459 public function formatTemplates(
460 $templates,
461 $preview = false,
462 $section = false,
463 $more = null
464 ) {
465 wfDeprecated( __METHOD__, '1.28' );
466
467 return Linker::formatTemplates(
468 $templates,
469 $preview,
470 $section,
471 $more
472 );
473 }
474
475 public function formatHiddenCategories( $hiddencats ) {
476 return Linker::formatHiddenCategories( $hiddencats );
477 }
478
479 /**
480 * @deprecated since 1.28, use Language::formatSize() directly
481 */
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 ) {
501 return Linker::getRevDeleteLink(
502 $user,
503 $rev,
504 $title
505 );
506 }
507
508 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
509 return Linker::revDeleteLink(
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 = [] ) {
521 return Linker::tooltipAndAccesskeyAttribs(
522 $name,
523 $msgParams
524 );
525 }
526
527 public function tooltip( $name, $options = null ) {
528 return Linker::tooltip( $name, $options );
529 }
530
531 }