MediaWiki REL1_29
DummyLinker.php
Go to the documentation of this file.
1<?php
2
7
11 public function getLinkColour( $t, $threshold ) {
12 wfDeprecated( __METHOD__, '1.28' );
13 return Linker::getLinkColour( $t, $threshold );
14 }
15
16 public function link(
17 $target,
18 $html = null,
19 $customAttribs = [],
20 $query = [],
21 $options = []
22 ) {
23 return Linker::link(
24 $target,
25 $html,
27 $query,
29 );
30 }
31
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,
43 $query,
45 );
46 }
47
48 public function makeSelfLinkObj(
49 $nt,
50 $html = '',
51 $query = '',
52 $trail = '',
53 $prefix = ''
54 ) {
56 $nt,
57 $html,
58 $query,
59 $trail,
60 $prefix
61 );
62 }
63
66 $namespace,
67 $title
68 ) {
71 $namespace,
72 $title
73 );
74 }
75
76 public function normaliseSpecialPage( Title $title ) {
78 }
79
80 public function makeExternalImage( $url, $alt = '' ) {
81 return Linker::makeExternalImage( $url, $alt );
82 }
83
84 public function makeImageLink(
86 Title $title,
87 $file,
88 $frameParams = [],
89 $handlerParams = [],
90 $time = false,
91 $query = "",
92 $widthOption = null
93 ) {
95 $parser,
96 $title,
97 $file,
98 $frameParams,
100 $time,
101 $query,
102 $widthOption
103 );
104 }
105
106 public function makeThumbLinkObj(
107 Title $title,
108 $file,
109 $label = '',
110 $alt,
111 $align = 'right',
112 $params = [],
113 $framed = false,
114 $manualthumb = ""
115 ) {
117 $title,
118 $file,
119 $label,
120 $alt,
121 $align,
122 $params,
123 $framed,
124 $manualthumb
125 );
126 }
127
128 public function makeThumbLink2(
129 Title $title,
130 $file,
131 $frameParams = [],
132 $handlerParams = [],
133 $time = false,
134 $query = ""
135 ) {
137 $title,
138 $file,
139 $frameParams,
141 $time,
142 $query
143 );
144 }
145
146 public function processResponsiveImages( $file, $thumb, $hp ) {
148 $file,
149 $thumb,
150 $hp
151 );
152 }
153
154 public function makeBrokenImageLinkObj(
155 $title,
156 $label = '',
157 $query = '',
158 $unused1 = '',
159 $unused2 = '',
160 $time = false
161 ) {
163 $title,
164 $label,
165 $query,
166 $unused1,
167 $unused2,
168 $time
169 );
170 }
171
172 public function makeMediaLinkObj( $title, $html = '', $time = false ) {
174 $title,
175 $html,
176 $time
177 );
178 }
179
180 public function makeMediaLinkFile( Title $title, $file, $html = '' ) {
182 $title,
183 $file,
184 $html
185 );
186 }
187
188 public function specialLink( $name, $key = '' ) {
189 return Linker::specialLink( $name, $key );
190 }
191
192 public function makeExternalLink(
193 $url,
194 $text,
195 $escape = true,
196 $linktype = '',
197 $attribs = [],
198 $title = null
199 ) {
201 $url,
202 $text,
203 $escape,
204 $linktype,
205 $attribs,
206 $title
207 );
208 }
209
210 public function userLink( $userId, $userName, $altUserName = false ) {
211 return Linker::userLink(
212 $userId,
213 $userName,
214 $altUserName
215 );
216 }
217
218 public function userToolLinks(
219 $userId,
220 $userText,
221 $redContribsWhenNoEdits = false,
222 $flags = 0,
223 $edits = null
224 ) {
226 $userId,
227 $userText,
228 $redContribsWhenNoEdits,
229 $flags,
230 $edits
231 );
232 }
233
234 public function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
236 $userId,
237 $userText,
238 $edits
239 );
240 }
241
242 public function userTalkLink( $userId, $userText ) {
243 return Linker::userTalkLink( $userId, $userText );
244 }
245
246 public function blockLink( $userId, $userText ) {
247 return Linker::blockLink( $userId, $userText );
248 }
249
250 public function emailLink( $userId, $userText ) {
251 return Linker::emailLink( $userId, $userText );
252 }
253
254 public function revUserLink( $rev, $isPublic = false ) {
255 return Linker::revUserLink( $rev, $isPublic );
256 }
257
258 public function revUserTools( $rev, $isPublic = false ) {
259 return Linker::revUserTools( $rev, $isPublic );
260 }
261
262 public function formatComment(
263 $comment,
264 $title = null,
265 $local = false,
266 $wikiId = null
267 ) {
269 $comment,
270 $title,
271 $local,
272 $wikiId
273 );
274 }
275
276 public function formatLinksInComment(
277 $comment,
278 $title = null,
279 $local = false,
280 $wikiId = null
281 ) {
283 $comment,
284 $title,
285 $local,
286 $wikiId
287 );
288 }
289
290 public function makeCommentLink(
291 Title $title,
292 $text,
293 $wikiId = null,
294 $options = []
295 ) {
297 $title,
298 $text,
299 $wikiId,
301 );
302 }
303
304 public function normalizeSubpageLink( $contextTitle, $target, &$text ) {
306 $contextTitle,
307 $target,
308 $text
309 );
310 }
311
312 public function commentBlock(
313 $comment,
314 $title = null,
315 $local = false,
316 $wikiId = null
317 ) {
319 $comment,
320 $title,
321 $local,
322 $wikiId
323 );
324 }
325
326 public function revComment( Revision $rev, $local = false, $isPublic = false ) {
327 return Linker::revComment( $rev, $local, $isPublic );
328 }
329
330 public function formatRevisionSize( $size ) {
331 return Linker::formatRevisionSize( $size );
332 }
333
334 public function tocIndent() {
335 return Linker::tocIndent();
336 }
337
338 public function tocUnindent( $level ) {
339 return Linker::tocUnindent( $level );
340 }
341
342 public function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) {
343 return Linker::tocLine(
344 $anchor,
345 $tocline,
346 $tocnumber,
347 $level,
348 $sectionIndex
349 );
350 }
351
352 public function tocLineEnd() {
353 return Linker::tocLineEnd();
354 }
355
356 public function tocList( $toc, $lang = false ) {
357 return Linker::tocList( $toc, $lang );
358 }
359
360 public function generateTOC( $tree, $lang = false ) {
361 return Linker::generateTOC( $tree, $lang );
362 }
363
364 public function makeHeadline(
365 $level,
366 $attribs,
367 $anchor,
368 $html,
369 $link,
370 $legacyAnchor = false
371 ) {
373 $level,
374 $attribs,
375 $anchor,
376 $html,
377 $link,
378 $legacyAnchor
379 );
380 }
381
382 public function splitTrail( $trail ) {
383 return Linker::splitTrail( $trail );
384 }
385
386 public function generateRollback(
387 $rev,
389 $options = [ 'verify' ]
390 ) {
392 $rev,
393 $context,
395 );
396 }
397
398 public function getRollbackEditCount( $rev, $verify ) {
399 return Linker::getRollbackEditCount( $rev, $verify );
400 }
401
402 public function buildRollbackLink(
403 $rev,
405 $editCount = false
406 ) {
408 $rev,
409 $context,
410 $editCount
411 );
412 }
413
417 public function formatTemplates(
418 $templates,
419 $preview = false,
420 $section = false,
421 $more = null
422 ) {
423 wfDeprecated( __METHOD__, '1.28' );
424
426 $templates,
427 $preview,
428 $section,
429 $more
430 );
431 }
432
433 public function formatHiddenCategories( $hiddencats ) {
434 return Linker::formatHiddenCategories( $hiddencats );
435 }
436
440 public function formatSize( $size ) {
441 wfDeprecated( __METHOD__, '1.28' );
442
443 return Linker::formatSize( $size );
444 }
445
446 public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
447 return Linker::titleAttrib(
448 $name,
449 $options,
450 $msgParams
451 );
452 }
453
454 public function accesskey( $name ) {
455 return Linker::accesskey( $name );
456 }
457
458 public function getRevDeleteLink( User $user, Revision $rev, Title $title ) {
460 $user,
461 $rev,
462 $title
463 );
464 }
465
466 public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
468 $query,
469 $restricted,
470 $delete
471 );
472 }
473
474 public function revDeleteLinkDisabled( $delete = true ) {
475 return Linker::revDeleteLinkDisabled( $delete );
476 }
477
478 public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
480 $name,
481 $msgParams
482 );
483 }
484
485 public function tooltip( $name, $options = null ) {
486 return Linker::tooltip( $name, $options );
487 }
488
489}
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)
makeExternalImage( $url, $alt='')
processResponsiveImages( $file, $thumb, $hp)
commentBlock( $comment, $title=null, $local=false, $wikiId=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)
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='')
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:1559
static generateRollback( $rev, IContextSource $context=null, $options=[ 'verify'])
Generate a rollback link for a given revision.
Definition Linker.php:1677
static makeMediaLinkFile(Title $title, $file, $html='')
Create a direct link to a given uploaded file.
Definition Linker.php:778
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
Definition Linker.php:107
static tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex=false)
parameter level defines if we are on an indentation level
Definition Linker.php:1529
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition Linker.php:888
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:1938
static makeThumbLink2(Title $title, $file, $frameParams=[], $handlerParams=[], $time=false, $query="")
Definition Linker.php:528
static formatSize( $size)
Definition Linker.php:1916
static accesskey( $name)
Given the id of an interface element, constructs the appropriate accesskey attribute from the system ...
Definition Linker.php:1981
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:819
static getLinkColour(LinkTarget $t, $threshold)
Return the CSS colour of a known link.
Definition Linker.php:51
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:319
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
Definition Linker.php:159
static generateTOC( $tree, $lang=false)
Generate a table of contents from a section tree.
Definition Linker.php:1577
static makeExternalImage( $url, $alt='')
Return the code for images which were added via external links, via Parser::maybeMakeExternalImage().
Definition Linker.php:266
static userToolLinksRedContribs( $userId, $userText, $edits=null)
Alias for userToolLinks( $userId, $userText, true );.
Definition Linker.php:978
static buildRollbackLink( $rev, IContextSource $context=null, $editCount=false)
Build a raw rollback link, useful for collections of "tool" links.
Definition Linker.php:1776
static processResponsiveImages( $file, $thumb, $hp)
Process responsive images: add 1.5x and 2x subimages to the thumbnail, where applicable.
Definition Linker.php:650
static blockLink( $userId, $userText)
Definition Linker.php:1003
static revDeleteLinkDisabled( $delete=true)
Creates a dead (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2080
static getRollbackEditCount( $rev, $verify)
This function will return the number of revisions which a rollback would revert and,...
Definition Linker.php:1716
static normalizeSubpageLink( $contextTitle, $target, &$text)
Definition Linker.php:1353
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:1464
static makeSelfLinkObj( $nt, $html='', $query='', $trail='', $prefix='')
Make appropriate markup for a link to the current article.
Definition Linker.php:181
static tocIndent()
Add another level to the Table of Contents.
Definition Linker.php:1503
static revUserLink( $rev, $isPublic=false)
Generate a user link if the current user is allowed to view it.
Definition Linker.php:1033
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:1439
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
Returns the attributes for the tooltip and access key.
Definition Linker.php:2098
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition Linker.php:204
static revUserTools( $rev, $isPublic=false)
Generate a user tool link cluster if the current user is allowed to view it.
Definition Linker.php:1055
static emailLink( $userId, $userText)
Definition Linker.php:1017
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:502
static formatHiddenCategories( $hiddencats)
Returns HTML for the "hidden categories on this page" list.
Definition Linker.php:1886
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:1636
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
Definition Linker.php:921
static formatRevisionSize( $size)
Definition Linker.php:1487
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
Definition Linker.php:2122
static userTalkLink( $userId, $userText)
Definition Linker.php:988
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:1219
static makeMediaLinkObj( $title, $html='', $time=false)
Create a direct link to a given uploaded file.
Definition Linker.php:761
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
Definition Linker.php:838
static makeCommentLink(Title $title, $text, $wikiId=null, $options=[])
Generates a link to the given Title.
Definition Linker.php:1327
static normaliseSpecialPage(LinkTarget $target)
Definition Linker.php:225
static makeHeadline( $level, $attribs, $anchor, $html, $link, $fallbackAnchor=false)
Create a headline for content.
Definition Linker.php:1615
static formatTemplates( $templates, $preview=false, $section=false, $more=null)
Definition Linker.php:1855
static tocUnindent( $level)
Finish one or more sublevels on the Table of Contents.
Definition Linker.php:1514
static revDeleteLink( $query=[], $restricted=false, $delete=true)
Creates a (show/hide) link for deleting revisions/log entries.
Definition Linker.php:2058
static tocLineEnd()
End a Table Of Contents line.
Definition Linker.php:1547
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:1094
static makeBrokenImageLinkObj( $title, $label='', $query='', $unused1='', $unused2='', $time=false)
Make a "broken" link to an image.
Definition Linker.php:685
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:2017
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:39
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition User.php:50
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
error also a ContextSource you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2728
do that in ParserLimitReportFormat instead $parser
Definition hooks.txt:2536
see documentation in includes Linker php for Linker::makeImageLink & $time
Definition hooks.txt:1769
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup 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:1102
null means default & $customAttribs
Definition hooks.txt:1956
namespace and then decline to actually register it file or subcat img or subcat $title
Definition hooks.txt:964
it s the revision text itself In either if gzip is the revision text is gzipped $flags
Definition hooks.txt:2753
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:1974
usually copyright or history_copyright This message must be in HTML not wikitext & $link
Definition hooks.txt:2937
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:304
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:1975
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:1601
see documentation in includes Linker php for Linker::makeImageLink & $handlerParams
Definition hooks.txt:1767
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:2938
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:1751
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.
$params
if(!isset( $args[0])) $lang