MediaWiki master
DeletedContribsPager.php
Go to the documentation of this file.
1<?php
8namespace MediaWiki\Pager;
9
10use MediaWiki\Cache\LinkBatchFactory;
20
25 public function __construct(
26 HookContainer $hookContainer,
27 LinkRenderer $linkRenderer,
28 IConnectionProvider $dbProvider,
31 CommentFormatter $commentFormatter,
32 LinkBatchFactory $linkBatchFactory,
33 UserFactory $userFactory,
34 IContextSource $context,
35 array $options,
37 ) {
38 $options['isArchive'] = true;
39
40 parent::__construct(
41 $linkRenderer,
42 $linkBatchFactory,
43 $hookContainer,
46 $commentFormatter,
47 $userFactory,
48 $context,
49 $options,
51 );
52
53 $this->revisionIdField = 'ar_rev_id';
54 $this->revisionParentIdField = 'ar_parent_id';
55 $this->revisionTimestampField = 'ar_timestamp';
56 $this->revisionLengthField = 'ar_len';
57 $this->revisionDeletedField = 'ar_deleted';
58 $this->revisionMinorField = 'ar_minor_edit';
59 $this->userNameField = 'ar_user_text';
60 $this->pageNamespaceField = 'ar_namespace';
61 $this->pageTitleField = 'ar_title';
62 }
63
67 protected function getRevisionQuery() {
68 $queryBuilder = $this->revisionStore->newArchiveSelectQueryBuilder( $this->getDatabase() )
69 ->joinComment()
70 ->where( [ 'actor_name' => $this->targetUser->getName() ] );
71
72 return $queryBuilder->getQueryInfo();
73 }
74
78 protected function getExtraSortFields() {
79 return [ 'ar_id' ];
80 }
81
83 public function getIndexField() {
84 return 'ar_timestamp';
85 }
86}
87
92class_alias( DeletedContribsPager::class, 'DeletedContribsPager' );
This is the main service interface for converting single-line comments from various DB comment fields...
Class that generates HTML for internal links.
Pager for Special:Contributions.
__construct(HookContainer $hookContainer, LinkRenderer $linkRenderer, IConnectionProvider $dbProvider, RevisionStore $revisionStore, NamespaceInfo $namespaceInfo, CommentFormatter $commentFormatter, LinkBatchFactory $linkBatchFactory, UserFactory $userFactory, IContextSource $context, array $options, UserIdentity $targetUser)
getRevisionQuery()
Get queryInfo for the main query selecting revisions, not including filtering on namespace,...
getIndexField()
Returns the name of the index field.If the pager supports multiple orders, it may return an array of ...
getDatabase()
Get the Database object in use.
Service for looking up page revisions.
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Create User objects.
Interface for objects which can provide a MediaWiki context on request.
Interface for objects representing user identity.
Provide primary and replica IDatabase connections.