MediaWiki  master
MediaWiki\Linker\LinkRendererFactory Class Reference

Factory to create LinkRender objects. More...

Collaboration diagram for MediaWiki\Linker\LinkRendererFactory:

Public Member Functions

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

Private Attributes

HookContainer $hookContainer
 
LinkCache $linkCache
 
SpecialPageFactory $specialPageFactory
 
TitleFormatter $titleFormatter
 

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.

References MediaWiki\Linker\LinkRendererFactory\$hookContainer, MediaWiki\Linker\LinkRendererFactory\$linkCache, MediaWiki\Linker\LinkRendererFactory\$specialPageFactory, and MediaWiki\Linker\LinkRendererFactory\$titleFormatter.

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.

Member Data Documentation

◆ $hookContainer

HookContainer MediaWiki\Linker\LinkRendererFactory::$hookContainer
private

◆ $linkCache

LinkCache MediaWiki\Linker\LinkRendererFactory::$linkCache
private

◆ $specialPageFactory

SpecialPageFactory MediaWiki\Linker\LinkRendererFactory::$specialPageFactory
private

◆ $titleFormatter

TitleFormatter MediaWiki\Linker\LinkRendererFactory::$titleFormatter
private

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