Template:Method doclink

From MediaWiki.org
Jump to navigation Jump to search

{{{method}}}

Template documentation

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 }}
Parser::setFunctionHook
<code>{{method doclink |class=RCFeedEngine | type=interface|anchor=a654d2f1299fea499b4786db3dcca73a6 |method=<code>RCFeedEngine</code>'s <code>send()</code> method}}
RCFeedEngine's send() method

See also[edit]