MediaWiki master
RevDelItem.php
Go to the documentation of this file.
1<?php
7
8namespace MediaWiki\RevisionDelete;
9
10use MediaWiki\Api\ApiResult;
11use MediaWiki\RevisionList\RevisionItemBase;
12use MediaWiki\Status\Status;
13
17abstract class RevDelItem extends RevisionItemBase {
25 public function isHideCurrentOp( $newBits ) {
26 return false;
27 }
28
34 abstract public function getBits();
35
47 abstract public function setBits( $newBits );
48
55 abstract public function getApiData( ApiResult $result );
56
62 public function lock() {
63 return Status::newGood();
64 }
65
71 public function unlock() {
72 return Status::newGood();
73 }
74}
75
77class_alias( RevDelItem::class, 'RevDelItem' );
This class represents the result of the API operations.
Definition ApiResult.php:34
Abstract base class for deletable items.
lock()
Lock the item against changes outside of the DB.
setBits( $newBits)
Set the visibility of the item.
getBits()
Get the current deletion bitfield value.
getApiData(ApiResult $result)
Get the return information about the revision for the API.
unlock()
Unlock the item against changes outside of the DB.
isHideCurrentOp( $newBits)
Returns true if the item is "current", and the operation to set the given bits can't be executed for ...
Abstract base class for revision items.