Template:Class doclink

From Bonkipedia
Revision as of 17:51, 12 November 2022 by ManfredoDo (talk | contribs) (1 revision imported: Workaround and Utility Templates)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{{1}}}

Template documentation

Given a class name implemented by mediawiki/core, this renders a link to automatically-generated documentation for the class at https://doc.wikimedia.org/mediawiki-core/master/php/

Code Preview
{{class doclink|OutputPage}}
OutputPage
{{class doclink|WebRequest}}
WebRequest
{{class doclink|class=RequestContext}}
RequestContext
{{class doclink|Config|type=interface}}
Config
{{class doclink|Wikimedia\Rdbms\Database|Wikimedia\Rdbms\Database::select|anchor=a3b03dd27f434aabfc8d2d639d1e5fa9a}}
Wikimedia\Rdbms\Database::select
{{class doclink|class=Wikimedia\Rdbms\Database|text=Wikimedia\Rdbms\Database::select|anchor=a3b03dd27f434aabfc8d2d639d1e5fa9a}}
Wikimedia\Rdbms\Database::select

Parameters

Renders a link to automatically-generated documentation for a class or method at https://doc.wikimedia.org/mediawiki-core/master/php/

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
class name1 class

Fully qualified class name.

Example
Wikimedia\Rdbms\Database
Stringrequired
text2 text

Link text.

Example
Database
Stringoptional
anchoranchor

URL anchor. Used for linking to a specific property or method of the class.

Example
a3b03dd27f434aabfc8d2d639d1e5fa9a
Stringoptional
typetype

Type of the entity: class or interface. (With the current documentation structure, it's not possible to link traits.) Required if it's not a class.

Default
interface
Stringoptional
Project / extension nameproject

Project name, from https://doc.wikimedia.org/index/ . For extensions, this is just the name of the extension. For most other things, it is the repository name, with dashes instead of slashes.

Example
mediawiki-libs-RemexHtml
Stringoptional
branchbranch

Git branch (if not master).

Example
main
Stringoptional

See also

  • {{Class}} links to the implicit Manual:ClassName.php wiki page
  • {{MW file}} renders a table for a PHP file in core, including doc links for the classes implemented by it
  • {{Method doclink}} to link to a particular method
  • {{File doclink}}
  • {{js doclink}} for Javascript API links