MediaWiki  1.34.0
ChangeTagsList.php
Go to the documentation of this file.
1 <?php
31 abstract 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 }
ChangeTagsList
Definition: ChangeTagsList.php:31
ContextSource\$context
IContextSource $context
Definition: ContextSource.php:33
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:67
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:2575
RevisionListBase\$title
Title $title
Definition: RevisionListBase.php:31
DB_MASTER
const DB_MASTER
Definition: defines.php:26
RevisionListBase\$ids
array $ids
Definition: RevisionListBase.php:34
IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition: IContextSource.php:53
Title
Represents a title within MediaWiki.
Definition: Title.php:42
ChangeTagsList\factory
static factory( $typeName, IContextSource $context, Title $title, array $ids)
Creates a ChangeTags*List of the requested type.
Definition: ChangeTagsList.php:47
ChangeTagsList\__construct
__construct(IContextSource $context, Title $title, array $ids)
Definition: ChangeTagsList.php:32