CRM-14181, add callback function, so that enums are accessible via api etc
[civicrm-core.git] / CRM / Core / SelectValues.php
index 3c1edc26fb5cacdd0a5e49a3b9af322b87c75246..59512601d247e844253aa14edd72813c0983c13d 100644 (file)
@@ -1027,5 +1027,38 @@ class CRM_Core_SelectValues {
     return $jobFrequency;
   }
 
+  /**
+   * mailing group types
+   */
+  static function getMailingGroupTypes() {
+    static $mailingGroupTypes = NULL;
+    if (!$mailingGroupTypes) {
+      $mailingGroupTypes = array(
+        'Include' => ts('Include'),
+        'Exclude' => ts('Exclude'),
+        'Base' => ts('Base'),
+      );
+    }
+    return $mailingGroupTypes;
+  }
+
+  /**
+   * Mailing Job Status
+   */
+  static function geMailingJobStatus() {
+    static $mailingJobStatus = NULL;
+    if (!$mailingJobStatus) {
+      $mailingJobStatus = array(
+        'Scheduled' => ts('Scheduled'),
+        'Running' => ts('Running'),
+        'Complete' => ts('Complete'),
+        'Paused' => ts('Paused'),
+        'Canceled' => ts('Canceled'),
+      );
+    }
+
+    return $mailingJobStatus;
+  }
+
 }