MediaWiki master
MediaWiki\RecentChanges\PatrolManager Class Reference

Public Member Functions

 __construct (ServiceOptions $options, IConnectionProvider $connectionProvider, UserFactory $userFactory, HookContainer $hookContainer, RevertedTagUpdateManager $revertedTagUpdateManager)
 
 markPatrolled (RecentChange $recentChange, Authority $performer, $tags=null)
 Mark this RecentChange as patrolled.
 
 reallyMarkPatrolled (RecentChange $recentChange)
 Mark this RecentChange patrolled, without error checking.
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 
const PRC_AUTOPATROLLED = 2
 
const PRC_PATROLLED = 1
 
const PRC_UNPATROLLED = 0
 

Detailed Description

Since
1.45

Definition at line 23 of file PatrolManager.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\RecentChanges\PatrolManager::__construct ( ServiceOptions $options,
IConnectionProvider $connectionProvider,
UserFactory $userFactory,
HookContainer $hookContainer,
RevertedTagUpdateManager $revertedTagUpdateManager )

Member Function Documentation

◆ markPatrolled()

MediaWiki\RecentChanges\PatrolManager::markPatrolled ( RecentChange $recentChange,
Authority $performer,
$tags = null )

Mark this RecentChange as patrolled.

NOTE: Can also return 'rcpatroldisabled', 'hookaborted' and 'markedaspatrollederror-noautopatrol' as errors

Parameters
RecentChange$recentChange
Authority$performerUser performing the action
string | string[] | null$tagsChange tags to add to the patrol log entry ($performer should be able to add the specified tags before this is called)
Returns
PermissionStatus

Definition at line 78 of file PatrolManager.php.

◆ reallyMarkPatrolled()

MediaWiki\RecentChanges\PatrolManager::reallyMarkPatrolled ( RecentChange $recentChange)

Mark this RecentChange patrolled, without error checking.

Parameters
RecentChange$recentChange
Returns
int Number of database rows changed, usually 1, but 0 if another request already patrolled it in the mean time.

Definition at line 150 of file PatrolManager.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\RecentChanges\PatrolManager::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const UseRCPatrol
Name constant for the UseRCPatrol setting, for use with Config::get()
const UseNPPatrol
Name constant for the UseNPPatrol setting, for use with Config::get()
const UseFilePatrol
Name constant for the UseFilePatrol setting, for use with Config::get()
Access: internal
For use by ServiceWiring only

Definition at line 32 of file PatrolManager.php.

◆ PRC_AUTOPATROLLED

const MediaWiki\RecentChanges\PatrolManager::PRC_AUTOPATROLLED = 2

Definition at line 27 of file PatrolManager.php.

◆ PRC_PATROLLED

const MediaWiki\RecentChanges\PatrolManager::PRC_PATROLLED = 1

Definition at line 26 of file PatrolManager.php.

◆ PRC_UNPATROLLED

const MediaWiki\RecentChanges\PatrolManager::PRC_UNPATROLLED = 0

Definition at line 25 of file PatrolManager.php.


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