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 35 of file PageArchive.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 39 of file PageArchive.php.

References MediaWiki\Page\PageArchive\$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 146 of file PageArchive.php.

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

◆ listPages()

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

Definition at line 127 of file PageArchive.php.

References Wikimedia\Rdbms\IReadableDatabase\newSelectQueryBuilder().

Referenced by MediaWiki\Page\PageArchive\listPagesByPrefix(), and MediaWiki\Page\PageArchive\listPagesBySearch().

◆ listPagesByPrefix()

static 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 101 of file PageArchive.php.

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

Referenced by MediaWiki\Page\PageArchive\listPagesBySearch().

◆ listPagesBySearch()

static 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 51 of file PageArchive.php.

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

Member Data Documentation

◆ $title


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