MediaWiki REL1_39
MediaWiki\Parser\Parsoid\Config\PageConfigFactory Class Reference

Helper class used by MediaWiki to create Parsoid PageConfig objects. More...

Inheritance diagram for MediaWiki\Parser\Parsoid\Config\PageConfigFactory:
Collaboration diagram for MediaWiki\Parser\Parsoid\Config\PageConfigFactory:

Public Member Functions

 __construct (RevisionStore $revisionStore, SlotRoleRegistry $slotRoleRegistry)
 create (PageIdentity $pageId, ?UserIdentity $user=null, $revision=null, ?string $unused=null, ?string $pagelanguageOverride=null, ?array $parsoidSettings=null)
 Create a new PageConfig.

Detailed Description

Helper class used by MediaWiki to create Parsoid PageConfig objects.


Definition at line 40 of file PageConfigFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\Parsoid\Config\PageConfigFactory::__construct ( RevisionStore $revisionStore,
SlotRoleRegistry $slotRoleRegistry )

Definition at line 52 of file PageConfigFactory.php.

Member Function Documentation

◆ create()

MediaWiki\Parser\Parsoid\Config\PageConfigFactory::create ( PageIdentity $pageId,
?UserIdentity $user = null,
$revision = null,
?string $unused = null,
?string $pagelanguageOverride = null,
?array $parsoidSettings = null )

Create a new PageConfig.

Note that Parsoid isn't supposed to use the user context by design; all user-specific processing is expected to be introduced as a post-parse transform. The $user parameter is therefore usually null, especially in background job parsing, although there are corner cases during extension processing where a non-null $user could affect the output.

PageIdentity$pageIdThe page represented by the PageConfig.
?UserIdentity$userUser who is doing rendering (for parsing options).
int | RevisionRecord | null$revisionRevision id or a revision record
?array$parsoidSettingsUsed to enable the debug API if requested

Definition at line 77 of file PageConfigFactory.php.

References $content, and $title.

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