MediaWiki master
MediaWiki\Storage\PageUpdaterFactory Class Reference

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

Public Member Functions

 __construct (RevisionStore $revisionStore, RevisionRenderer $revisionRenderer, SlotRoleRegistry $slotRoleRegistry, ParserCache $parserCache, JobQueueGroup $jobQueueGroup, MessageCache $messageCache, Language $contLang, ILBFactory $loadbalancerFactory, IContentHandlerFactory $contentHandlerFactory, HookContainer $hookContainer, EditResultCache $editResultCache, UserNameUtils $userNameUtils, LoggerInterface $logger, ServiceOptions $options, UserEditTracker $userEditTracker, UserGroupManager $userGroupManager, TitleFormatter $titleFormatter, ContentTransformer $contentTransformer, PageEditStash $pageEditStash, TalkPageNotificationManager $talkPageNotificationManager, WANObjectCache $mainWANObjectCache, PermissionManager $permissionManager, WikiPageFactory $wikiPageFactory, 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 54 of file PageUpdaterFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Storage\PageUpdaterFactory::__construct ( RevisionStore $revisionStore,
RevisionRenderer $revisionRenderer,
SlotRoleRegistry $slotRoleRegistry,
ParserCache $parserCache,
JobQueueGroup $jobQueueGroup,
MessageCache $messageCache,
Language $contLang,
ILBFactory $loadbalancerFactory,
IContentHandlerFactory $contentHandlerFactory,
HookContainer $hookContainer,
EditResultCache $editResultCache,
UserNameUtils $userNameUtils,
LoggerInterface $logger,
ServiceOptions $options,
UserEditTracker $userEditTracker,
UserGroupManager $userGroupManager,
TitleFormatter $titleFormatter,
ContentTransformer $contentTransformer,
PageEditStash $pageEditStash,
TalkPageNotificationManager $talkPageNotificationManager,
WANObjectCache $mainWANObjectCache,
PermissionManager $permissionManager,
WikiPageFactory $wikiPageFactory,
array $softwareTags )
Parameters
RevisionStore$revisionStore
RevisionRenderer$revisionRenderer
SlotRoleRegistry$slotRoleRegistry
ParserCache$parserCache
JobQueueGroup$jobQueueGroup
MessageCache$messageCache
Language$contLang
ILBFactory$loadbalancerFactory
IContentHandlerFactory$contentHandlerFactory
HookContainer$hookContainer
EditResultCache$editResultCache
UserNameUtils$userNameUtils
LoggerInterface$logger
ServiceOptions$options
UserEditTracker$userEditTracker
UserGroupManager$userGroupManager
TitleFormatter$titleFormatter
ContentTransformer$contentTransformer
PageEditStash$pageEditStash
TalkPageNotificationManager$talkPageNotificationManager
WANObjectCache$mainWANObjectCache
PermissionManager$permissionManager
WikiPageFactory$wikiPageFactory
string[]$softwareTags

Definition at line 169 of file PageUpdaterFactory.php.

References MediaWiki\Config\ServiceOptions\assertRequiredOptions().

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 304 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 237 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 261 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 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 61 of file PageUpdaterFactory.php.


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