Go to the documentation of this file.
29 parent::__construct( $query, $moduleName,
'rf' );
41 $config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig(
'cite' );
42 if ( !$config->get(
'CiteStoreReferencesData' ) ) {
46 $titles = $this->
getPageSet()->getGoodTitles();
48 if ( !is_null( $params[
'continue'] ) ) {
49 $startId = (int)$params[
'continue'];
56 foreach ( $titles as $pageId =>
$title ) {
58 if ( $startId !==
false && $startId !== $pageId ) {
63 $storedRefs = Cite::getStoredReferences(
$title );
66 if ( $storedRefs !==
false ) {
68 foreach ( $storedRefs[
'refs'] as $index => $grouping ) {
69 foreach ( $grouping as $group => $members ) {
70 foreach ( $members as $name => $ref ) {
73 if ( is_string( $name ) ) {
74 $id = Cite::getReferencesKey( $name .
'-' . $key );
76 $id = Cite::getReferencesKey( $key );
78 $ref[
'group'] = $group;
79 $ref[
'reflist'] = $index;
80 $allReferences[$id] = $ref;
112 'action=query&prop=references&titles=Albert%20Einstein' =>
113 'apihelp-query+references-example-1',
addPageSubItems( $pageId, $data)
Add a sub-element under the page element with the given page ID.
dieWithError( $msg, $code=null, $data=null, $httpCode=null)
Abort execution with an error.
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
static setArrayType(array &$arr, $type, $kvpKeyName=null)
Set the array data type.
This is a base class for all Query modules.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
getCacheMode( $params)
Get the cache mode for the data generated by this module.
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
getPageSet()
Get the PageSet object to work on.
__construct( $query, $moduleName)
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.