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