MediaWiki
REL1_39
ChangeTagsList.php
Go to the documentation of this file.
1
<?php
22
use
MediaWiki\Page\PageIdentity
;
23
use
MediaWiki\Permissions\Authority
;
24
33
abstract
class
ChangeTagsList
extends
RevisionListBase
{
34
public
function
__construct
(
IContextSource
$context,
PageIdentity
$page
, array
$ids
) {
35
parent::__construct( $context,
$page
);
36
$this->ids =
$ids
;
37
}
38
49
public
static
function
factory
( $typeName,
IContextSource
$context,
50
PageIdentity
$page
, array
$ids
51
) {
52
switch
( $typeName ) {
53
case
'revision'
:
54
$className = ChangeTagsRevisionList::class;
55
break
;
56
case
'logentry'
:
57
$className = ChangeTagsLogList::class;
58
break
;
59
default
:
60
throw
new
Exception(
"Class $typeName requested, but does not exist"
);
61
}
62
63
return
new
$className( $context,
$page
,
$ids
);
64
}
65
69
public
function
reloadFromPrimary
() {
70
$dbw =
wfGetDB
(
DB_PRIMARY
);
71
$this->res = $this->
doQuery
( $dbw );
72
}
73
84
abstract
public
function
updateChangeTagsOnAll
(
85
array $tagsToAdd,
86
array $tagsToRemove,
87
?
string
$params,
88
string
$reason,
89
Authority
$performer
90
);
91
}
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition
GlobalFunctions.php:1942
ChangeTagsList
Definition
ChangeTagsList.php:33
ChangeTagsList\reloadFromPrimary
reloadFromPrimary()
Reload the list data from the primary DB.
Definition
ChangeTagsList.php:69
ChangeTagsList\__construct
__construct(IContextSource $context, PageIdentity $page, array $ids)
Definition
ChangeTagsList.php:34
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:49
RevisionListBase
List for revision table items for a single page.
Definition
RevisionListBase.php:30
RevisionListBase\$page
PageIdentity $page
Definition
RevisionListBase.php:34
RevisionListBase\$ids
int[] null $ids
Definition
RevisionListBase.php:37
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:58
MediaWiki\Page\PageIdentity
Interface for objects (potentially) representing an editable wiki page.
Definition
PageIdentity.php:64
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 Sat Dec 14 2024 02:22:51 for MediaWiki by
1.10.0