MediaWiki REL1_30
PageQueryPage.php
Go to the documentation of this file.
1<?php
26
32abstract class PageQueryPage extends QueryPage {
41 public function preprocessResults( $db, $res ) {
43 }
44
52 public function formatResult( $skin, $row ) {
53 global $wgContLang;
54
55 $title = Title::makeTitleSafe( $row->namespace, $row->title );
56
57 if ( $title instanceof Title ) {
58 $text = $wgContLang->convert( $title->getPrefixedText() );
59 return $this->getLinkRenderer()->makeLink( $title, $text );
60 } else {
61 return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ],
62 Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) );
63 }
64 }
65}
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition Linker.php:209
Variant of QueryPage which formats the result as a simple link to the page.
preprocessResults( $db, $res)
Run a LinkBatch to pre-cache LinkCache information, like page existence and information for stub colo...
formatResult( $skin, $row)
Format the result as a simple link to the page.
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
Definition QueryPage.php:34
executeLBFromResultWrapper(ResultWrapper $res, $ns=null)
Creates a new LinkBatch object, adds all pages from the passed ResultWrapper (MUST include title and ...
getContext()
Gets the context this SpecialPage is executed in.
Represents a title within MediaWiki.
Definition Title.php:39
Result wrapper for grabbing data queried from an IDatabase object.
$res
Definition database.txt:21
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
Definition design.txt:57
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:40