MediaWiki master
MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin Class Reference

A join on the slots table, mostly to support requireSlotChanged(). More...

Inherits MediaWiki\RecentChanges\ChangesListQuery\BasicJoin.

Collaboration diagram for MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin:

Public Member Functions

 __construct ()
 
 parentAlias ()
 Fetch the instance of this join with a parent_slot alias, with join conditions such that it returns the slot for the parent change.
 
 setRoleId (int $roleId)
 Set the slot_role_id to use.
 
- Public Member Functions inherited from MediaWiki\RecentChanges\ChangesListQuery\BasicJoin
 __construct (string $tableName, ?string $defaultAlias, $conds, $dependencies=[],)
 
 alias (JoinDependencyProvider $provider, string $alias)
 Add or retrieve an instance of the join with the given table alias.
Parameters
JoinDependencyProvider$provider
string$alias
Returns
ChangesListJoinBuilder

 
 forConds (JoinDependencyProvider $provider)
 Declare that the join is required to provide fields for the WHERE clause.Add or retrieve the default instance of the join.
Parameters
JoinDependencyProvider$provider
Returns
ChangesListJoinBuilder

 
 forFields (JoinDependencyProvider $provider)
 Declare that the join is required to provide fields in the SELECT clause.Add or retrieve the default instance of the join.
Parameters
JoinDependencyProvider$provider
Returns
ChangesListJoinBuilder

 
 prepare (SelectQueryBuilder $sqb)
 Add all registered instances of the join to a SELECT query.
Parameters
SelectQueryBuilder$sqb

 

Protected Member Functions

 getExtraConds (?string $alias)
 Subclasses may override this to add to the ON clause.
Parameters
?string$alias
Returns
array

 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\RecentChanges\ChangesListQuery\BasicJoin
ChangesListJoinBuilder[] $instances = []
 

Detailed Description

A join on the slots table, mostly to support requireSlotChanged().

There can be multiple slots for a given change, which is dealt with here by restricting the join to a specified role.

We also provide an alias for a the slots of the parent revision of the change.

This could be generalised if there was a need to do so.

Since
1.45

Definition at line 18 of file SlotsJoin.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin::__construct ( )

Definition at line 21 of file SlotsJoin.php.

Member Function Documentation

◆ getExtraConds()

MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin::getExtraConds ( ?string $alias)
protected

Subclasses may override this to add to the ON clause.

Parameters
?string$alias
Returns
array

Reimplemented from MediaWiki\RecentChanges\ChangesListQuery\BasicJoin.

Definition at line 38 of file SlotsJoin.php.

Referenced by MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin\parentAlias().

◆ parentAlias()

MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin::parentAlias ( )

Fetch the instance of this join with a parent_slot alias, with join conditions such that it returns the slot for the parent change.

Definition at line 53 of file SlotsJoin.php.

References MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin\getExtraConds().

◆ setRoleId()

MediaWiki\RecentChanges\ChangesListQuery\SlotsJoin::setRoleId ( int $roleId)

Set the slot_role_id to use.

Parameters
int$roleId

Definition at line 33 of file SlotsJoin.php.


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