MediaWiki master
MediaWiki\OutputTransform\Stages\HandleSectionLinks Class Reference

Add anchors and other heading formatting, and replace the section link placeholders. More...

Inherits MediaWiki\OutputTransform\ContentTextTransformStage.

Collaboration diagram for MediaWiki\OutputTransform\Stages\HandleSectionLinks:

Public Member Functions

 __construct (ServiceOptions $options, LoggerInterface $logger, TitleFactory $titleFactory)
 
 shouldRun (ParserOutput $po, ?ParserOptions $popts, array $options=[])
 Decides whether or not the stage should be run.
 
- Public Member Functions inherited from MediaWiki\OutputTransform\ContentTextTransformStage
 transform (ParserOutput $po, ?ParserOptions $popts, array &$options)
 Transforms the input ParserOutput into the returned ParserOutput.
 
- Public Member Functions inherited from MediaWiki\OutputTransform\OutputTransformStage
 __construct (ServiceOptions $options, LoggerInterface $logger)
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 
- Public Attributes inherited from MediaWiki\OutputTransform\OutputTransformStage
const CONSTRUCTOR_OPTIONS = []
 

Protected Member Functions

 transformText (string $text, ParserOutput $po, ?ParserOptions $popts, array &$options)
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\OutputTransform\OutputTransformStage
LoggerInterface $logger
 
ServiceOptions $options
 

Detailed Description

Add anchors and other heading formatting, and replace the section link placeholders.

Access: internal

Definition at line 24 of file HandleSectionLinks.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\OutputTransform\Stages\HandleSectionLinks::__construct ( ServiceOptions $options,
LoggerInterface $logger,
TitleFactory $titleFactory )

Member Function Documentation

◆ shouldRun()

MediaWiki\OutputTransform\Stages\HandleSectionLinks::shouldRun ( ParserOutput $po,
?ParserOptions $popts,
array $options = [] )

Decides whether or not the stage should be run.

Parameters
ParserOutput$po
Stability: unstable
Parameters
ParserOptions | null$popts
array$options
Returns
bool

Reimplemented from MediaWiki\OutputTransform\OutputTransformStage.

Definition at line 43 of file HandleSectionLinks.php.

◆ transformText()

MediaWiki\OutputTransform\Stages\HandleSectionLinks::transformText ( string $text,
ParserOutput $po,
?ParserOptions $popts,
array & $options )
protected

Reimplemented from MediaWiki\OutputTransform\ContentTextTransformStage.

Definition at line 48 of file HandleSectionLinks.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\OutputTransform\Stages\HandleSectionLinks::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const ParserEnableLegacyHeadingDOM
Name constant for the ParserEnableLegacyHeadingDOM setting, for use with Config::get()
Access: internal

Definition at line 32 of file HandleSectionLinks.php.


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