Skip to content

Commit e8f113c

Browse files
committed
feat(config): add/expand several extension functions
1 parent 7918d80 commit e8f113c

1 file changed

Lines changed: 60 additions & 3 deletions

File tree

config/MWCExtensions.php

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,17 @@ public function ApprovedRevs(): self {
7171
return $this->ext( 'ApprovedRevs' );
7272
}
7373

74-
public function ArticleFeedbackv5(): self {
75-
return $this->ext( 'ArticleFeedbackv5' );
74+
public function Arrays(): self {
75+
return $this->ext( 'Arrays' );
76+
}
77+
78+
/**
79+
* @param string[] $categories
80+
*/
81+
public function ArticleFeedbackv5( array $categories = [] ): self {
82+
return $this
83+
->ext( 'ArticleFeedbackv5' )
84+
->conf( 'wgArticleFeedbackv5Categories', $categories );
7685
}
7786

7887
public function ArticleSummaries(): self {
@@ -81,6 +90,10 @@ public function ArticleSummaries(): self {
8190
->ext( 'ArticleSummaries' );
8291
}
8392

93+
public function AuthorProtect(): self {
94+
return $this->ext( 'AuthorProtect' );
95+
}
96+
8497
public function AutoCreateCategoryPages(): self {
8598
return $this->ext( 'AutoCreateCategoryPages' );
8699
}
@@ -93,6 +106,14 @@ public function BetaFeatures(): self {
93106
return $this->ext( 'BetaFeatures' );
94107
}
95108

109+
public function BlogPage(): self {
110+
return $this
111+
->SocialProfile()
112+
->Comments()
113+
->VoteNY()
114+
->ext( 'BlogPage' );
115+
}
116+
96117
public function Bootstrap(): self {
97118
return $this->ext( 'Bootstrap' );
98119
}
@@ -460,7 +481,27 @@ public function InterwikiDispatcher(): self {
460481
return $this->ext( 'InterwikiDispatcher' );
461482
}
462483

463-
public function JsonConfig(): self {
484+
public function JsonConfig( bool $enableLocalTabularContent = false ): self {
485+
if ( $enableLocalTabularContent ) {
486+
$this->setAssociativeConfArrayValue(
487+
'wgJsonConfigModels',
488+
'Tabular.JsonConfig',
489+
'JsonConfig\JCTabularContent'
490+
);
491+
$this->setAssociativeConfArrayValue(
492+
'wgJsonConfigs',
493+
'Tabular.JsonConfig',
494+
[
495+
'namespace' => 468,
496+
'nsName' => 'Data',
497+
// page name must end in .tab, and contain at least one symbol
498+
'pattern' => '/.\.tab$/',
499+
'license' => 'CC0-1.0',
500+
'isLocal' => true,
501+
'store' => true,
502+
]
503+
);
504+
}
464505
return $this->ext( 'JsonConfig' );
465506
}
466507

@@ -543,6 +584,10 @@ public function Monstranto(): self {
543584
return $this->ext( 'Monstranto' );
544585
}
545586

587+
public function MsCalendar(): self {
588+
return $this->ext( 'MsCalendar' );
589+
}
590+
546591
public function MsUpload(): self {
547592
return $this
548593
->WikiEditor()
@@ -835,6 +880,10 @@ public function SemanticScribunto(): self {
835880
return $this->ext( 'SemanticScribunto' );
836881
}
837882

883+
public function Share(): self {
884+
return $this->ext( 'Share' );
885+
}
886+
838887
public function ShortDescription(): self {
839888
return $this->ext( 'ShortDescription' );
840889
}
@@ -978,6 +1027,10 @@ public function TwoColConflict(): self {
9781027
return $this->ext( 'TwoColConflict' );
9791028
}
9801029

1030+
public function UIFeedback(): self {
1031+
return $this->ext( 'UIFeedback' );
1032+
}
1033+
9811034
public function UniversalLanguageSelector(): self {
9821035
return $this->ext( 'UniversalLanguageSelector' );
9831036
}
@@ -1071,6 +1124,10 @@ public function Wikistories(): self {
10711124
->conf( 'wgWikistoriesRestDomain', 'wikipedia.org' );
10721125
}
10731126

1127+
public function WikiTextLoggedInOut(): self {
1128+
return $this->ext( 'WikiTextLoggedInOut' );
1129+
}
1130+
10741131
public function WikiCategoryTagCloud(): self {
10751132
return $this->ext( 'WikiCategoryTagCloud' );
10761133
}

0 commit comments

Comments
 (0)