MediaWiki master
MediaWiki\Storage\PageUpdaterFactory Class Reference

A factory for PageUpdater and DerivedPageDataUpdater instances. More...

Public Member Functions

 __construct (private readonly RevisionStore $revisionStore, private readonly RevisionRenderer $revisionRenderer, private readonly SlotRoleRegistry $slotRoleRegistry, private readonly ParserCache $parserCache, private readonly JobQueueGroup $jobQueueGroup, private readonly Language $contLang, private readonly ILBFactory $loadbalancerFactory, private readonly IContentHandlerFactory $contentHandlerFactory, private readonly DomainEventDispatcher $eventDispatcher, private readonly HookContainer $hookContainer, private readonly EditResultCache $editResultCache, private readonly LoggerInterface $logger, private readonly ServiceOptions $options, private readonly UserGroupManager $userGroupManager, private readonly TitleFormatter $titleFormatter, private readonly ContentTransformer $contentTransformer, private readonly PageEditStash $pageEditStash, private readonly WANObjectCache $mainWANObjectCache, private readonly WikiPageFactory $wikiPageFactory, private readonly ChangeTagsStore $changeTagsStore, private readonly array $softwareTags,)
 
 newDerivedPageDataUpdater (PageIdentity $page)
 
 newPageUpdater (PageIdentity $page, UserIdentity $user)
 Return a PageUpdater for building an update to a page.
 
 newPageUpdaterForDerivedPageDataUpdater (PageIdentity $page, UserIdentity $user, DerivedPageDataUpdater $derivedPageDataUpdater)
 Return a PageUpdater for building an update to a page, reusing the state of an existing DerivedPageDataUpdater.
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 Options that have to be present in the ServiceOptions object passed to the constructor.
 

Detailed Description

A factory for PageUpdater and DerivedPageDataUpdater instances.

Since
1.37

Definition at line 37 of file PageUpdaterFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Storage\PageUpdaterFactory::__construct ( private readonly RevisionStore $revisionStore,
private readonly RevisionRenderer $revisionRenderer,
private readonly SlotRoleRegistry $slotRoleRegistry,
private readonly ParserCache $parserCache,
private readonly JobQueueGroup $jobQueueGroup,
private readonly Language $contLang,
private readonly ILBFactory $loadbalancerFactory,
private readonly IContentHandlerFactory $contentHandlerFactory,
private readonly DomainEventDispatcher $eventDispatcher,
private readonly HookContainer $hookContainer,
private readonly EditResultCache $editResultCache,
private readonly LoggerInterface $logger,
private readonly ServiceOptions $options,
private readonly UserGroupManager $userGroupManager,
private readonly TitleFormatter $titleFormatter,
private readonly ContentTransformer $contentTransformer,
private readonly PageEditStash $pageEditStash,
private readonly WANObjectCache $mainWANObjectCache,
private readonly WikiPageFactory $wikiPageFactory,
private readonly ChangeTagsStore $changeTagsStore,
private readonly array $softwareTags )
Parameters
RevisionStore$revisionStore
RevisionRenderer$revisionRenderer
SlotRoleRegistry$slotRoleRegistry
ParserCache$parserCache
JobQueueGroup$jobQueueGroup
Language$contLang
ILBFactory$loadbalancerFactory
IContentHandlerFactory$contentHandlerFactory
DomainEventDispatcher$eventDispatcher
HookContainer$hookContainer
EditResultCache$editResultCache
LoggerInterface$logger
ServiceOptions$options
UserGroupManager$userGroupManager
TitleFormatter$titleFormatter
ContentTransformer$contentTransformer
PageEditStash$pageEditStash
WANObjectCache$mainWANObjectCache
WikiPageFactory$wikiPageFactory
ChangeTagsStore$changeTagsStore
string[]$softwareTags

Definition at line 78 of file PageUpdaterFactory.php.

Member Function Documentation

◆ newDerivedPageDataUpdater()

MediaWiki\Storage\PageUpdaterFactory::newDerivedPageDataUpdater ( PageIdentity $page)
Parameters
PageIdentity$page
Returns
DerivedPageDataUpdater
Access: internal
Needed by WikiPage to back the deprecated prepareContentForEdit() method.
Note
Avoid direct usage of DerivedPageDataUpdater.
See also
docs/pageupdater.md for more information.

Definition at line 189 of file PageUpdaterFactory.php.

◆ newPageUpdater()

MediaWiki\Storage\PageUpdaterFactory::newPageUpdater ( PageIdentity $page,
UserIdentity $user )

Return a PageUpdater for building an update to a page.

Access: internal
For now, most code should keep using WikiPage::newPageUpdater() instead.
Note
We can only start using this method everywhere when WikiPage::prepareContentForEdit() and WikiPage::getCurrentUpdate() have been removed. For now, the WikiPage instance is used to make the state of an ongoing edit available to hook handlers.
Parameters
PageIdentity$page
UserIdentity$user
Returns
PageUpdater
Since
1.37

Definition at line 118 of file PageUpdaterFactory.php.

◆ newPageUpdaterForDerivedPageDataUpdater()

MediaWiki\Storage\PageUpdaterFactory::newPageUpdaterForDerivedPageDataUpdater ( PageIdentity $page,
UserIdentity $user,
DerivedPageDataUpdater $derivedPageDataUpdater )

Return a PageUpdater for building an update to a page, reusing the state of an existing DerivedPageDataUpdater.

Parameters
PageIdentity$page
UserIdentity$user
DerivedPageDataUpdater$derivedPageDataUpdater
Returns
PageUpdater
Access: internal
needed by WikiPage to back the WikiPage::newPageUpdater method.
Since
1.37

Definition at line 142 of file PageUpdaterFactory.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Storage\PageUpdaterFactory::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const UseRCPatrol
Name constant for the UseRCPatrol setting, for use with Config::get()
const ArticleCountMethod
Name constant for the ArticleCountMethod setting, for use with Config::get()
const ManualRevertSearchRadius
Name constant for the ManualRevertSearchRadius setting, for use with Config::get()
const PageCreationLog
Name constant for the PageCreationLog setting, for use with Config::get()
const RCWatchCategoryMembership
Name constant for the RCWatchCategoryMembership setting, for use with Config::get()
const ParsoidCacheConfig
Name constant for the ParsoidCacheConfig setting, for use with Config::get()
const NamespacesWithoutAutoSummaries
Name constant for the NamespacesWithoutAutoSummaries setting, for use with Config::get()
const UseAutomaticEditSummaries
Name constant for the UseAutomaticEditSummaries setting, for use with Config::get()

Options that have to be present in the ServiceOptions object passed to the constructor.

Note
must include PageUpdater::CONSTRUCTOR_OPTIONS
Access: internal

Definition at line 44 of file PageUpdaterFactory.php.


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