Merge "Update docs/hooks.txt for ShowSearchHitTitle"
[mediawiki.git] / includes / DummyLinker.php
blob9aa6aeb056d57b2578fc40d814f966f3f052bbd2
1 <?php
3 /**
4 * @since 1.18
5 */
6 class DummyLinker {
8 /**
9 * @deprecated since 1.28, use LinkRenderer::getLinkClasses() instead
11 public function getLinkColour( $t, $threshold ) {
12 wfDeprecated( __METHOD__, '1.28' );
13 return Linker::getLinkColour( $t, $threshold );
16 public function link(
17 $target,
18 $html = null,
19 $customAttribs = [],
20 $query = [],
21 $options = []
22 ) {
23 return Linker::link(
24 $target,
25 $html,
26 $customAttribs,
27 $query,
28 $options
32 public function linkKnown(
33 $target,
34 $html = null,
35 $customAttribs = [],
36 $query = [],
37 $options = [ 'known' ]
38 ) {
39 return Linker::linkKnown(
40 $target,
41 $html,
42 $customAttribs,
43 $query,
44 $options
48 public function makeSelfLinkObj(
49 $nt,
50 $html = '',
51 $query = '',
52 $trail = '',
53 $prefix = ''
54 ) {
55 return Linker::makeSelfLinkObj(
56 $nt,
57 $html,
58 $query,
59 $trail,
60 $prefix
64 public function getInvalidTitleDescription(
65 IContextSource $context,
66 $namespace,
67 $title
68 ) {
69 return Linker::getInvalidTitleDescription(
70 $context,
71 $namespace,
72 $title
76 public function normaliseSpecialPage( Title $title ) {
77 return Linker::normaliseSpecialPage( $title );
80 public function makeExternalImage( $url, $alt = '' ) {
81 return Linker::makeExternalImage( $url, $alt );
84 public function makeImageLink(
85 Parser $parser,
86 Title $title,
87 $file,
88 $frameParams = [],
89 $handlerParams = [],
90 $time = false,
91 $query = "",
92 $widthOption = null
93 ) {
94 return Linker::makeImageLink(
95 $parser,
96 $title,
97 $file,
98 $frameParams,
99 $handlerParams,
100 $time,
101 $query,
102 $widthOption
106 public function makeThumbLinkObj(
107 Title $title,
108 $file,
109 $label = '',
110 $alt,
111 $align = 'right',
112 $params = [],
113 $framed = false,
114 $manualthumb = ""
116 return Linker::makeThumbLinkObj(
117 $title,
118 $file,
119 $label,
120 $alt,
121 $align,
122 $params,
123 $framed,
124 $manualthumb
128 public function makeThumbLink2(
129 Title $title,
130 $file,
131 $frameParams = [],
132 $handlerParams = [],
133 $time = false,
134 $query = ""
136 return Linker::makeThumbLink2(
137 $title,
138 $file,
139 $frameParams,
140 $handlerParams,
141 $time,
142 $query
146 public function processResponsiveImages( $file, $thumb, $hp ) {
147 Linker::processResponsiveImages(
148 $file,
149 $thumb,
154 public function makeBrokenImageLinkObj(
155 $title,
156 $label = '',
157 $query = '',
158 $unused1 = '',
159 $unused2 = '',
160 $time = false
162 return Linker::makeBrokenImageLinkObj(
163 $title,
164 $label,
165 $query,
166 $unused1,
167 $unused2,
168 $time
172 public function makeMediaLinkObj( $title, $html = '', $time = false ) {
173 return Linker::makeMediaLinkObj(
174 $title,
175 $html,
176 $time
180 public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
181 return Linker::makeMediaLinkFile(
182 $title,
183 $file,
184 $html
188 public function specialLink( $name, $key = '' ) {
189 return Linker::specialLink( $name, $key );
192 public function makeExternalLink(
193 $url,
194 $text,
195 $escape = true,
196 $linktype = '',
197 $attribs = [],
198 $title = null
200 return Linker::makeExternalLink(
201 $url,
202 $text,
203 $escape,
204 $linktype,
205 $attribs,
206 $title
210 public function userLink( $userId, $userName, $altUserName = false ) {
211 return Linker::userLink(
212 $userId,
213 $userName,
214 $altUserName
218 public function userToolLinks(
219 $userId,
220 $userText,
221 $redContribsWhenNoEdits = false,
222 $flags = 0,
223 $edits = null
225 return Linker::userToolLinks(
226 $userId,
227 $userText,
228 $redContribsWhenNoEdits,
229 $flags,
230 $edits
234 public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
235 return Linker::userToolLinksRedContribs(
236 $userId,
237 $userText,
238 $edits
242 public function userTalkLink( $userId, $userText ) {
243 return Linker::userTalkLink( $userId, $userText );
246 public function blockLink( $userId, $userText ) {
247 return Linker::blockLink( $userId, $userText );
250 public function emailLink( $userId, $userText ) {
251 return Linker::emailLink( $userId, $userText );
254 public function revUserLink( $rev, $isPublic = false ) {
255 return Linker::revUserLink( $rev, $isPublic );
258 public function revUserTools( $rev, $isPublic = false ) {
259 return Linker::revUserTools( $rev, $isPublic );
262 public function formatComment(
263 $comment,
264 $title = null,
265 $local = false,
266 $wikiId = null
268 return Linker::formatComment(
269 $comment,
270 $title,
271 $local,
272 $wikiId
276 public function formatLinksInComment(
277 $comment,
278 $title = null,
279 $local = false,
280 $wikiId = null
282 return Linker::formatLinksInComment(
283 $comment,
284 $title,
285 $local,
286 $wikiId
290 public function makeCommentLink(
291 Title $title,
292 $text,
293 $wikiId = null,
294 $options = []
296 return Linker::makeCommentLink(
297 $title,
298 $text,
299 $wikiId,
300 $options
304 public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
305 return Linker::normalizeSubpageLink(
306 $contextTitle,
307 $target,
308 $text
312 public function commentBlock(
313 $comment,
314 $title = null,
315 $local = false,
316 $wikiId = null
318 return Linker::commentBlock(
319 $comment,
320 $title,
321 $local,
322 $wikiId
326 public function revComment( Revision $rev, $local = false, $isPublic = false ) {
327 return Linker::revComment( $rev, $local, $isPublic );
330 public function formatRevisionSize( $size ) {
331 return Linker::formatRevisionSize( $size );
334 public function tocIndent() {
335 return Linker::tocIndent();
338 public function tocUnindent( $level ) {
339 return Linker::tocUnindent( $level );
342 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
343 return Linker::tocLine(
344 $anchor,
345 $tocline,
346 $tocnumber,
347 $level,
348 $sectionIndex
352 public function tocLineEnd() {
353 return Linker::tocLineEnd();
356 public function tocList( $toc, $lang = false ) {
357 return Linker::tocList( $toc, $lang );
360 public function generateTOC( $tree, $lang = false ) {
361 return Linker::generateTOC( $tree, $lang );
364 public function makeHeadline(
365 $level,
366 $attribs,
367 $anchor,
368 $html,
369 $link,
370 $legacyAnchor = false
372 return Linker::makeHeadline(
373 $level,
374 $attribs,
375 $anchor,
376 $html,
377 $link,
378 $legacyAnchor
382 public function splitTrail( $trail ) {
383 return Linker::splitTrail( $trail );
386 public function generateRollback(
387 $rev,
388 IContextSource $context = null,
389 $options = [ 'verify' ]
391 return Linker::generateRollback(
392 $rev,
393 $context,
394 $options
398 public function getRollbackEditCount( $rev, $verify ) {
399 return Linker::getRollbackEditCount( $rev, $verify );
402 public function buildRollbackLink(
403 $rev,
404 IContextSource $context = null,
405 $editCount = false
407 return Linker::buildRollbackLink(
408 $rev,
409 $context,
410 $editCount
415 * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
417 public function formatTemplates(
418 $templates,
419 $preview = false,
420 $section = false,
421 $more = null
423 wfDeprecated( __METHOD__, '1.28' );
425 return Linker::formatTemplates(
426 $templates,
427 $preview,
428 $section,
429 $more
433 public function formatHiddenCategories( $hiddencats ) {
434 return Linker::formatHiddenCategories( $hiddencats );
438 * @deprecated since 1.28, use Language::formatSize() directly
440 public function formatSize( $size ) {
441 wfDeprecated( __METHOD__, '1.28' );
443 return Linker::formatSize( $size );
446 public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
447 return Linker::titleAttrib(
448 $name,
449 $options,
450 $msgParams
454 public function accesskey( $name ) {
455 return Linker::accesskey( $name );
458 public function getRevDeleteLink( User $user, Revision $rev, Title $title ) {
459 return Linker::getRevDeleteLink(
460 $user,
461 $rev,
462 $title
466 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
467 return Linker::revDeleteLink(
468 $query,
469 $restricted,
470 $delete
474 public function revDeleteLinkDisabled( $delete = true ) {
475 return Linker::revDeleteLinkDisabled( $delete );
478 public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
479 return Linker::tooltipAndAccesskeyAttribs(
480 $name,
481 $msgParams
485 public function tooltip( $name, $options = null ) {
486 return Linker::tooltip( $name, $options );