MediaWiki master
MediaWiki\Linker\LinkRendererFactory Class Reference

Factory to create LinkRender objects. More...

Public Member Functions

 __construct (TitleFormatter $titleFormatter, LinkCache $linkCache, SpecialPageFactory $specialPageFactory, HookContainer $hookContainer, TempUserConfig $tempUserConfig, TempUserDetailsLookup $tempUserDetailsLookup, UserIdentityLookup $userIdentityLookup, UserNameUtils $userNameUtils)
 
 create (array $options=[ 'renderForComment'=> false])
 
 createFromLegacyOptions (array $options)
 

Detailed Description

Factory to create LinkRender objects.

Since
1.28

Definition at line 23 of file LinkRendererFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Linker\LinkRendererFactory::__construct ( TitleFormatter $titleFormatter,
LinkCache $linkCache,
SpecialPageFactory $specialPageFactory,
HookContainer $hookContainer,
TempUserConfig $tempUserConfig,
TempUserDetailsLookup $tempUserDetailsLookup,
UserIdentityLookup $userIdentityLookup,
UserNameUtils $userNameUtils )
Access: internal
For use by core ServiceWiring

Definition at line 53 of file LinkRendererFactory.php.

Member Function Documentation

◆ create()

MediaWiki\Linker\LinkRendererFactory::create ( array $options = [ 'renderForComment' => false ])
Parameters
array$optionsoptional flags for rendering
  • 'renderForComment': set to true if the created LinkRenderer will be used for links in an edit summary or log comments. An instance with renderForComment enabled must not be used for other links.
Returns
LinkRenderer

Definition at line 81 of file LinkRendererFactory.php.

References MediaWiki\Linker\LinkRenderer\CONSTRUCTOR_OPTIONS.

Referenced by MediaWiki\Linker\LinkRendererFactory\createFromLegacyOptions().

◆ createFromLegacyOptions()

MediaWiki\Linker\LinkRendererFactory::createFromLegacyOptions ( array $options)
Parameters
array$options
Returns
LinkRenderer

Definition at line 95 of file LinkRendererFactory.php.

References MediaWiki\Linker\LinkRendererFactory\create(), PROTO_HTTP, and PROTO_HTTPS.


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