MediaWiki  REL1_24
PageLinkRenderer Interface Reference

Represents a link rendering service for MediaWiki. More...

Inheritance diagram for PageLinkRenderer:

List of all members.

Public Member Functions

 getPageUrl (TitleValue $page, $params=array())
 Returns the URL for the given page.
 renderHtmlLink (TitleValue $page, $text=null)
 Returns an HTML link to the given page, using the given surface text.
 renderWikitextLink (TitleValue $page, $text=null)
 Returns a wikitext link to the given page, using the given surface text.

Detailed Description

Represents a link rendering service for MediaWiki.

This is designed to encapsulate the knowledge about how page titles map to URLs, and how links are encoded in a given output format.

See also:
https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue

Definition at line 33 of file PageLinkRenderer.php.


Member Function Documentation

PageLinkRenderer::getPageUrl ( TitleValue page,
params = array() 
)

Returns the URL for the given page.

Todo:
expand this to cover the functionality of Linker::linkUrl
Parameters:
TitleValue$pageThe link's target
array$paramsAny additional URL parameters.
Returns:
string

Implemented in MediaWikiPageLinkRenderer.

PageLinkRenderer::renderHtmlLink ( TitleValue page,
text = null 
)

Returns an HTML link to the given page, using the given surface text.

Todo:
expand this to cover the functionality of Linker::link
Parameters:
TitleValue$pageThe link's target
string$textThe link's surface text (will be derived from $page if not given).
Returns:
string

Implemented in MediaWikiPageLinkRenderer.

PageLinkRenderer::renderWikitextLink ( TitleValue page,
text = null 
)

Returns a wikitext link to the given page, using the given surface text.

Parameters:
TitleValue$pageThe link's target
string$textThe link's surface text (will be derived from $page if not given).
Returns:
string

Implemented in MediaWikiPageLinkRenderer.


The documentation for this interface was generated from the following file: