MediaWiki master
MediaWiki\Linker\LinkRendererFactory Class Reference

Factory to create LinkRender objects. More...

Public Member Functions

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

Public Attributes

const CONSTRUCTOR_OPTIONS = LinkRenderer::CONSTRUCTOR_OPTIONS
 

Detailed Description

Factory to create LinkRender objects.

Since
1.28

Definition at line 24 of file LinkRendererFactory.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 31 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 53 of file LinkRendererFactory.php.

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

◆ createFromLegacyOptions()

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

Definition at line 69 of file LinkRendererFactory.php.

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

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Linker\LinkRendererFactory::CONSTRUCTOR_OPTIONS = LinkRenderer::CONSTRUCTOR_OPTIONS

Definition at line 26 of file LinkRendererFactory.php.


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