42 $site->setGlobalId(
'foobar' );
46 $site->setGlobalId(
'enwiktionary' );
47 $site->setGroup(
'wiktionary' );
48 $site->setLanguageCode(
'en' );
49 $site->addNavigationId(
'enwiktionary' );
55 $site->setGlobalId(
'dewiktionary' );
56 $site->setGroup(
'wiktionary' );
57 $site->setLanguageCode(
'de' );
58 $site->addInterwikiId(
'dewiktionary' );
59 $site->addInterwikiId(
'wiktionaryde' );
65 $site->setGlobalId(
'spam' );
66 $site->setGroup(
'spam' );
67 $site->setLanguageCode(
'en' );
68 $site->addNavigationId(
'spam' );
69 $site->addNavigationId(
'spamz' );
70 $site->addInterwikiId(
'spamzz' );
71 $site->setLinkPath(
"http://spamzz.test/testing/" );
89 foreach ( $languageCodes
as $langCode ) {
91 $site->setGlobalId( $langCode .
'wiki' );
92 $site->setGroup(
'wikipedia' );
93 $site->setLanguageCode( $langCode );
94 $site->addInterwikiId( $langCode );
95 $site->addNavigationId( $langCode );
110 $sitesTable = \MediaWiki\MediaWikiServices::getInstance()->getSiteStore();
111 $sitesTable->clear();
112 $sitesTable->saveSites( self::getSites() );