MediaWiki
master
ChangeTagsList.php
Go to the documentation of this file.
1
<?php
30
abstract
class
ChangeTagsList
extends
RevisionListBase
{
31
public
function
__construct
(
IContextSource
$context
,
Title
$title
, array
$ids
) {
32
parent::__construct(
$context
,
$title
);
33
$this->ids =
$ids
;
34
}
35
46
public
static
function
factory
( $typeName,
IContextSource
$context
,
47
Title
$title
, array
$ids
48
) {
49
switch
( $typeName ) {
50
case
'revision'
:
51
$className = ChangeTagsRevisionList::class;
52
break
;
53
case
'logentry'
:
54
$className = ChangeTagsLogList::class;
55
break
;
56
default
:
57
throw
new
Exception(
"Class $typeName requested, but does not exist"
);
58
}
59
60
return
new
$className(
$context
,
$title
,
$ids
);
61
}
62
66
public
function
reloadFromMaster
() {
67
$dbw =
wfGetDB
(
DB_MASTER
);
68
$this->res = $this->
doQuery
( $dbw );
69
}
70
81
abstract
public
function
updateChangeTagsOnAll
( $tagsToAdd, $tagsToRemove, $params,
82
$reason, $user );
83
}
ChangeTagsList
Definition:
ChangeTagsList.php:30
ContextSource\$context
IContextSource $context
Definition:
ContextSource.php:37
ChangeTagsList\updateChangeTagsOnAll
updateChangeTagsOnAll( $tagsToAdd, $tagsToRemove, $params, $reason, $user)
Add/remove change tags from all the items in the list.
RevisionListBase
List for revision table items for a single page.
Definition:
RevisionListBase.php:29
ChangeTagsList\reloadFromMaster
reloadFromMaster()
Reload the list data from the master DB.
Definition:
ChangeTagsList.php:66
RevisionListBase\doQuery
doQuery( $db)
Do the DB query to iterate through the objects.
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition:
GlobalFunctions.php:2466
RevisionListBase\$title
Title $title
Definition:
RevisionListBase.php:31
DB_MASTER
const DB_MASTER
Definition:
defines.php:26
RevisionListBase\$ids
int[] null $ids
Definition:
RevisionListBase.php:34
IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition:
IContextSource.php:55
Title
Represents a title within MediaWiki.
Definition:
Title.php:46
ChangeTagsList\factory
static factory( $typeName, IContextSource $context, Title $title, array $ids)
Creates a ChangeTags*List of the requested type.
Definition:
ChangeTagsList.php:46
ChangeTagsList\__construct
__construct(IContextSource $context, Title $title, array $ids)
Definition:
ChangeTagsList.php:31
includes
changetags
ChangeTagsList.php
Generated on Tue Jan 19 2021 09:08:31 for MediaWiki by
1.8.19