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 (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.
 

Protected Member Functions

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

Detailed Description

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

Access: internal

Definition at line 20 of file HandleSectionLinks.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\OutputTransform\Stages\HandleSectionLinks::__construct ( TitleFactory $titleFactory)

Definition at line 27 of file HandleSectionLinks.php.

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

Implements MediaWiki\OutputTransform\OutputTransformStage.

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


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