Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler Class Reference
+ Inheritance diagram for Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler:
+ Collaboration diagram for Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler:

Public Member Functions

 __construct (IDatabase $dbr, $showExternalChanges)
 
 onChangesListSpecialPageQuery ( $name, &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts)
 This is used to force-hide Wikibase changes if hasWikibaseChangesEnabled returns false.
 
 addWikibaseConditions (IDatabase $dbr, array &$conds)
 

Static Public Member Functions

static newFromGlobalStateAndServices (ILoadBalancer $loadBalancer)
 
static onChangesListSpecialPageStructuredFilters ( $special)
 

Protected Member Functions

 addFilter (ChangesListSpecialPage $specialPage)
 
 hasWikibaseChangesEnabled ()
 

Private Member Functions

 hasShowWikibaseEditsPrefEnabled (User $user, string $pageName)
 
 getFilterName ()
 
 getOptionName (string $pageName)
 

Private Attributes

 $dbr
 
 $showExternalChanges
 

Detailed Description

Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::__construct ( IDatabase  $dbr,
  $showExternalChanges 
)
Parameters
IDatabase$dbr
bool$showExternalChanges

Member Function Documentation

◆ addFilter()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::addFilter ( ChangesListSpecialPage  $specialPage)
protected

◆ addWikibaseConditions()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::addWikibaseConditions ( IDatabase  $dbr,
array &  $conds 
)
Parameters
IDatabase$dbr
array&$conds

◆ getFilterName()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::getFilterName ( )
private
Returns
string

◆ getOptionName()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::getOptionName ( string  $pageName)
private

◆ hasShowWikibaseEditsPrefEnabled()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::hasShowWikibaseEditsPrefEnabled ( User  $user,
string  $pageName 
)
private

◆ hasWikibaseChangesEnabled()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::hasWikibaseChangesEnabled ( )
protected
Returns
bool

◆ newFromGlobalStateAndServices()

static Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::newFromGlobalStateAndServices ( ILoadBalancer  $loadBalancer)
static
Parameters
ILoadBalancer$loadBalancer
Returns
self

◆ onChangesListSpecialPageQuery()

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::onChangesListSpecialPageQuery (   $name,
$tables,
$fields,
$conds,
$query_options,
$join_conds,
  $opts 
)

This is used to force-hide Wikibase changes if hasWikibaseChangesEnabled returns false.

The user will not even see the option in that case.

Parameters
string$nameName of the special page, e.g. 'Watchlist'
array&$tablesArray of tables to be queried
array&$fieldsArray of columns to select
array&$condsArray of WHERE conditionals for query
array&$query_optionsArray of options for the database request
array&$join_condsJoin conditions for the tables
\FormOptions$optsFormOptions for this request

◆ onChangesListSpecialPageStructuredFilters()

static Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::onChangesListSpecialPageStructuredFilters (   $special)
static
Parameters
ChangesListSpecialPage$special

Member Data Documentation

◆ $dbr

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::$dbr
private

◆ $showExternalChanges

Wikibase\Client\Hooks\ChangesListSpecialPageHookHandler::$showExternalChanges
private

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