MediaWiki
master
ChangeTagsList.php
Go to the documentation of this file.
1
<?php
22
use
MediaWiki\Page\PageIdentity
;
23
use
MediaWiki\Permissions\Authority
;
24
use
MediaWiki\Status\Status
;
25
34
abstract
class
ChangeTagsList
extends
RevisionListBase
{
35
public
function
__construct
(
IContextSource
$context,
PageIdentity
$page, array $ids ) {
36
parent::__construct( $context, $page );
37
$this->ids = $ids;
38
}
39
50
public
static
function
factory
( $typeName,
IContextSource
$context,
51
PageIdentity
$page, array $ids
52
) {
53
switch
( $typeName ) {
54
case
'revision'
:
55
$className = ChangeTagsRevisionList::class;
56
break
;
57
case
'logentry'
:
58
$className = ChangeTagsLogList::class;
59
break
;
60
default
:
61
throw
new
Exception(
"Class $typeName requested, but does not exist"
);
62
}
63
64
return
new
$className( $context, $page, $ids );
65
}
66
70
public
function
reloadFromPrimary
() {
71
$dbw =
wfGetDB
(
DB_PRIMARY
);
72
$this->res = $this->
doQuery
( $dbw );
73
}
74
85
abstract
public
function
updateChangeTagsOnAll
(
86
array $tagsToAdd,
87
array $tagsToRemove,
88
?
string
$params,
89
string
$reason,
90
Authority
$performer
91
);
92
}
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition
GlobalFunctions.php:1830
ChangeTagsList
Definition
ChangeTagsList.php:34
ChangeTagsList\reloadFromPrimary
reloadFromPrimary()
Reload the list data from the primary DB.
Definition
ChangeTagsList.php:70
ChangeTagsList\__construct
__construct(IContextSource $context, PageIdentity $page, array $ids)
Definition
ChangeTagsList.php:35
ChangeTagsList\updateChangeTagsOnAll
updateChangeTagsOnAll(array $tagsToAdd, array $tagsToRemove, ?string $params, string $reason, Authority $performer)
Add/remove change tags from all the items in the list.
ChangeTagsList\factory
static factory( $typeName, IContextSource $context, PageIdentity $page, array $ids)
Creates a ChangeTags*List of the requested type.
Definition
ChangeTagsList.php:50
MediaWiki\Status\Status
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Definition
Status.php:54
RevisionListBase
List for revision table items for a single page.
Definition
RevisionListBase.php:31
RevisionListBase\doQuery
doQuery( $db)
Do the DB query to iterate through the objects.
IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition
IContextSource.php:64
MediaWiki\Page\PageIdentity
Interface for objects (potentially) representing an editable wiki page.
Definition
PageIdentity.php:67
MediaWiki\Permissions\Authority
This interface represents the authority associated the current execution context, such as a web reque...
Definition
Authority.php:37
DB_PRIMARY
const DB_PRIMARY
Definition
defines.php:28
includes
changetags
ChangeTagsList.php
Generated on Tue Nov 28 2023 19:08:14 for MediaWiki by
1.9.8