|
MediaWiki master
|
Helper class used by MediaWiki to create Parsoid PageConfig objects. More...
Inherits Wikimedia\Parsoid\Config\PageConfigFactory.

Public Member Functions | |
| __construct (private readonly RevisionStore $revisionStore, private readonly SlotRoleRegistry $slotRoleRegistry, private readonly LanguageFactory $languageFactory,) | |
| create (PageIdentity $pageId, ?UserIdentity $user=null, $revision=null, ?string $unused=null, ?Bcp47Code $pageLanguageOverride=null, bool $ensureAccessibleContent=false) | |
| Create a new PageConfig. | |
| createFromParserOptions (ParserOptions $parserOptions, PageIdentity $pageId, $revision=null, ?Bcp47Code $pageLanguageOverride=null, bool $ensureAccessibleContent=false) | |
| Create a new PageConfig. | |
Helper class used by MediaWiki to create Parsoid PageConfig objects.
Definition at line 32 of file PageConfigFactory.php.
| MediaWiki\Parser\Parsoid\Config\PageConfigFactory::__construct | ( | private readonly RevisionStore | $revisionStore, |
| private readonly SlotRoleRegistry | $slotRoleRegistry, | ||
| private readonly LanguageFactory | $languageFactory ) |
Definition at line 33 of file PageConfigFactory.php.
| MediaWiki\Parser\Parsoid\Config\PageConfigFactory::create | ( | PageIdentity | $pageId, |
| ?UserIdentity | $user = null, | ||
| $revision = null, | |||
| ?string | $unused = null, | ||
| ?Bcp47Code | $pageLanguageOverride = null, | ||
| bool | $ensureAccessibleContent = false ) |
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 | $pageId | The page represented by the PageConfig. |
| ?UserIdentity | $user | User who is doing rendering (for parsing options). |
| int | RevisionRecord | null | $revision | Revision id or a revision record |
| ?string | $unused | |
| ?Bcp47Code | $pageLanguageOverride | |
| bool | $ensureAccessibleContent | If true, ensures that we can get content from the newly constructed pageConfig's RevisionRecord and throws a RevisionAccessException if not. |
| RevisionAccessException |
Definition at line 61 of file PageConfigFactory.php.
References wfDeprecated().
| MediaWiki\Parser\Parsoid\Config\PageConfigFactory::createFromParserOptions | ( | ParserOptions | $parserOptions, |
| PageIdentity | $pageId, | ||
| $revision = null, | |||
| ?Bcp47Code | $pageLanguageOverride = null, | ||
| bool | $ensureAccessibleContent = false ) |
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.
| ParserOptions | $parserOptions | (See note above about user identity in the parser options.) |
| PageIdentity | $pageId | The page represented by the PageConfig. |
| int | RevisionRecord | null | $revision | Revision id or a revision record |
| ?Bcp47Code | $pageLanguageOverride | |
| bool | $ensureAccessibleContent | If true, ensures that we can get content from the newly constructed pageConfig's RevisionRecord and throws a RevisionAccessException if not. |
| RevisionAccessException |
Definition at line 105 of file PageConfigFactory.php.