Jump to content

Template:Method doclink

From wikiNonStop
Revision as of 11:13, 15 April 2026 by Majestix (talk | contribs) (Created page with "<noinclude>{{Documentation subpage}} {{timw|{{BASEPAGENAME}}}} </noinclude> This renders a link to a particular anchor in automatically-generated documentation for a class at https://doc.wikimedia.org/mediawiki-core/master/php/ . Like {{tl|class doclink}} it takes a class in <code>mediawiki/core</code> and an optional <code>type=interface</code>. It adds an an <code>anchor</code> parameter to scroll to a particular part of the file (without the <code>#</code>) and a <cod...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Method doclink

This renders a link to a particular anchor in automatically-generated documentation for a class at https://doc.wikimedia.org/mediawiki-core/master/php/ . Like {{Class doclink }} it takes a class in mediawiki/core and an optional type=interface. It adds an an anchor parameter to scroll to a particular part of the file (without the #) and a method parameter for the method name (or any text) to display.

Doxygen generates long id attributes for methods, so you have to click on a link to a method to get its anchor value from the URL. But the ids seem stable.

It seems you can add whitespace around the | to make the template invocation more readable.

Code Preview
{{method doclink | class=Parser | anchor=a4979a4906f0cb0c1823974a47d5bd12f | method=Parser::setFunctionHook }}

This renders a link to a particular anchor in automatically-generated documentation for a class at https://doc.wikimedia.org/mediawiki-core/master/php/ . Like {{Class doclink }} it takes a class in mediawiki/core and an optional type=interface. It adds an an anchor parameter to scroll to a particular part of the file (without the #) and a method parameter for the method name (or any text) to display.

Doxygen generates long id attributes for methods, so you have to click on a link to a method to get its anchor value from the URL. But the ids seem stable.

It seems you can add whitespace around the | to make the template invocation more readable.

Code Preview
{{method doclink | class=Parser | anchor=a4979a4906f0cb0c1823974a47d5bd12f | method=Parser::setFunctionHook }}
Template loop detected: Template:Method doclink
{{method doclink |class=RCFeedEngine | type=interface|anchor=a654d2f1299fea499b4786db3dcca73a6 |method=<code>RCFeedEngine</code>'s <code>send()</code> method}}
Template loop detected: Template:Method doclink

See also

{{method doclink |class=RCFeedEngine | type=interface|anchor=a654d2f1299fea499b4786db3dcca73a6 |method=<code>RCFeedEngine</code>'s <code>send()</code> method}}

This renders a link to a particular anchor in automatically-generated documentation for a class at https://doc.wikimedia.org/mediawiki-core/master/php/ . Like {{Class doclink }} it takes a class in mediawiki/core and an optional type=interface. It adds an an anchor parameter to scroll to a particular part of the file (without the #) and a method parameter for the method name (or any text) to display.

Doxygen generates long id attributes for methods, so you have to click on a link to a method to get its anchor value from the URL. But the ids seem stable.

It seems you can add whitespace around the | to make the template invocation more readable.

Code Preview
{{method doclink | class=Parser | anchor=a4979a4906f0cb0c1823974a47d5bd12f | method=Parser::setFunctionHook }}
Template loop detected: Template:Method doclink
{{method doclink |class=RCFeedEngine | type=interface|anchor=a654d2f1299fea499b4786db3dcca73a6 |method=<code>RCFeedEngine</code>'s <code>send()</code> method}}
Template loop detected: Template:Method doclink

See also

See also