Go to the documentation of this file.
23 $title->getText() ==
'Visualeditor-cite-tool-definition.json' ||
24 $title->getText() ==
'Cite-tool-definition.json'
42 $resourceModules =
$resourceLoader->getConfig()->get(
'ResourceModules' );
45 isset( $resourceModules[
'ext.visualEditor.mediawiki' ] ) ||
48 $testModules[
'qunit'][
'ext.cite.visualEditor.test'] = [
50 'modules/ve-cite/tests/ve.dm.citeExample.js',
51 'modules/ve-cite/tests/ve.dm.Converter.test.js',
52 'modules/ve-cite/tests/ve.dm.InternalList.test.js',
53 'modules/ve-cite/tests/ve.dm.Transaction.test.js',
54 'modules/ve-cite/tests/ve.ui.DiffElement.test.js',
55 'modules/ve-cite/tests/ve.ui.MWWikitextStringTransferHandler.test.js',
58 'ext.cite.visualEditor',
59 'ext.visualEditor.test'
61 'localBasePath' => dirname( __DIR__ ),
62 'remoteExtPath' =>
'Cite',
74 if ( ! class_exists(
'VisualEditorHooks' ) ) {
78 $dir = dirname( __DIR__ ) . DIRECTORY_SEPARATOR;
81 'localBasePath' => $dir .
'modules',
82 'remoteExtPath' =>
'Cite/modules',
84 "ve-cite/ve.dm.MWReferenceModel.js",
85 "ve-cite/ve.dm.MWReferencesListNode.js",
86 "ve-cite/ve.dm.MWReferenceNode.js",
87 "ve-cite/ve.ce.MWReferencesListNode.js",
88 "ve-cite/ve.ce.MWReferenceNode.js",
89 "ve-cite/ve.ui.MWReferencesListCommand.js"
92 "ve-cite/ve.ce.MWReferencesListNode.css",
93 "ve-cite/ve.ce.MWReferenceNode.css"
96 "ext.visualEditor.mwcore"
99 "cite-ve-referenceslist-isempty",
100 "cite-ve-referenceslist-isempty-default",
101 "cite-ve-referenceslist-missingref",
102 "cite-ve-referenceslist-missingref-in-list",
103 "cite-ve-referenceslist-missingreflist",
104 "visualeditor-internal-list-diff-default-group-name-mwreference",
105 "visualeditor-internal-list-diff-group-name-mwreference"
114 [
"class" =>
"CiteDataModule" ] );
117 'localBasePath' => $dir .
'modules',
118 'remoteExtPath' =>
'Cite/modules',
119 "class" =>
"ResourceLoaderImageModule",
120 "selectorWithoutVariant" =>
".oo-ui-icon-{name}",
121 "selectorWithVariant" =>
".oo-ui-image-{variant}.oo-ui-icon-{name}",
129 "file" =>
"ve-cite/icons/ref-cite-book.svg"
131 "ref-cite-journal" => [
133 "ltr" =>
"ve-cite/icons/ref-cite-journal-ltr.svg",
134 "rtl" =>
"ve-cite/icons/ref-cite-journal-rtl.svg"
139 "ltr" =>
"ve-cite/icons/ref-cite-news-ltr.svg",
140 "rtl" =>
"ve-cite/icons/ref-cite-news-rtl.svg"
144 "file" =>
"ve-cite/icons/ref-cite-web.svg"
148 "ltr" =>
"ve-cite/icons/reference-ltr.svg",
149 "rtl" =>
"ve-cite/icons/reference-rtl.svg"
152 "reference-existing" => [
154 "ltr" =>
"ve-cite/icons/reference-existing-ltr.svg",
155 "rtl" =>
"ve-cite/icons/reference-existing-rtl.svg"
160 "ltr" =>
"ve-cite/icons/references-ltr.svg",
161 "rtl" =>
"ve-cite/icons/references-rtl.svg"
168 'localBasePath' => $dir .
'modules',
169 'remoteExtPath' =>
'Cite/modules',
171 "ve-cite/ve.ui.MWReferenceGroupInputWidget.js",
172 "ve-cite/ve.ui.MWReferenceSearchWidget.js",
173 "ve-cite/ve.ui.MWReferenceResultWidget.js",
174 "ve-cite/ve.ui.MWUseExistingReferenceCommand.js",
175 "ve-cite/ve.ui.MWCitationDialog.js",
176 "ve-cite/ve.ui.MWReferencesListDialog.js",
177 "ve-cite/ve.ui.MWReferenceDialog.js",
178 "ve-cite/ve.ui.MWReferenceDialogTool.js",
179 "ve-cite/ve.ui.MWCitationDialogTool.js",
180 "ve-cite/ve.ui.MWReferenceContextItem.js",
181 "ve-cite/ve.ui.MWReferencesListContextItem.js",
182 "ve-cite/ve.ui.MWCitationContextItem.js",
183 "ve-cite/ve.ui.MWCitationAction.js",
184 "ve-cite/ve.ui.MWReference.init.js"
187 "ve-cite/ve.ui.MWReferenceContextItem.css",
188 "ve-cite/ve.ui.MWReferenceGroupInputWidget.css",
189 "ve-cite/ve.ui.MWReferenceResultWidget.css",
190 "ve-cite/ve.ui.MWReferenceSearchWidget.css"
193 "oojs-ui.styles.icons-alerts",
194 "oojs-ui.styles.icons-editing-citation",
195 "oojs-ui.styles.icons-interactions",
196 "ext.cite.visualEditor.core",
197 "ext.cite.visualEditor.data",
198 "ext.cite.visualEditor.icons",
201 "ext.visualEditor.mwtransclusion",
202 "ext.visualEditor.mediawiki"
205 "cite-ve-changedesc-ref-group-both",
206 "cite-ve-changedesc-ref-group-from",
207 "cite-ve-changedesc-ref-group-to",
208 "cite-ve-changedesc-reflist-group-both",
209 "cite-ve-changedesc-reflist-group-from",
210 "cite-ve-changedesc-reflist-group-to",
211 "cite-ve-changedesc-reflist-item-id",
212 "cite-ve-changedesc-reflist-responsive-set",
213 "cite-ve-changedesc-reflist-responsive-unset",
214 "cite-ve-dialog-reference-editing-reused",
215 "cite-ve-dialog-reference-options-group-label",
216 "cite-ve-dialog-reference-options-group-placeholder",
217 "cite-ve-dialog-reference-options-name-label",
218 "cite-ve-dialog-reference-options-responsive-label",
219 "cite-ve-dialog-reference-options-section",
220 "cite-ve-dialog-reference-placeholder",
221 "cite-ve-dialog-reference-title",
222 "cite-ve-dialog-reference-useexisting-full-label",
223 "cite-ve-dialog-reference-useexisting-label",
224 "cite-ve-dialog-reference-useexisting-tool",
225 "cite-ve-dialog-referenceslist-contextitem-description-general",
226 "cite-ve-dialog-referenceslist-contextitem-description-named",
227 "cite-ve-dialog-referenceslist-title",
228 "cite-ve-dialogbutton-citation-educationpopup-title",
229 "cite-ve-dialogbutton-citation-educationpopup-text",
230 "cite-ve-dialogbutton-reference-full-label",
231 "cite-ve-dialogbutton-reference-tooltip",
232 "cite-ve-dialogbutton-reference-title",
233 "cite-ve-dialogbutton-referenceslist-tooltip",
234 "cite-ve-reference-input-placeholder",
235 "cite-ve-toolbar-group-label",
236 "cite-ve-othergroup-item"
253 global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse;
254 if ( !$wgCiteStoreReferencesData ) {
257 $refData =
$linksUpdate->getParserOutput()->getExtensionData( Cite::EXT_DATA_KEY );
258 if ( $refData ===
null ) {
261 if ( $wgCiteCacheRawReferencesOnParse ) {
263 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
265 $key =
$cache->makeKey( Cite::EXT_DATA_KEY, $articleID );
266 $cache->set( $key, $refData, Cite::CACHE_DURATION_ONPARSE );
271 $ppValue = gzencode( $ppValue, 9 );
273 $ppValues = str_split( $ppValue, Cite::MAX_STORAGE_LENGTH );
274 foreach ( $ppValues
as $num => $ppValue ) {
275 $key =
'references-' . intval( $num + 1 );
278 $linksUpdate->getParserOutput()->setExtensionData( Cite::EXT_DATA_KEY,
null );
289 global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse;
290 if ( !$wgCiteStoreReferencesData || $wgCiteCacheRawReferencesOnParse ) {
294 if ( method_exists(
$linksUpdate,
'getAddedProperties' )
295 && method_exists(
$linksUpdate,
'getRemovedProperties' )
299 if ( !isset( $addedProps[
'references-1'] )
300 && !isset( $removedProps[
'references-1'] )
305 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
307 $key =
$cache->makeKey( Cite::EXT_DATA_KEY, $articleID );
317 $config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig(
'cite' );
318 $vars[
'wgCiteVisualEditorOtherGroup'] = $config->get(
'CiteVisualEditorOtherGroup' );
319 $vars[
'wgCiteResponsiveReferences'] = $config->get(
'CiteResponsiveReferences' );
331 $config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig(
'cite' );
332 $data[
'citeresponsivereferences'] = $config->get(
'CiteResponsiveReferences' );
const MAX_COMMIT_DELAY
Max time expected to pass between delete() and DB commit finishing.
Class the manages updates of *_link tables as well as similar extension-managed tables.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext such as when responding to a resource loader request or generating HTML output & $resourceLoader
static onLinksUpdateComplete(LinksUpdate $linksUpdate)
Callback for LinksUpdateComplete hook If $wgCiteCacheRawReferencesOnParse is set to false,...
static onResourceLoaderTestModules(array &$testModules, ResourceLoader $resourceLoader)
Conditionally register the unit testing module for the ext.cite.visualEditor module only if that modu...
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static onResourceLoaderRegisterModules(ResourceLoader $resourceLoader)
Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension.
namespace and then decline to actually register it file or subcat img or subcat $title
static onContentHandlerDefaultModelFor(Title $title, &$model)
Convert the content model of a message that is actually JSON to JSON.
static onAPIQuerySiteInfoGeneralInfo(ApiQuerySiteInfo $api, array &$data)
Hook: APIQuerySiteInfoGeneralInfo.
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
static onResourceLoaderGetConfigVars(array &$vars)
Adds extra variables to the global config.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
either a unescaped string or a HtmlArmor object after in associative array form externallinks $linksUpdate
Represents a title within MediaWiki.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency MediaWikiServices
static onLinksUpdate(LinksUpdate $linksUpdate)
Callback for LinksUpdate hook Post-output processing of references property, for proper db storage De...