- // Tell Wikibase which namespace to use for which kind of entity
- $wgWBRepoSettings['entityNamespaces']['item'] = WB_NS_ITEM;
- $wgWBRepoSettings['entityNamespaces']['property'] = WB_NS_PROPERTY;
+ $wgWBRepoSettings['entitySources'] = function ( SettingsArray $settings ) {
+ global $wgServer;
+
+ $entityNamespaces = [
+ 'item' => WB_NS_ITEM,
+ 'property' => WB_NS_PROPERTY,
+ ];
+
+ $hookContainer = MediaWikiServices::getInstance()->getHookContainer();
+ $hookContainer->run( 'WikibaseRepoEntityNamespaces', [ &$entityNamespaces ] );
+
+ return [
+ $settings->getSetting( 'localEntitySourceName' ) => [
+ 'entityNamespaces' => $entityNamespaces,
+ 'repoDatabase' => false,
+ 'baseUri' => $wgServer . '/entity/',
+ 'rdfNodeNamespacePrefix' => 'wd',
+ 'rdfPredicateNamespacePrefix' => '',
+ 'interwikiPrefix' => '',
+ ],
+ ];
+ };