Template:Method doclink: Difference between revisions
Appearance
Content deleted Content added
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..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<span class=plainlinks>[https://doc.wikimedia.org/mediawiki-core/master/php/{{{type|class}}}{{urlencode: |
|||
<noinclude>{{Documentation subpage}} |
|||
{{#invoke:String|replace |
|||
{{timw|{{BASEPAGENAME}}}} |
|||
|source={{#invoke:String|replace |
|||
| ⚫ | |||
|source={{trim|{{{class|{{{1}}}}}}}} |
|||
This renders a link to a particular anchor in automatically-generated documentation for a class at https://doc.wikimedia.org/mediawiki-core/master/php/ . |
|||
|pattern=_|replace=__ |
|||
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 <code>method </code> parameter for the method name (or any text) to display. |
|||
}} |
|||
|pattern=\|replace=_1_1 |
|||
Doxygen generates long <code>id</code> attributes for methods, so you have to click on a link to a method to get its <code>anchor</code> value from the URL. But the <code>id</code>s seem stable. |
|||
| ⚫ | |||
|PATH}}.html#{{urlencode:{{{anchor}}}}} {{{method}}}]</span><noinclude> |
|||
It seems you can add whitespace around the <code>|</code> to make the template invocation more readable. |
|||
| ⚫ | |||
{| class="wikitable" |
|||
! Code |
|||
! Preview |
|||
|- |
|||
| <pre>{{method doclink | class=Parser | anchor=a4979a4906f0cb0c1823974a47d5bd12f | method=Parser::setFunctionHook }}</pre> |
|||
| {{method doclink | class=Parser | anchor=a4979a4906f0cb0c1823974a47d5bd12f | method=Parser::setFunctionHook }} |
|||
|- |
|||
| <pre>{{method doclink |class=RCFeedEngine | type=interface|anchor=a654d2f1299fea499b4786db3dcca73a6 |method=<code>RCFeedEngine</code>'s <code>send()</code> method}}</pre> |
|||
| {{method doclink |class=RCFeedEngine | type=interface | anchor=a654d2f1299fea499b4786db3dcca73a6 | method=<code>RCFeedEngine</code>'s <code>send()</code> method}} |
|||
| ⚫ | |||
== See also == |
|||
* {{tl|Class doclink}} to link to the class or interface |
|||
* {{tl|File doclink}} |
|||
* {{tl|js doclink}} for Javascript API links |
|||
<includeonly> |
|||
[[Category:External link templates]] |
|||
</includeonly> |
|||
Latest revision as of 11:14, 15 April 2026
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 |
{{method doclink |class=RCFeedEngine | type=interface|anchor=a654d2f1299fea499b4786db3dcca73a6 |method=<code>RCFeedEngine</code>'s <code>send()</code> method}}
|
RCFeedEngine's send() method
|
See also
- {{Class doclink}} to link to the class or interface
- {{File doclink}}
- {{Js doclink}} for Javascript API links