MediaWiki REL1_35
ChangeTagsList.php
Go to the documentation of this file.
1<?php
30abstract 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}
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:29