+ /**
+ * Returns a list of interwiki prefixes corresponding to each defined import
+ * source.
+ *
+ * @return array
+ * @since 1.27
+ */
+ public function getAllowedImportSources() {
+ $importSources = $this->getConfig()->get( 'ImportSources' );
+ Hooks::run( 'ImportSources', [ &$importSources ] );
+
+ $result = [];
+ foreach ( $importSources as $key => $value ) {
+ if ( is_int( $key ) ) {
+ $result[] = $value;
+ } else {
+ foreach ( $value as $subproject ) {
+ $result[] = "$key:$subproject";
+ }
+ }
+ }
+ return $result;
+ }
+