MediaWiki master
|
Service class that renders HTML for user-related links. More...
Public Member Functions | |
__construct (HookContainer $hookContainer, TempUserConfig $tempUserConfig, SpecialPageFactory $specialPageFactory, LinkRenderer $linkRenderer, TempUserDetailsLookup $tempUserDetailsLookup, UserIdentityLookup $userIdentityLookup) | |
userLink (UserIdentity $targetUser, IContextSource $context, ?string $altUserName=null, array $attributes=[]) | |
Render a user page link (or user contributions for anonymous and temporary users). | |
Protected Member Functions | |
isFromExternalWiki ( $wikiId) | |
Checks whether a given wiki identifier belongs to an external wiki. | |
Service class that renders HTML for user-related links.
Definition at line 30 of file UserLinkRenderer.php.
MediaWiki\Linker\UserLinkRenderer::__construct | ( | HookContainer | $hookContainer, |
TempUserConfig | $tempUserConfig, | ||
SpecialPageFactory | $specialPageFactory, | ||
LinkRenderer | $linkRenderer, | ||
TempUserDetailsLookup | $tempUserDetailsLookup, | ||
UserIdentityLookup | $userIdentityLookup ) |
Definition at line 47 of file UserLinkRenderer.php.
|
protected |
Checks whether a given wiki identifier belongs to an external wiki.
string | false | $wikiId | ID to check |
Definition at line 300 of file UserLinkRenderer.php.
MediaWiki\Linker\UserLinkRenderer::userLink | ( | UserIdentity | $targetUser, |
IContextSource | $context, | ||
?string | $altUserName = null, | ||
array | $attributes = [] ) |
Render a user page link (or user contributions for anonymous and temporary users).
Returns potentially cached link HTML.
UserIdentity | $targetUser | The user to render a link for. |
IContextSource | $context | |
string | null | $altUserName | Optional text to display instead of the user name, or null to use the user name. |
string[] | $attributes | Optional extra HTML attributes for the link. |
Definition at line 78 of file UserLinkRenderer.php.
References MediaWiki\DAO\WikiAwareEntity\getWikiId().