summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2020-10-02 15:24:06 -0400
committerBrian Evans <grknight@gentoo.org>2020-10-02 15:24:06 -0400
commit60dd5fd95847643eab04ce173f0774c9c584e795 (patch)
tree52299ac4e3c5c69df75997bfd7d62b71ef9e0089 /MLEB/Translate/messagegroups/loaders/WorkflowStatesMessageGroupLoader.php
parentUpdate Widgets to 1.35 (diff)
downloadextensions-60dd5fd95847643eab04ce173f0774c9c584e795.tar.gz
extensions-60dd5fd95847643eab04ce173f0774c9c584e795.tar.bz2
extensions-60dd5fd95847643eab04ce173f0774c9c584e795.zip
Update MLEB to 2020.07
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/Translate/messagegroups/loaders/WorkflowStatesMessageGroupLoader.php')
-rw-r--r--MLEB/Translate/messagegroups/loaders/WorkflowStatesMessageGroupLoader.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/MLEB/Translate/messagegroups/loaders/WorkflowStatesMessageGroupLoader.php b/MLEB/Translate/messagegroups/loaders/WorkflowStatesMessageGroupLoader.php
new file mode 100644
index 00000000..dbf32a9a
--- /dev/null
+++ b/MLEB/Translate/messagegroups/loaders/WorkflowStatesMessageGroupLoader.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * This file contains a class to load the WorkflowStatesMessageGroup.
+ *
+ * @file
+ * @author Abijeet Patro
+ * @license GPL-2.0-or-later
+ */
+
+/**
+ * Loads WorkflowStatesMessageGroup, and handles the related cache.
+ * @since 2019.05
+ */
+class WorkflowStatesMessageGroupLoader extends MessageGroupLoader {
+ /**
+ * Fetches configured WorkflowStatesMessageGroup
+ *
+ * @return WorkflowStatesMessageGroup[]
+ */
+ public function getGroups() {
+ global $wgTranslateWorkflowStates;
+ $groups = [];
+ if ( $wgTranslateWorkflowStates ) {
+ $groups['translate-workflow-states'] = new WorkflowStatesMessageGroup();
+ }
+
+ return $groups;
+ }
+
+ /**
+ * Hook: TranslateInitGroupLoaders
+ *
+ * @param array &$groupLoader
+ * @param array $deps
+ */
+ public static function registerLoader( array &$groupLoader, array $deps ) {
+ $groupLoader[] = new self();
+ }
+}