MediaWiki master
MediaWiki\Page\PageArchive Class Reference

Used to show archived pages and eventually restore them. More...

Collaboration diagram for MediaWiki\Page\PageArchive:

Public Member Functions

 __construct (Title $title)
 listFiles ()
 List the deleted file revisions for this page, if it's a file page.

Static Public Member Functions

static listPagesByPrefix ( $prefix)
 List deleted pages recorded in the archive table matching the given title prefix.
static listPagesBySearch ( $term)
 List deleted pages recorded in the archive matching the given term, using search engine archive.

Static Protected Member Functions

static listPages (IReadableDatabase $dbr, $condition)

Protected Attributes

Title $title

Detailed Description

Used to show archived pages and eventually restore them.

Definition at line 21 of file PageArchive.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Page\PageArchive::__construct ( Title $title)

Definition at line 25 of file PageArchive.php.

References $title.

Member Function Documentation

◆ listFiles()

MediaWiki\Page\PageArchive::listFiles ( )

List the deleted file revisions for this page, if it's a file page.

Returns a result wrapper with various filearchive fields, or null if not a file page.

Returns
IResultWrapper|null
Todo
Does this belong in Image for fuller encapsulation?

Definition at line 132 of file PageArchive.php.

References MediaWiki\MediaWikiServices\getInstance(), and NS_FILE.

◆ listPages()

MediaWiki\Page\PageArchive::listPages ( IReadableDatabase $dbr,
$condition )
staticprotected
Parameters
IReadableDatabase$dbr
string | array$condition
Returns
IResultWrapper

Definition at line 113 of file PageArchive.php.

References Wikimedia\Rdbms\IReadableDatabase\newSelectQueryBuilder().

Referenced by listPagesByPrefix(), and listPagesBySearch().

◆ listPagesByPrefix()

MediaWiki\Page\PageArchive::listPagesByPrefix ( $prefix)
static

List deleted pages recorded in the archive table matching the given title prefix.

Returns result wrapper with (ar_namespace, ar_title, count) fields.

Parameters
string$prefixTitle prefix
Returns
IResultWrapper|bool

Definition at line 87 of file PageArchive.php.

References $title, MediaWiki\Title\Title\getDBkey(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Title\Title\getNamespace(), and listPages().

Referenced by listPagesBySearch().

◆ listPagesBySearch()

MediaWiki\Page\PageArchive::listPagesBySearch ( $term)
static

List deleted pages recorded in the archive matching the given term, using search engine archive.

Returns result wrapper with (ar_namespace, ar_title, count) fields.

Parameters
string$termSearch term
Returns
IResultWrapper|bool

Definition at line 37 of file PageArchive.php.

References $title, MediaWiki\Title\Title\getDBkey(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Title\Title\getNamespace(), MediaWiki\Title\Title\getText(), listPages(), and listPagesByPrefix().

Member Data Documentation

◆ $title

Title MediaWiki\Page\PageArchive::$title
protected

Definition at line 23 of file PageArchive.php.

Referenced by __construct(), listPagesByPrefix(), and listPagesBySearch().


The documentation for this class was generated from the following file: