MediaWiki
1.23.2
|
A service for generating links from page titles. More...
Public Member Functions | |
__construct (TitleFormatter $formatter, $baseUrl=null) | |
getPageUrl (TitleValue $page, $params=array()) | |
Returns the (partial) URL for the given page (including any section identifier). More... | |
renderHtmlLink (TitleValue $page, $text=null) | |
Returns an HTML link to the given page, using the given surface text. More... | |
renderWikitextLink (TitleValue $page, $text=null) | |
Returns a wikitext link to the given page, using the given surface text. More... | |
Protected Attributes | |
string | $baseUrl |
TitleFormatter | $formatter |
A service for generating links from page titles.
Definition at line 30 of file MediaWikiPageLinkRenderer.php.
MediaWikiPageLinkRenderer::__construct | ( | TitleFormatter | $formatter, |
$baseUrl = null |
|||
) |
TitleFormatter | $formatter | formatter for generating the target title string |
string | $baseUrl | (currently unused, pending refactoring of Linker). Defaults to $wgArticlePath. |
Definition at line 51 of file MediaWikiPageLinkRenderer.php.
References $baseUrl, $formatter, and $GLOBALS.
MediaWikiPageLinkRenderer::getPageUrl | ( | TitleValue | $page, |
$params = array() |
|||
) |
Returns the (partial) URL for the given page (including any section identifier).
TitleValue | $page | The link's target |
array | $params | any additional URL parameters. |
Implements PageLinkRenderer.
Definition at line 68 of file MediaWikiPageLinkRenderer.php.
References $name, $params, TitleValue\getFragment(), wfArrayToCgi(), and wfUrlencode().
MediaWikiPageLinkRenderer::renderHtmlLink | ( | TitleValue | $page, |
$text = null |
|||
) |
Returns an HTML link to the given page, using the given surface text.
TitleValue | $page | The link's target |
string | $text | The link's surface text (will be derived from $page if not given). |
Implements PageLinkRenderer.
Definition at line 99 of file MediaWikiPageLinkRenderer.php.
References $link, $title, Linker\link(), and Title\newFromTitleValue().
MediaWikiPageLinkRenderer::renderWikitextLink | ( | TitleValue | $page, |
$text = null |
|||
) |
Returns a wikitext link to the given page, using the given surface text.
TitleValue | $page | The link's target |
string | $text | The link's surface text (will be derived from $page if not given). |
Implements PageLinkRenderer.
Definition at line 120 of file MediaWikiPageLinkRenderer.php.
References $name, and wfEscapeWikiText().
|
protected |
Definition at line 38 of file MediaWikiPageLinkRenderer.php.
Referenced by __construct().
|
protected |
Definition at line 34 of file MediaWikiPageLinkRenderer.php.
Referenced by __construct().