MediaWiki REL1_39
MediaWiki\Linker\LinkRendererFactory Class Reference

Factory to create LinkRender objects. More...

Public Member Functions

 __construct (TitleFormatter $titleFormatter, LinkCache $linkCache, SpecialPageFactory $specialPageFactory, HookContainer $hookContainer)
 
 create (array $options=[ 'renderForComment'=> false])
 
 createFromLegacyOptions (array $options)
 

Detailed Description

Factory to create LinkRender objects.

Since
1.28

Definition at line 33 of file LinkRendererFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Linker\LinkRendererFactory::__construct ( TitleFormatter $titleFormatter,
LinkCache $linkCache,
SpecialPageFactory $specialPageFactory,
HookContainer $hookContainer )
Access: internal
For use by core ServiceWiring
Parameters
TitleFormatter$titleFormatter
LinkCache$linkCache
SpecialPageFactory$specialPageFactory
HookContainer$hookContainer

Definition at line 62 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 82 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 94 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: