MediaWiki 1.39.10
|
Class that generates HTML anchor link elements for pages. More...
Public Member Functions | |
__construct (TitleFormatter $titleFormatter, LinkCache $linkCache, SpecialPageFactory $specialPageFactory, HookContainer $hookContainer, ServiceOptions $options) | |
getExpandURLs () | |
getForceArticlePath () | |
getLinkClasses ( $target) | |
Return the CSS classes of a known link. | |
isForComment () | |
makeBrokenLink ( $target, $text=null, array $extraAttribs=[], array $query=[]) | |
makeKnownLink ( $target, $text=null, array $extraAttribs=[], array $query=[]) | |
makeLink ( $target, $text=null, array $extraAttribs=[], array $query=[]) | |
makePreloadedLink ( $target, $text=null, $classes='', array $extraAttribs=[], array $query=[]) | |
If you have already looked up the proper CSS classes using LinkRenderer::getLinkClasses() or some other method, use this to avoid looking it up again. | |
normalizeTarget ( $target) | |
Normalizes the provided target. | |
setExpandURLs ( $expand) | |
setForceArticlePath ( $force) | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Class that generates HTML anchor link elements for pages.
Definition at line 43 of file LinkRenderer.php.
MediaWiki\Linker\LinkRenderer::__construct | ( | TitleFormatter | $titleFormatter, |
LinkCache | $linkCache, | ||
SpecialPageFactory | $specialPageFactory, | ||
HookContainer | $hookContainer, | ||
ServiceOptions | $options ) |
TitleFormatter | $titleFormatter | |
LinkCache | $linkCache | |
SpecialPageFactory | $specialPageFactory | |
HookContainer | $hookContainer | |
ServiceOptions | $options |
Definition at line 97 of file LinkRenderer.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), and MediaWiki\Config\ServiceOptions\get().
MediaWiki\Linker\LinkRenderer::getExpandURLs | ( | ) |
Definition at line 137 of file LinkRenderer.php.
MediaWiki\Linker\LinkRenderer::getForceArticlePath | ( | ) |
Definition at line 123 of file LinkRenderer.php.
MediaWiki\Linker\LinkRenderer::getLinkClasses | ( | $target | ) |
Return the CSS classes of a known link.
LinkTarget | PageReference | $target |
Definition at line 417 of file LinkRenderer.php.
MediaWiki\Linker\LinkRenderer::isForComment | ( | ) |
Definition at line 141 of file LinkRenderer.php.
MediaWiki\Linker\LinkRenderer::makeBrokenLink | ( | $target, | |
$text = null, | |||
array | $extraAttribs = [], | ||
array | $query = [] ) |
LinkTarget | PageReference | $target | |
-taint | $target | none |
string | HtmlArmor | null | $text | |
array | $extraAttribs | |
array | $query |
Definition at line 258 of file LinkRenderer.php.
References NS_SPECIAL, and wfMessage().
MediaWiki\Linker\LinkRenderer::makeKnownLink | ( | $target, | |
$text = null, | |||
array | $extraAttribs = [], | ||
array | $query = [] ) |
LinkTarget | PageReference | $target | |
string | HtmlArmor | null | $text | |
array | $extraAttribs | |
array | $query |
Definition at line 221 of file LinkRenderer.php.
Referenced by TraditionalImageGallery\getCaptionHtml(), Article\getRedirectHeaderHtml(), ImagePage\imageDupes(), ImagePage\imageLinks(), ImagePage\openShowImage(), and InfoAction\pageInfo().
MediaWiki\Linker\LinkRenderer::makeLink | ( | $target, | |
$text = null, | |||
array | $extraAttribs = [], | ||
array | $query = [] ) |
LinkTarget | PageReference | $target | |
string | HtmlArmor | null | $text | |
array | $extraAttribs | |
array | $query |
Definition at line 153 of file LinkRenderer.php.
Referenced by Article\getRedirectHeaderHtml(), and InfoAction\pageInfo().
MediaWiki\Linker\LinkRenderer::makePreloadedLink | ( | $target, | |
$text = null, | |||
$classes = '', | |||
array | $extraAttribs = [], | ||
array | $query = [] ) |
If you have already looked up the proper CSS classes using LinkRenderer::getLinkClasses() or some other method, use this to avoid looking it up again.
LinkTarget | PageReference | $target | |
string | HtmlArmor | null | $text | |
string | $classes | CSS classes to add |
array | $extraAttribs | |
array | $query |
Definition at line 185 of file LinkRenderer.php.
MediaWiki\Linker\LinkRenderer::normalizeTarget | ( | $target | ) |
Normalizes the provided target.
LinkTarget | PageReference | $target |
Definition at line 368 of file LinkRenderer.php.
References NS_SPECIAL.
MediaWiki\Linker\LinkRenderer::setExpandURLs | ( | $expand | ) |
string | bool | int | $expand | A PROTO_* constant or false |
Definition at line 130 of file LinkRenderer.php.
MediaWiki\Linker\LinkRenderer::setForceArticlePath | ( | $force | ) |
bool | $force |
Definition at line 116 of file LinkRenderer.php.
const MediaWiki\Linker\LinkRenderer::CONSTRUCTOR_OPTIONS |
Definition at line 45 of file LinkRenderer.php.
Referenced by MediaWiki\Linker\LinkRendererFactory\create().